/* ===== NOTIFICATIONS PAGE ===== */
.notif-page {
  min-height: 100vh;
  background: var(--gradient-page);
  display: flex;
  flex-direction: column;
}

.notif-wrapper {
  flex: 1;
  padding: calc(var(--nav-height) + 32px) 24px 60px;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.notif-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.notif-header__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 28px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.notif-header__subtitle {
  font-size: 14px;
  color: var(--text-body);
}

.btn-mark-read {
  padding: 10px 24px;
  background: var(--white);
  border: 1.5px solid #E6EAF1;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-mark-read:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
  box-shadow: 0 2px 8px rgba(30,58,138,0.12);
}

/* Search */
.notif-search {
  position: relative;
  margin-bottom: 20px;
}

.notif-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: #8A93A4;
  pointer-events: none;
}

.notif-search input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1.5px solid #E6EAF1;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  background: var(--white);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.notif-search input::placeholder {
  color: #8A93A4;
}

.notif-search input:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.12);
}

/* Filter tabs */
.notif-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 20px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  background: var(--white);
  border: 1.5px solid #E6EAF1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tab:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
}

.filter-tab.active {
  background: var(--green-primary);
  color: var(--white);
  border-color: var(--green-primary);
}

.filter-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  background: rgba(0,0,0,0.08);
  color: inherit;
}

.filter-tab.active .filter-tab__count {
  background: rgba(255,255,255,0.25);
}

/* Notification cards */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notif-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px 28px;
  border: 1.5px solid rgba(30,58,138,0.1);
  /* Vertical colored indicator bar on the left = notification category */
  border-left: 5px solid var(--cat, #cbd5e1);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease-out both;
}

.notif-card:nth-child(1) { animation-delay: 0.05s; }
.notif-card:nth-child(2) { animation-delay: 0.1s; }
.notif-card:nth-child(3) { animation-delay: 0.15s; }
.notif-card:nth-child(4) { animation-delay: 0.2s; }
.notif-card:nth-child(5) { animation-delay: 0.25s; }
.notif-card:nth-child(6) { animation-delay: 0.3s; }
.notif-card:nth-child(7) { animation-delay: 0.35s; }
.notif-card:nth-child(8) { animation-delay: 0.4s; }

.notif-card:hover {
  border-color: rgba(30,58,138,0.25);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.notif-card.unread {
  border: 2px solid var(--cat);
  border-left-width: 7px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
}

.notif-card.unread:hover {
  border-color: var(--cat);
}

.notif-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notif-card__content {
  flex: 1;
  min-width: 0;
}

.notif-card__title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.notif-card__text {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

/* Clicking the message expands it to show the full notification content. */
.notif-card__text.expanded {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

.notif-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.notif-card__time {
  font-size: 12px;
  color: #8A93A4;
  font-weight: 500;
}

.notif-card__action {
  padding: 8px 20px;
  border: 1.5px solid var(--green-primary);
  border-radius: 8px;
  background: var(--white);
  color: var(--green-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  align-self: center;
}

.notif-card__action:hover {
  background: var(--green-primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(30,58,138,0.25);
}

/* Read / Unread toggle — secondary (muted) so the primary action stands out. */
.notif-card__action--toggle {
  padding: 8px 14px;
  border-color: #cbd5e0;
  color: var(--text-body);
}
.notif-card__action--toggle:hover {
  background: #4a5568;
  border-color: #4a5568;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(74,85,104,0.2);
}

/* Empty state */
.notif-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-body);
}

.notif-empty svg {
  width: 64px;
  height: 64px;
  fill: #E6EAF1;
  margin-bottom: 16px;
}

.notif-empty__title {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.notif-empty__text {
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .notif-header {
    flex-direction: column;
    gap: 12px;
  }
  .notif-card {
    padding: 18px 20px;
  }
  .notif-card__top {
    flex-direction: column;
    gap: 12px;
  }
  .notif-card__action {
    align-self: flex-start;
  }
  .notif-filters {
    gap: 8px;
  }
  .filter-tab {
    padding: 6px 14px;
    font-size: 12px;
  }
}

/* ============================================================
   NOTIFICATION CATEGORY — icons, label badge, unread dot
   (colors come from per-element --cat / --cat-ink custom props)
   ============================================================ */
.notif-card__cat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.notif-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--cat-ink, var(--cat, #475569));
  background: color-mix(in srgb, var(--cat, #94a3b8) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--cat, #94a3b8) 28%, #fff);
}
.notif-cat-badge__label { line-height: 1; }
.notif-cat-ic {
  flex-shrink: 0;
  fill: var(--cat-ink, var(--cat, currentColor));
}
.notif-cat-badge .notif-cat-ic { fill: var(--cat-ink, var(--cat, currentColor)); }

/* Unread indicator dot (background of the card stays unchanged) */
.notif-unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cat, var(--green-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat, #1E3A8A) 18%, transparent);
  flex-shrink: 0;
}

/* ============================================================
   CATEGORY-COLORED FILTER TABS (hover + active preserve color)
   ============================================================ */
.filter-tab .notif-cat-ic { width: 15px; height: 15px; fill: currentColor; }
/* tabs that carry a category color (everything except "All") */
.filter-tab[style*="--cat"] { color: var(--cat-ink, var(--text-body)); }
.filter-tab[style*="--cat"] .notif-cat-ic { fill: var(--cat-ink, currentColor); }
.filter-tab[style*="--cat"]:hover {
  border-color: var(--cat);
  color: var(--cat-ink);
  background: color-mix(in srgb, var(--cat) 10%, #fff);
}
.filter-tab[style*="--cat"]:hover .notif-cat-ic { fill: var(--cat-ink); }
.filter-tab[style*="--cat"].active {
  background: var(--cat);
  border-color: var(--cat);
  color: var(--cat-actink, #fff);
}
.filter-tab[style*="--cat"].active .notif-cat-ic { fill: var(--cat-actink, #fff); }
.filter-tab[style*="--cat"].active .filter-tab__count {
  background: color-mix(in srgb, var(--cat-actink, #fff) 25%, transparent);
}
/* focus-visible for accessibility */
.filter-tab:focus-visible {
  outline: 2px solid var(--cat, var(--green-primary));
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .notif-cat-badge { font-size: 10.5px; padding: 2px 8px 2px 6px; }
}
