/* ========================================
   اعلان‌های حساب کاربری گرا.کالا — v28
======================================== */

.gk-notifications-modal,
.gk-notifications-modal *,
.gk-account-notifications-launch,
.gk-account-notifications-launch * {
  box-sizing: border-box;
}

.gk-notifications-modal[hidden],
.gk-notification-menu-badge[hidden],
#gkAccountNotificationsBadge[hidden],
.gk-notifications-empty[hidden] {
  display: none !important;
}

.gk-notifications-modal {
  position: fixed;
  z-index: 100500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  direction: rtl;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 18%, rgba(145, 14, 55, 0.22), transparent 35%),
    rgba(4, 2, 9, 0.77);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  backdrop-filter: blur(14px) saturate(110%);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.gk-notifications-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gk-notifications-window {
  --gk-notification-gold: #ffd66e;
  --gk-notification-gold-deep: #b9750d;
  --gk-notification-burgundy: #710022;
  --gk-notification-navy: #081328;
  position: relative;
  isolation: isolate;
  display: flex;
  width: min(920px, 100%);
  max-height: calc(100dvh - 28px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 210, 91, 0.94);
  border-radius: 27px;
  color: #fff9ed;
  background:
    radial-gradient(circle at 68% -8%, rgba(169, 6, 53, 0.55), transparent 37%),
    radial-gradient(circle at 3% 65%, rgba(17, 49, 89, 0.48), transparent 40%),
    linear-gradient(145deg, #31000f 0%, #17000b 55%, #050916 100%);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.65),
    0 0 46px rgba(190, 102, 8, 0.16),
    inset 0 1px 0 rgba(255, 232, 170, 0.22);
  transform: translateY(18px) scale(0.985);
  transition: transform 240ms ease;
}

.gk-notifications-window::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  opacity: 0.28;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255, 199, 72, 0.09) 49%, transparent 60%),
    radial-gradient(circle at 17% 3%, rgba(255, 210, 105, 0.18), transparent 16%);
  pointer-events: none;
}

.gk-notifications-modal.is-open .gk-notifications-window {
  transform: translateY(0) scale(1);
}

.gk-notifications-header {
  position: relative;
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 25px 80px 18px;
  border-bottom: 1px solid rgba(255, 205, 91, 0.56);
  background:
    linear-gradient(180deg, rgba(80, 0, 24, 0.42), rgba(30, 0, 15, 0.12));
}

.gk-notifications-close {
  position: absolute;
  top: 23px;
  left: 26px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  padding: 0 0 5px;
  border: 1px solid rgba(255, 210, 99, 0.32);
  border-radius: 50%;
  color: #ffe37f;
  font: 300 46px/1 Arial, sans-serif;
  background: rgba(68, 0, 19, 0.42);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.gk-notifications-close:hover,
.gk-notifications-close:focus-visible {
  border-color: var(--gk-notification-gold);
  background: rgba(127, 0, 37, 0.72);
  outline: none;
  transform: rotate(5deg) scale(1.04);
}

.gk-notifications-hero-bell {
  position: relative;
  display: grid;
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  place-items: center;
  color: #ffd468;
  filter: drop-shadow(0 5px 8px rgba(228, 120, 9, 0.42));
}

.gk-notifications-hero-bell::after {
  content: "✦";
  position: absolute;
  top: 4px;
  left: 8px;
  color: #fff2a1;
  font-size: 26px;
  text-shadow: 0 0 13px #ffb318;
}

.gk-notifications-hero-bell svg {
  width: 85px;
  height: 85px;
  fill: rgba(173, 79, 0, 0.38);
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gk-notifications-heading {
  min-width: 0;
  text-align: right;
}

.gk-notifications-heading h2,
.gk-notifications-heading p {
  margin: 0;
}

.gk-notifications-heading h2 {
  color: #ffdd76;
  font-size: clamp(28px, 4vw, 43px);
  font-weight: 900;
  line-height: 1.22;
  text-shadow: 0 3px 14px rgba(145, 65, 0, 0.42);
}

.gk-notifications-heading p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.91);
  font-size: clamp(15px, 2vw, 20px);
}

#gkNotificationsUnreadSummary {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  margin-top: 9px;
  padding: 3px 14px;
  border: 1px solid rgba(255, 208, 91, 0.92);
  border-radius: 999px;
  color: #fff7df;
  font-size: 13px;
  background: linear-gradient(90deg, rgba(111, 0, 35, 0.8), rgba(184, 3, 48, 0.92));
  box-shadow: 0 0 16px rgba(236, 151, 12, 0.16);
}

