/* ===== Notification bell & dropdown ===== */

.notif-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  font-size: 1.2rem;
  line-height: 1;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
}

.notif-badge {
  background: var(--rose-deep, #e295a8);
  color: var(--on-accent, #5a2c38);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.15em;
  padding: 0.05em 0.35em;
  line-height: 1.2;
  text-align: center;
}

.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 290px;
  max-width: 370px;
  background: var(--card, #fdf5e6);
  border: 2.5px solid var(--wood-dark, #987255);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(111, 79, 51, 0.18);
  z-index: 200;
  overflow: hidden;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-bottom: 1.5px solid var(--line, #e3cda6);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink, #6e5946);
}

.notif-dropdown-header button,
.notif-dropdown-header a {
  font-size: 0.78rem;
  color: var(--ink-soft, #a08a73);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.notif-dropdown-header button:hover,
.notif-dropdown-header a:hover {
  color: var(--rose-ink, #b56b7d);
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line, #e3cda6);
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--ink, #6e5946);
  transition: background 0.1s;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--parch-2, #f8ecd5);
  color: var(--rose-ink, #b56b7d);
}

.notif-item--unread {
  background: var(--butter, #f7e6b8);
}

.notif-item--unread:hover {
  background: var(--tab, #f8ecd2);
}

.notif-item--unread .notif-dot {
  width: 8px;
  height: 8px;
  background: var(--rose-deep, #e295a8);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35em;
}

.notif-item--read .notif-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.notif-item-msg {
  flex: 1;
  line-height: 1.35;
}

.notif-item-time {
  font-size: 0.73rem;
  /* --ink-soft, not --ink-faint (1.7:1). On the butter unread row even --ink-soft dips
     under AA, so unread rows use --ink (tests_contrast.py). */
  color: var(--ink-soft, #7a6753);
  margin-top: 0.15em;
  white-space: nowrap;
}

.notif-item--unread .notif-item-time {
  color: var(--ink, #6e5946);
}

.notif-empty {
  padding: 1rem 0.85rem;
  text-align: center;
  color: var(--ink-soft, #a08a73);
  font-size: 0.84rem;
}

.notif-dropdown-footer {
  padding: 0.5rem 0.85rem;
  border-top: 1.5px solid var(--line, #e3cda6);
  text-align: center;
}

.notif-dropdown-footer a {
  font-size: 0.82rem;
  color: var(--ink-soft, #a08a73);
  text-decoration: none;
  font-weight: 600;
}

.notif-dropdown-footer a:hover {
  color: var(--rose-ink, #b56b7d);
}

/* ===== Mod queue red glow ===== */

.queue-link--alert {
  color: #e53e3e !important;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(229, 62, 62, 0.4);
}

/* ===== Notifications page ===== */

.notif-page-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.notif-page-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--line, #e3cda6);
  background: var(--card, #fdf5e6);
}

.notif-page-item--unread {
  background: var(--butter, #f7e6b8);
  border-color: var(--tab-line, #e0c79c);
}

.notif-page-item--unread .notif-dot {
  background: var(--rose-deep, #e295a8);
}

.notif-page-item__body {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.notif-page-item__message {
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink, #6e5946);
}

.notif-page-item__message a {
  color: var(--accent-dark, #b56b7d);
  font-weight: 600;
}

.notif-page-item__meta {
  font-size: 0.78rem;
  color: var(--ink-faint, #c2af98);
  margin-top: 0.2em;
}

.notif-page-item__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notif-mark-read-btn {
  background: none;
  border: 1.5px solid var(--line, #e3cda6);
  cursor: pointer;
  color: var(--ink-soft, #a08a73);
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
}

.notif-mark-read-btn:hover {
  background: var(--parch-2, #f8ecd5);
  color: var(--rose-ink, #b56b7d);
  border-color: var(--tab-line, #e0c79c);
}

.notif-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 680px;
  margin: 0 auto 1rem;
}

.notif-mark-all-form button {
  font-size: 0.82rem;
  color: var(--ink-soft, #a08a73);
  background: none;
  border: 1.5px solid var(--line, #e3cda6);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

.notif-mark-all-form button:hover {
  background: var(--parch-2, #f8ecd5);
  color: var(--rose-ink, #b56b7d);
  border-color: var(--tab-line, #e0c79c);
}

/* ===== Mobile responsive ===== */

@media (max-width: 660px) {
  /* The bell stays on the nav plank beside "☰ Menu" (it is not folded into the menu);
     its dropdown spans the plank, anchored to .tabs, so it never runs off the screen. */
  .notif-bell-wrap {
    position: static;
  }

  .notif-dropdown {
    left: 8px;
    right: 8px;
    min-width: 0;
    max-width: none;
    border-radius: 10px;
  }
}
