/* ============================================
   SHARED COMPONENTS
   Will be expanded as we build more features
   ============================================ */

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Selection */
::selection {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Skeleton loading animation */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   PROPERTY DETAIL MODAL (Step 5)
   ============================================ */

.modal-card-wide {
  max-width: 720px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-close-floating {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  color: var(--gray-700);
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  transition: background 0.15s;
}

.modal-close-floating:hover {
  background: var(--surface);
  color: var(--gray-900);
}

/* Photo viewer */
.modal-photo-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--gray-100);
  overflow: hidden;
  flex-shrink: 0;
}

.modal-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--gray-400);
  font-size: 0.9rem;
}

.modal-photo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  color: var(--gray-800);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, transform 0.1s;
}

.modal-photo-arrow:hover {
  background: var(--surface);
  transform: translateY(-50%) scale(1.05);
}

.modal-photo-arrow:active {
  transform: translateY(-50%) scale(0.97);
}

.modal-photo-prev { left: 12px; }
.modal-photo-next { right: 12px; }

.modal-photo-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Scrollable body */
.modal-body-scroll {
  overflow-y: auto;
  padding: 20px 24px 24px;
  flex: 1;
}

/* Address row */
.modal-address-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.modal-address {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.modal-address-sub {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.modal-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge-payment-type {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* Pricing preference badges (open / firm / flex) — three tones so the
   reader can tell at a glance whether they're authorized to adjust the
   asking price. Soft slate for "Price for me" (default — neutral team
   ownership), red-ish for "Firm" (don't touch), green-ish for "Suggested
   — flex" (team may adjust). */
.badge-pricing-open {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-pricing-firm {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-pricing-flex {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-bg);
}

/* 2026-05-31 review #2 — starting/reduced price state chip on the modal */
.badge-price-state-neutral {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.badge-price-state-green {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-bg);
}
.badge-price-state-red {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

/* 2026-05-31 review #2 — lockbox code chip in the modal status row.
   Subtle slate so it sits alongside the status badges without competing. */
.badge-lockbox-chip {
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Price history block — vertical timeline, one entry per row.
   Initial entry first (oldest at top). */
.modal-price-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-price-history-item {
  display: grid;
  grid-template-columns: 130px 100px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 0.85rem;
  padding: 6px 10px;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 6px;
  background: var(--surface, #fff);
}

.modal-price-history-label {
  font-weight: 600;
  color: var(--gray-700, #334155);
}

.modal-price-history-when {
  color: var(--gray-500, #64748b);
  font-size: 0.78rem;
}

.modal-price-history-prices {
  color: var(--gray-900, #0f172a);
}

.modal-price-history-reason {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--gray-500, #64748b);
  font-style: italic;
}

@media (max-width: 600px) {
  .modal-price-history-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Price block inside modal */
.modal-price {
  font-size: 1rem;
  margin: 8px 0 16px;
}

/* Quick-actions row inside the property detail modal — small buttons
   that mirror the card's actions (currently just Copy for ad). Sits
   between the price and the stats row. */
.modal-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}

/* Stats row */
.modal-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 20px;
}

.modal-stat {
  font-size: 0.88rem;
  color: var(--gray-600);
}

.modal-stat strong {
  color: var(--gray-900);
  font-weight: 600;
}

/* Insurance line shown directly under the price when PITI is captured.
   Smaller + muted to read as a clarifying parenthetical, not a primary
   line. */
.modal-insurance-line {
  font-size: 0.82rem;
  color: var(--gray-600);
  margin: -10px 0 16px;
}

/* Illinois Requirements section in the property detail modal.
   Soft-red panel so the compliance language reads as deliberately
   serious — matches the lifecycle diagram's IL panel tone. */
.modal-il-section {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.modal-il-rule {
  font-size: 0.85rem;
  color: #7a2a2a;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--danger-border);
}

.modal-il-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-il-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 0.84rem;
  padding: 3px 0;
}

.modal-il-label {
  color: #7a2a2a;
  font-weight: 600;
}

.modal-il-value {
  color: var(--gray-900, #0f172a);
  word-break: break-word;
}

.modal-il-value a {
  color: var(--danger-text);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .modal-il-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Feature chips (parking, yard, garage, etc.) shown when any of the
   parking / yard intake fields are set on a property. */
.modal-feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.modal-feature-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gray-100, #f1f5f9);
  color: var(--gray-700, #334155);
  border: 1px solid var(--gray-200, #e2e8f0);
}

/* 2026-05-31: labeled feature row so "Driveway · Street only" doesn't
   float untagged. Lays out a small caps label + chips inline. */
.modal-feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.modal-feature-row:last-child {
  margin-bottom: 0;
}
.modal-feature-row-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500, #6b7280);
  min-width: 60px;
}

/* 2026-05-31: filler-commission section. Subtle gray for standard 50%,
   amber-tinted for non-standard so it grabs attention. */
.commission-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid;
}
.commission-standard {
  background: var(--surface-muted, #f8fafc);
  border-color: var(--border-subtle, #e5e7eb);
  color: var(--text-primary, #111827);
}
.commission-special {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning-text);
}
.commission-icon { font-size: 22px; }
.commission-body { flex: 1; }
.commission-headline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 1rem;
}
.commission-headline strong {
  font-size: 1.15rem;
  font-weight: 700;
}
.commission-label {
  font-size: 0.85rem;
  color: inherit;
  opacity: 0.85;
}
.commission-notes {
  margin-top: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
}
.commission-bonus {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-bg);
}
.commission-bonus-expired {
  background: var(--surface-muted, #f8fafc);
  color: var(--text-muted, #6b7280);
  border-color: var(--border-subtle, #e5e7eb);
}
.commission-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
}
.commission-hint-special {
  color: var(--warning-text);
  font-weight: 500;
}

/* Sections */
.modal-section {
  margin-bottom: 22px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.modal-notes {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.modal-lockbox {
  font-size: 0.95rem;
  color: var(--gray-800);
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

/* Subtle reminder under the lockbox value — non-front-door lockboxes are
   the most common showings-fail; this nudges agents to scan for the
   location string in the field above. Pairs with the new
   "Lockbox location" capture on seller + filler request flows. */
.lockbox-location-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--gray-500, #6b7280);
  line-height: 1.4;
}

/* Seller contact */
.seller-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 20px;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}

.seller-contact-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}

.field-value {
  font-size: 0.92rem;
  color: var(--gray-800);
  word-break: break-word;
}

.field-link {
  color: var(--brand-primary);
  text-decoration: none;
}

.field-link:hover {
  text-decoration: underline;
}

/* Activity feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.activity-feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  margin-top: 7px;
  flex-shrink: 0;
}

.activity-feed-body {
  flex: 1;
  min-width: 0;
}

.activity-feed-body p {
  font-size: 0.88rem;
  color: var(--gray-700);
  margin: 0;
  line-height: 1.45;
}

.activity-feed-time {
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* Responsive */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0;
  }

  .modal-card-wide {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-photo-viewer {
    aspect-ratio: 4 / 3;
  }

  .modal-address-row {
    flex-direction: column;
  }

  .modal-badges {
    justify-content: flex-start;
  }

  .modal-address {
    font-size: 1.1rem;
  }
}

/* ============================================
   PUBLIC BUYER DETAIL MODAL (2026-05-23)
   Opened when an unauthenticated visitor clicks a property card on the
   public site. Photo gallery + property info + "I'm Interested" CTA.
   ============================================ */

.public-detail-card {
  max-width: 720px;
  width: 95vw;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--surface, #ffffff);
  border-radius: 12px;
  position: relative;
}

/* ----- Gallery (hero) ----- */
.public-detail-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gallery-letterbox, #1e293b); /* photo letterbox — intentionally dark in both themes (Phase 2: was --surface-alt, which is now a LIGHT secondary surface) */
  flex-shrink: 0;
  overflow: hidden;
}

.public-detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.public-detail-gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted, #94a3b8);
  font-size: 14px;
}

.public-detail-gallery-empty .hero-fallback-icon {
  font-size: 48px;
  opacity: 0.5;
}

/* Prev / Next chevrons */
.public-detail-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.public-detail-nav:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-50%) scale(1.05);
}

.public-detail-nav-prev { left: 12px; padding-bottom: 4px; }
.public-detail-nav-next { right: 12px; padding-bottom: 4px; }

/* Photo counter (top-right) */
.public-detail-photo-counter {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
}

/* Dot indicators (bottom) — small markers for each photo */
.public-detail-photo-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
}

.public-detail-photo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.public-detail-photo-dot.is-active {
  background: var(--surface);
  transform: scale(1.2);
}

.public-detail-photo-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* ----- Body ----- */
.public-detail-body {
  padding: 20px 24px 12px;
  overflow-y: auto;
  flex: 1;
}

.public-detail-address {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.public-detail-location {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-muted, #64748b);
}

.public-detail-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.public-detail-price-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface-alt, #f1f5f9);
  border-radius: 8px;
}

.public-detail-price-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
}

.public-detail-price-amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #0f172a);
  font-variant-numeric: tabular-nums;
}

.public-detail-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--text, #0f172a);
  padding: 12px 0;
  border-top: 1px solid var(--border, #e2e8f0);
  border-bottom: 1px solid var(--border, #e2e8f0);
  margin-bottom: 16px;
}

.public-detail-stats strong {
  font-weight: 700;
}

.public-detail-features {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.public-detail-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text, #334155);
  background: var(--surface-alt, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  padding: 4px 10px;
  border-radius: 999px;
}

.public-detail-notes h4 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #64748b);
}

.public-detail-notes p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text, #0f172a);
  white-space: pre-wrap;
}

/* ----- Footer with sticky CTA ----- */
.public-detail-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #ffffff);
}

.public-detail-footer .interest-btn {
  width: 100%;
  padding: 12px 20px;
  background: var(--brand-accent, #fbbf24);
  color: var(--brand-text, #0f172a);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.public-detail-footer .interest-btn:hover {
  background: var(--brand-accent-hover, #f59e0b);
}

/* Responsive: stack pricing on narrow screens */
@media (max-width: 600px) {
  .public-detail-pricing {
    grid-template-columns: 1fr;
  }
  .public-detail-body {
    padding: 16px 18px 10px;
  }
  .public-detail-footer {
    padding: 12px 18px;
  }
  .public-detail-address {
    font-size: 19px;
  }
}

/* ============================================
   NotificationsCenter — top-nav bell dropdown
   Shipped 2026-06-03. The bell button (#notif-btn)
   and badge (#notif-badge) styles live in main.css
   (.nav-icon-btn / .notif-badge); this block covers
   the dropdown panel that mounts next to the bell.
   ============================================ */

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 80px; /* sits to the left of the avatar menu */
  width: 360px;
  max-height: 480px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  background: var(--gray-50, #f9fafb);
}

.notif-dropdown-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-900, #111827);
}

.notif-mark-all-btn {
  background: transparent;
  border: none;
  color: var(--blue, #2563eb);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.12s;
}
.notif-mark-all-btn:hover { background: var(--gray-100, #f3f4f6); }

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

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--gray-500, #6b7280);
}
.notif-empty-icon { font-size: 28px; margin-bottom: 6px; }
.notif-empty-text { font-size: 13px; }

.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--gray-50, #f9fafb); }

.notif-row.is-unread {
  background: rgba(37, 99, 235, 0.04);
}
.notif-row.is-unread:hover {
  background: rgba(37, 99, 235, 0.08);
}

.notif-row-icon {
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

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

.notif-row-msg {
  font-size: 13px;
  color: var(--gray-900, #111827);
  line-height: 1.4;
  word-wrap: break-word;
}

.notif-row-meta {
  font-size: 11px;
  color: var(--gray-500, #6b7280);
  margin-top: 3px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.notif-row-addr { font-weight: 500; }

.notif-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue, #2563eb);
  flex-shrink: 0;
  margin-top: 6px;
}

/* Read rows fade a touch so unread stand out without being shouty */
.notif-row.is-read .notif-row-msg { color: var(--gray-700, #374151); }
.notif-row.is-read .notif-row-icon { opacity: 0.6; }

/* Dark theme overrides — match the rest of the app's dark surfaces */
html[data-theme="dark"] .notif-dropdown {
  background: var(--surface);
  border-color: var(--gray-200);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .notif-row.is-unread { background: rgba(96, 165, 250, 0.08); }
html[data-theme="dark"] .notif-row.is-unread:hover { background: rgba(96, 165, 250, 0.14); }
html[data-theme="dark"] .notif-row:hover { background: var(--gray-100); }

/* Mobile — anchor to right edge with some inset, full-width row content */
@media (max-width: 600px) {
  .notif-dropdown {
    right: 8px;
    width: calc(100vw - 16px);
    max-width: 360px;
  }
}

/* ============================================
   STATUS BADGES / CHIPS / BANNERS — Phase 2 of the 2026-06-06 visual
   accessibility audit. THE single source of truth for status pills.
   Token-driven, so they pass WCAG in both themes automatically.

   Replaces ad-hoc patterns like:
     style="background:#dcfce7;color:#166534;..."   → class="badge badge--success"
     style="background:#fef3c7;color:#92400e;..."   → class="badge badge--warning"
     style="background:#dbeafe;color:#1e40af;..."   → class="chip chip--info"
   Use .badge for uppercase status labels, .chip for inline metadata
   pills (normal case), .banner for full-width notice strips.
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--success { background: var(--success-bg); color: var(--success-text); }
.badge--warning { background: var(--warning-bg); color: var(--warning-text); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger-text); border-color: var(--danger-border); }
.badge--info    { background: var(--info-bg);    color: var(--info-text); }
.badge--neutral { background: var(--surface-alt); color: var(--text-secondary); }
.badge--brand   { background: var(--brand-primary-light); color: var(--active-text); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip--success { background: var(--success-bg); color: var(--success-text); }
.chip--warning { background: var(--warning-bg); color: var(--warning-text); }
.chip--danger  { background: var(--danger-bg);  color: var(--danger-text); }
.chip--info    { background: var(--info-bg);    color: var(--info-text); }
.chip--neutral { background: var(--surface-alt); color: var(--text-secondary); }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: var(--surface-alt);
}
.banner--success { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
.banner--warning { background: var(--warning-bg); color: var(--warning-text); border-color: transparent; }
.banner--danger  { background: var(--danger-bg);  color: var(--danger-text);  border-color: var(--danger-border); }
.banner--info    { background: var(--info-bg);    color: var(--info-text);    border-color: transparent; }

/* Status text (no pill) — use instead of var(--green)/--red/--yellow
   as text colors, which fail contrast on dark cards. */
.text-success { color: var(--success-solid); }
.text-warning { color: var(--warning-text); }
.text-danger  { color: var(--danger-text); }
.text-info    { color: var(--info-solid); }