.gk-notifications-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 205, 91, 0.34);
  background: rgba(11, 3, 12, 0.38);
}

.gk-notifications-filters button {
  display: inline-flex;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 215, 118, 0.32);
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.91);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: rgba(21, 14, 26, 0.5);
  cursor: pointer;
  transition: 180ms ease;
}

.gk-notifications-filters button:hover,
.gk-notifications-filters button:focus-visible {
  border-color: rgba(255, 214, 103, 0.76);
  outline: none;
  background: rgba(94, 0, 29, 0.54);
}

.gk-notifications-filters button.is-active {
  border-color: #ffdd6d;
  color: #ffe98e;
  background: linear-gradient(145deg, rgba(160, 0, 44, 0.92), rgba(67, 0, 23, 0.87));
  box-shadow:
    0 0 16px rgba(255, 187, 24, 0.22),
    inset 0 1px 0 rgba(255, 241, 187, 0.22);
}

.gk-notifications-filters b {
  font-size: 13px;
}

.gk-notifications-unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffdb66;
  box-shadow: 0 0 11px rgba(255, 200, 46, 0.75);
}

.gk-notifications-status {
  min-height: 0;
  margin: 0;
  padding: 0 18px;
  color: #ffd879;
  font-size: 13px;
  text-align: center;
  transition: padding 180ms ease;
}

.gk-notifications-status:not(:empty) {
  min-height: 38px;
  padding-block: 9px 4px;
}

.gk-notifications-status[data-state="error"] {
  color: #ff9dad;
}

.gk-notifications-list {
  min-height: 180px;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 16px 6px;
  scrollbar-color: rgba(255, 202, 73, 0.55) rgba(255, 255, 255, 0.04);
}

.gk-notification-card {
  position: relative;
  display: grid;
  grid-template-columns: 104px 70px minmax(0, 1fr) 164px;
  grid-template-areas: "meta icon content action";
  align-items: center;
  gap: 13px;
  min-height: 112px;
  margin-bottom: 10px;
  padding: 13px 14px;
  direction: ltr;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 233, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(105deg, rgba(31, 37, 50, 0.91), rgba(12, 16, 28, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gk-notification-card.is-unread {
  border-color: rgba(255, 208, 75, 0.9);
  background:
    radial-gradient(circle at 92% 0, rgba(172, 2, 47, 0.7), transparent 42%),
    linear-gradient(105deg, rgba(91, 0, 29, 0.96), rgba(39, 0, 17, 0.96));
  box-shadow:
    0 0 18px rgba(255, 179, 0, 0.12),
    inset 0 1px 0 rgba(255, 232, 154, 0.13);
}

.gk-notification-card.is-unread::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 13px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffda62;
  box-shadow: 0 0 13px rgba(255, 201, 51, 0.8);
}

.gk-notification-meta,
.gk-notification-icon,
.gk-notification-content,
.gk-notification-action {
  direction: rtl;
}

.gk-notification-meta {
  grid-area: meta;
  color: rgba(255, 255, 255, 0.73);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.gk-notification-meta span,
.gk-notification-meta small {
  display: block;
}

.gk-notification-meta small {
  margin-top: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.gk-notification-icon {
  grid-area: icon;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: #ffd56b;
  background: rgba(255, 198, 65, 0.08);
  box-shadow: 0 0 16px rgba(255, 190, 38, 0.12);
}

.gk-notification-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gk-notification-card[data-type="ad_published"] .gk-notification-icon,
.gk-notification-card[data-type="payment_success"] .gk-notification-icon {
  color: #8ae6a4;
  background: rgba(31, 154, 75, 0.17);
}

.gk-notification-card[data-type="support_reply"] .gk-notification-icon {
  color: #82c6ff;
  background: rgba(24, 104, 188, 0.18);
}

.gk-notification-card[data-type="ad_rejected"] .gk-notification-icon,
.gk-notification-card[data-type="favorite_unavailable"] .gk-notification-icon {
  color: #ff4f75;
  background: rgba(197, 0, 53, 0.18);
}

.gk-notification-content {
  grid-area: content;
  min-width: 0;
  text-align: right;
}

.gk-notification-content h3,
.gk-notification-content p {
  margin: 0;
}

.gk-notification-content h3 {
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.55;
}

.gk-notification-card.is-unread .gk-notification-content h3 {
  color: #ffdc68;
}

.gk-notification-content p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.75;
}

.gk-notification-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.gk-notification-reference [dir="ltr"] {
  display: inline-block;
}

.gk-notification-action {
  grid-area: action;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 215, 109, 0.76);
  border-radius: 12px;
  color: #fff8e5;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: rgba(72, 17, 18, 0.56);
  cursor: pointer;
  transition: transform 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.gk-notification-action:hover,
.gk-notification-action:focus-visible {
  outline: none;
  background: rgba(143, 1, 41, 0.88);
  box-shadow: 0 0 15px rgba(255, 190, 37, 0.18);
  transform: translateY(-1px);
}

.gk-notification-action span {
  font-size: 20px;
}

.gk-notification-card.is-expanded .gk-notification-content p {
  color: #fff;
}

.gk-notifications-empty {
  display: grid;
  min-height: 240px;
  flex: 1 1 auto;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 30px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.gk-notifications-empty > span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid #fbd266;
  border-radius: 50%;
  color: #fbd266;
  font-size: 45px;
}

.gk-notifications-empty strong {
  font-size: 18px;
}

.gk-notifications-empty small {
  color: rgba(255, 255, 255, 0.55);
}

.gk-notifications-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 13px 26px 18px;
  border-top: 1px solid rgba(255, 203, 76, 0.35);
  background: rgba(22, 0, 10, 0.66);
}

.gk-notifications-footer button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 217, 116, 0.55);
  border-radius: 14px;
  color: #fff7e5;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  background: rgba(46, 5, 20, 0.68);
  cursor: pointer;
  transition: 180ms ease;
}

