/* ===================================
   NOTIFICATION BELL - Civic Blueprint (UF-7)
   Header bell + dropdown on every public page.
   Extends design-system tokens; no new palette.
   =================================== */

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

.notif-bell {
  position: relative;
}

.notif-bell-unread {
  color: var(--c-text);
}

/* Unread count - mono, accent-on-void, ringed to lift off the blurred nav */
.notif-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--c-depth);
  pointer-events: none;
}

/* ===================================
   Dropdown panel
   =================================== */

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  background: var(--c-depth);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: var(--z-dropdown);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.notif-panel-open {
  opacity: 1;
  transform: translateY(0);
}

.notif-panel-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--c-border);
}

/* Signature convergence glow line (nav::after motif, quieter) */
.notif-panel-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--c-accent);
  opacity: 0.35;
}

.notif-panel-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.notif-mark-all {
  background: transparent;
  border: none;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  color: var(--c-accent);
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-align: right;
}

.notif-mark-all:hover {
  background: var(--c-accent-soft);
}

.notif-mark-all:disabled {
  opacity: 0.5;
  cursor: default;
}

.notif-mark-all:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ===================================
   List
   =================================== */

.notif-list {
  max-height: min(420px, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: none;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: background var(--duration-fast) var(--ease-out);
}

.notif-item + .notif-item {
  border-top: 1px solid var(--c-border);
}

.notif-item:hover {
  background: var(--c-surface-glow);
}

.notif-item:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: -2px;
}

.notif-item-unread {
  background: var(--c-accent-soft);
}

.notif-item-unread:hover {
  background: var(--c-surface-glow);
}

.notif-item-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: transparent;
}

.notif-item-unread .notif-item-dot {
  background: var(--c-accent);
}

.notif-item-text {
  min-width: 0;
}

.notif-item-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text-soft);
  line-height: 1.4;
}

.notif-item-unread .notif-item-title {
  font-weight: 600;
  color: var(--c-text);
}

.notif-item-body {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  line-height: 1.5;
}

.notif-item-time {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}

.notif-empty {
  padding: var(--space-6) var(--space-4);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ===================================
   Small screens: pin under the nav bar
   =================================== */

@media (max-width: 480px) {
  .notif-panel {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    width: auto;
  }
}

/* Touch-target minimums (mobile-audit convention) */
@media (pointer: coarse), (max-width: 768px) {
  .notif-mark-all {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
