/* public/css/notifications.css — Notification bell + dropdown + page styles.
   Reuses dark-mode tokens from public/css/style.css. */

.notif-bell-wrap {
  position: fixed;
  top: 14px;
  right: 70px;
  z-index: 1100;
}

.notif-bell {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: var(--silver, #c5c5d6);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.notif-bell:hover,
.notif-bell:focus {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  outline: none;
}
.notif-bell[aria-expanded="true"] {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.6);
  color: #fff;
}
.notif-bell-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  box-shadow: 0 0 0 2px #0c0c14;
}
.notif-badge[hidden] { display: none; }

.notif-bell-wrap > .notif-bell { position: relative; }

.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 360px;
  max-width: 95vw;
  background: var(--surface-2, #13141c);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 1100;
  overflow: hidden;
}
.notif-dropdown[hidden] { display: none; }

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.02);
}
.notif-dropdown-count {
  color: var(--silver, #c5c5d6);
  font-size: 0.75rem;
  font-weight: 500;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
}

.notif-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.notif-item:last-child { border-bottom: none; }

.notif-item-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--silver, #c5c5d6);
  transition: background 0.15s ease;
}
.notif-item-link:hover,
.notif-item-link:focus { background: rgba(139, 92, 246, 0.1); outline: none; }

.notif-item.unread .notif-item-link::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8B5CF6;
  flex-shrink: 0;
  margin-top: 8px;
  align-self: flex-start;
  order: -1;
}

.notif-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(255, 255, 255, 0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: #fff;
  font-weight: 700;
}
.notif-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.notif-avatar-letter {
  font-size: 0.95rem;
  color: #fff;
}

.notif-body {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.notif-snippet {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.notif-item.unread .notif-snippet { color: #fff; }
.notif-item:not(.unread) .notif-snippet { color: var(--silver, #c5c5d6); font-weight: 500; }
.notif-time {
  color: var(--muted, #6c6c80);
  font-size: 0.75rem;
  margin-top: 3px;
}

.notif-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--muted, #6c6c80);
  font-size: 0.85rem;
  list-style: none;
}

.notif-see-all {
  display: block;
  text-align: center;
  padding: 12px;
  text-decoration: none;
  color: #8B5CF6;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.08);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  transition: background 0.15s ease;
}
.notif-see-all:hover { background: rgba(139, 92, 246, 0.18); color: #fff; }

/* ─── Full /notifications page ─────────────────────────── */

.notif-page {
  max-width: 720px;
  margin: 32px auto 64px;
  padding: 0 20px;
  color: var(--silver, #c5c5d6);
}
.notif-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.notif-page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}
.notif-page-subtitle {
  color: var(--muted, #6c6c80);
  font-size: 0.85rem;
  margin-top: 4px;
}

.notif-page-list {
  background: var(--surface-2, #13141c);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  overflow: hidden;
}
.notif-page-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: var(--silver, #c5c5d6);
  transition: background 0.15s ease;
}
.notif-page-item:hover {
  background: rgba(139, 92, 246, 0.08);
}
.notif-page-item:last-child { border-bottom: none; }
.notif-page-item.unread { background: rgba(139, 92, 246, 0.04); }

.notif-page-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(255, 255, 255, 0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.notif-page-avatar img { width: 100%; height: 100%; object-fit: cover; }

.notif-page-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted, #6c6c80);
}
.notif-page-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.notif-page-empty h4 { color: #fff; margin: 0 0 8px; font-size: 1.1rem; }
.notif-page-empty p { margin: 0; font-size: 0.9rem; }

.notif-page-mark-all {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.notif-page-mark-all:hover { background: rgba(139, 92, 246, 0.35); }

/* ─── Mobile ────────────────────────────────────────────── */

@media (max-width: 640px) {
  .notif-bell-wrap {
    top: 10px;
    right: 56px;
  }
  .notif-bell { width: 36px; height: 36px; }
  .notif-dropdown {
    right: -52px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
  .notif-page {
    margin: 16px auto 48px;
    padding: 0 12px;
  }
}