#gkNotificationsReadAll {
  border-color: #ffd766;
  color: #271100;
  background: linear-gradient(180deg, #ffe490, #d99319 62%, #a85d00);
  box-shadow:
    0 0 22px rgba(255, 190, 23, 0.35),
    inset 0 1px 0 #fff4c8;
}

.gk-notifications-footer button:hover:not(:disabled),
.gk-notifications-footer button:focus-visible:not(:disabled) {
  outline: none;
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.gk-notifications-footer button:disabled {
  cursor: default;
  opacity: 0.46;
}

/* دکمه اعلان‌ها در حساب من */
.gk-account-notifications-launch {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 17px;
  width: 100%;
  min-height: 118px;
  margin: 3px 0 14px;
  padding: 16px 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 213, 99, 0.95);
  border-radius: 18px;
  color: #fff8e9;
  font: inherit;
  text-align: right;
  background:
    radial-gradient(circle at 90% 50%, rgba(187, 12, 60, 0.85), transparent 32%),
    linear-gradient(110deg, #3c0017, #710023 56%, #180517);
  box-shadow:
    0 0 18px rgba(255, 187, 26, 0.2),
    inset 0 1px 0 rgba(255, 239, 171, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.gk-account-notifications-launch::before {
  content: "";
  position: absolute;
  inset: -30% auto -30% -24%;
  width: 38%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 231, 151, 0.22), transparent);
  transform: skewX(-18deg);
}

.gk-account-notifications-launch.has-unread {
  animation: gk-notification-launch-glow 2.6s ease-in-out infinite;
}

.gk-account-notifications-launch.has-unread::before {
  animation: gk-notification-shine 3.8s ease-in-out infinite;
}

.gk-account-notifications-launch:hover,
.gk-account-notifications-launch:focus-visible {
  outline: none;
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    0 0 26px rgba(255, 190, 30, 0.36),
    inset 0 1px 0 rgba(255, 239, 171, 0.28);
}

.gk-account-notifications-bell {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: #ffda71;
  filter: drop-shadow(0 0 9px rgba(255, 182, 34, 0.34));
}

.gk-account-notifications-bell svg {
  width: 58px;
  height: 58px;
  fill: rgba(139, 53, 4, 0.38);
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#gkAccountNotificationsBadge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  padding: 0 7px;
  border: 2px solid #ff9e5e;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: #cf0636;
  box-shadow: 0 2px 10px rgba(90, 0, 17, 0.62);
}

.gk-account-notifications-divider {
  width: 1px;
  height: 66px;
  background: linear-gradient(transparent, #f0be56, transparent);
}

.gk-account-notifications-copy {
  min-width: 0;
}

.gk-account-notifications-copy strong,
.gk-account-notifications-copy small {
  display: block;
}

.gk-account-notifications-copy strong {
  color: #ffdf78;
  font-size: 27px;
  font-weight: 900;
}

.gk-account-notifications-copy small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.6;
}

.gk-account-notifications-arrow {
  color: #ffda70;
  font-size: 45px;
  line-height: 1;
}

.gk-notification-menu-badge {
  position: absolute;
  top: -10px;
  right: -11px;
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid #ffca63;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  background: #c70035;
  box-shadow: 0 0 10px rgba(255, 183, 31, 0.55);
}

.gk-mobile-drawer-icon {
  position: relative;
}

@keyframes gk-notification-launch-glow {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 187, 26, 0.2), inset 0 1px 0 rgba(255, 239, 171, 0.18); }
  50% { box-shadow: 0 0 31px rgba(255, 187, 26, 0.58), inset 0 1px 0 rgba(255, 239, 171, 0.34); }
}

@keyframes gk-notification-shine {
  0%, 35% { left: -28%; opacity: 0; }
  48% { opacity: 1; }
  64%, 100% { left: 112%; opacity: 0; }
}

@media (max-width: 720px) {
  .gk-notifications-modal {
    place-items: start center;
    padding: max(8px, env(safe-area-inset-top)) 7px max(8px, env(safe-area-inset-bottom));
  }

  .gk-notifications-window {
    width: 100%;
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)));
    border-radius: 22px;
  }

  .gk-notifications-header {
    min-height: 120px;
    gap: 9px;
    padding: 17px 57px 13px 18px;
  }

  .gk-notifications-close {
    top: 16px;
    left: 15px;
    width: 43px;
    height: 43px;
    font-size: 37px;
  }

  .gk-notifications-hero-bell {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .gk-notifications-hero-bell svg {
    width: 60px;
    height: 60px;
  }

  .gk-notifications-hero-bell::after {
    top: 1px;
    left: 0;
    font-size: 19px;
  }

  .gk-notifications-heading h2 {
    font-size: 25px;
  }

  .gk-notifications-heading p {
    font-size: 13px;
  }

  #gkNotificationsUnreadSummary {
    min-height: 25px;
    margin-top: 6px;
    padding: 2px 9px;
    font-size: 10px;
  }

  .gk-notifications-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .gk-notifications-filters button {
    min-height: 42px;
    padding: 6px 7px;
    border-radius: 10px;
    font-size: 11px;
  }

  .gk-notifications-list {
    padding: 8px 8px 3px;
  }

  .gk-notification-card {
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
      "icon content"
      "meta content"
      "action action";
    gap: 7px 10px;
    min-height: 0;
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 14px;
  }

  .gk-notification-card.is-unread::after {
    top: 9px;
    right: 9px;
    width: 8px;
    height: 8px;
  }

  .gk-notification-icon {
    width: 48px;
    height: 48px;
  }

  .gk-notification-icon svg {
    width: 25px;
    height: 25px;
  }

  .gk-notification-meta {
    align-self: start;
    font-size: 10px;
  }

  .gk-notification-meta small {
    display: none;
  }

  .gk-notification-content h3 {
    padding-left: 7px;
    font-size: 14px;
  }

  .gk-notification-content p {
    font-size: 11px;
    line-height: 1.65;
  }

  .gk-notification-reference {
    gap: 3px 8px;
    font-size: 9px;
  }

  .gk-notification-action {
    min-height: 41px;
    font-size: 12px;
  }

  .gk-notifications-footer {
    gap: 8px;
    padding: 9px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .gk-notifications-footer button {
    min-height: 47px;
    gap: 6px;
    padding: 7px;
    border-radius: 11px;
    font-size: 11px;
  }

  .gk-account-notifications-launch {
    grid-template-columns: 60px 1px minmax(0, 1fr) 22px;
    gap: 11px;
    min-height: 102px;
    padding: 13px 14px;
  }

  .gk-account-notifications-bell {
    width: 56px;
    height: 56px;
  }

  .gk-account-notifications-bell svg {
    width: 50px;
    height: 50px;
  }

  #gkAccountNotificationsBadge {
    min-width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .gk-account-notifications-divider {
    height: 58px;
  }

  .gk-account-notifications-copy strong {
    font-size: 21px;
  }

  .gk-account-notifications-copy small {
    font-size: 12px;
  }

  .gk-account-notifications-arrow {
    font-size: 34px;
  }
}

@media (max-width: 390px) {
  .gk-notifications-header {
    padding-right: 48px;
  }

  .gk-notifications-hero-bell {
    display: none;
  }

  .gk-notifications-heading h2 {
    font-size: 23px;
  }

  .gk-account-notifications-launch {
    grid-template-columns: 51px 1px minmax(0, 1fr) 18px;
    gap: 8px;
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gk-notifications-modal,
  .gk-notifications-window,
  .gk-account-notifications-launch,
  .gk-account-notifications-launch::before {
    animation: none !important;
    transition: none !important;
  }
}
