/*
 * Inbox overlay styling.
 *
 * Drives the bottom mobile overlay (2-tab Notifications + Live now) and
 * everything inside it: tabs, filter chips, day group headers, compact
 * rows, promo cards, skeleton loaders, empty states, footer.
 *
 * Animation contract:
 *   - Overlay slide-up: 240ms cubic-bezier(0.16, 1, 0.3, 1) on `.is-open`.
 *   - Tab content crossfade: 150ms ease via `.is-entering` / `.is-leaving`.
 *   - Skeleton shimmer: 1.4s linear infinite background-position animation.
 *
 * All animations use transform / opacity so they hit the GPU and stay
 * smooth on low-end mobile devices. No JS-driven animation.
 */

/* ───────────────────────────────────────────────────────────────────────────
   Container + slide-up
─────────────────────────────────────────────────────────────────────────── */

.inbox-overlay {
  /* Override legacy `.notification-popup` positioning that's still on the
     same element via the compat class. The legacy CSS sets top:0 which
     would anchor the overlay to the TOP of the viewport and leave a
     visible gap above the sticky menu — we explicitly reset it here. */
  position: fixed !important;
  top: auto !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11000;

  display: flex;
  flex-direction: column;
  /* Fixed sheet height: the overlay must keep the exact same size no
     matter which tab is active or how much content it holds — switching
     between Notifications and Live used to resize the whole sheet.
     Content scrolls inside the panel instead. */
  height: min(72dvh, 720px);
  max-height: 88dvh;
  min-height: 320px;
  overflow: hidden;

  background: #ffffff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.18);

  /* Slide-up + fade. Default off-screen so it's "hidden" without display:none
     (so the MutationObserver in inbox-overlay.js can pick up class changes). */
  transform: translate3d(0, 100%, 0) !important;
  opacity: 0;
  visibility: hidden;
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 200ms ease,
    visibility 0s linear 240ms;
}

.inbox-overlay.is-open {
  transform: translate3d(0, 0, 0) !important;
}

.inbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 200ms ease,
    visibility 0s linear 0s;
}

/* The dialog container receives programmatic focus on open (tabindex=-1)
   — no outline on the sheet itself. The close button only shows a ring
   for keyboard focus, never after a tap or script focus (iOS Safari
   painted a UA ring around the X on every open). */
.inbox-overlay:focus {
  outline: none;
}

.inbox-overlay__close:focus {
  outline: none;
}

.inbox-overlay__close:focus-visible {
  outline: 2px solid var(--brand-primary, #f97316);
  outline-offset: 2px;
}

/* Header notification bell — the legacy CSS only shows the bell on
   mobile (max-width: 768px). Now that the overlay also opens via the
   bell on desktop (with the sticky-menu trigger absent), we promote it
   to a visible button across ALL viewports for authenticated users. The
   blade-side @auth + onboarding guard handles when to render the button
   at all. */
.notification-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Tablet + desktop (≥768px): full-height right-side drawer.
   One consistent surface on every viewport above mobile: anchored
   top + bottom + right, slides in from the right edge. Full viewport
   height means zero wasted space — the list gets all the real estate
   for promo cards, day group headers and the footer. (An earlier
   ≥1024px floating popover variant was retired: its fixed 600px height
   left a large dead zone under short lists.) */
@media (min-width: 768px) {
  .inbox-overlay {
    left: auto !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 480px;
    max-width: 92vw;
    /* Drawer stretches between top:0 and bottom:0 — release the fixed
       mobile sheet height so the anchors control the size. */
    height: auto;
    max-height: none;
    border-radius: 0;
    border-left: 1px solid #e2e8f0;
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.18);
    transform: translate3d(100%, 0, 0) !important;
  }

  .inbox-overlay.is-open {
    transform: translate3d(0, 0, 0) !important;
  }
}

/* Backdrop for the overlay. Injected by JS as a sibling element to avoid
   tap-through. CSS-only fade. */
.inbox-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1099;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 200ms ease,
    visibility 0s linear 200ms;
}

.inbox-overlay-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease, visibility 0s linear 0s;
}

/* ───────────────────────────────────────────────────────────────────────────
   Header + tabs
─────────────────────────────────────────────────────────────────────────── */

.inbox-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
  border-bottom: 1px solid #eef0f3;
  background: #ffffff;
}

@media (min-width: 768px) {
  .inbox-overlay__header { padding: 20px 24px 0; }
}

.inbox-overlay__tabs {
  display: inline-flex;
  gap: 4px;
  position: relative;
}

.inbox-overlay__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  position: relative;
  border-radius: 8px 8px 0 0;
  transition: color 150ms ease, background 150ms ease;
  white-space: nowrap;
}

.inbox-overlay__tab:hover {
  color: #0f172a;
  background: #f8fafc;
}

.inbox-overlay__tab.is-active {
  color: #0f172a;
  background: #fff7ed;
}

/* Active tab accent: 3px brand-color bottom bar. Uses a pseudo so the
   underline can extend past the rounded top corners cleanly. */
.inbox-overlay__tab.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--brand-primary, #f97316);
}

.inbox-overlay__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.inbox-overlay__tab-count.is-active {
  background: var(--brand-primary, #f97316);
  color: #ffffff;
}

.inbox-overlay__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inbox-overlay__mark-all {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
  /* Tight header layout (tabs + counts + close X) leaves little room
     for a multi-word label — keep it on a single line. The label is
     also intentionally short ("Read all") to free up horizontal space. */
  white-space: nowrap;
}

.inbox-overlay__mark-all:hover {
  color: var(--brand-primary, #f97316);
  background: #fff7ed;
}

.inbox-overlay__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  transition: color 150ms ease, background 150ms ease;
}

.inbox-overlay__close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* ───────────────────────────────────────────────────────────────────────────
   Filter chips
─────────────────────────────────────────────────────────────────────────── */

.inbox-overlay__chips {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

@media (min-width: 768px) {
  /* No touch to swipe and the scrollbar is hidden, so a horizontal
     scroller would leave the last chips (Reviews, Conversation)
     unreachable on desktop — wrap them onto extra lines instead. */
  .inbox-overlay__chips {
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 14px 24px;
    row-gap: 8px;
  }
}

.inbox-overlay__chips::-webkit-scrollbar {
  display: none;
}

.inbox-overlay__chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    transform 100ms ease;
}

.inbox-overlay__chip:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.inbox-overlay__chip:active {
  transform: scale(0.97);
}

.inbox-overlay__chip.is-active {
  border-color: var(--brand-primary, #f97316);
  background: var(--brand-primary, #f97316);
  color: #ffffff;
}

.inbox-overlay__chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-primary, #f97316);
}

.inbox-overlay__chip.is-active .inbox-overlay__chip-dot {
  background: #ffffff;
}

/* ───────────────────────────────────────────────────────────────────────────
   Tab panels + crossfade
─────────────────────────────────────────────────────────────────────────── */

.inbox-overlay__panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  /* Allow the inner list to shrink and become the scroll container
     (without min-height:0 flexbox refuses to shrink below content). */
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
  opacity: 0;
  transition: opacity 150ms ease;
}

/* The panels are toggled with the `hidden` attribute by inbox-overlay.js;
   it must keep winning over the flex display above. */
.inbox-overlay__panel[hidden] {
  display: none;
}

.inbox-overlay__panel.is-active {
  opacity: 1;
}

.inbox-overlay__panel.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.inbox-overlay__panel.is-entering {
  opacity: 1;
}

.inbox-overlay__list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* The list (not the panel) scrolls, so the filter chips stay pinned
     while scrolling through notifications. */
  overflow-y: auto;
  /* Keep list scrolling from chaining into the page behind the sheet
     (iOS rubber-banding would otherwise scroll the body underneath). */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 8px;
}

/* Every list child keeps its natural height. Without this, flex-shrink
   squashes children whose automatic minimum size is zero: .inbox-promo
   has overflow:hidden (for the sheen animation), so on a full "All" feed
   the pinned promo card collapsed to a sliver that disappeared under the
   day headers, while short filtered views (Offers chip) rendered fine. */
.inbox-overlay__list > * {
  flex-shrink: 0;
}

/* Day group headers (Today / Yesterday / Earlier). Solid background:
   rows scrolling underneath used to shine through the old gradient,
   which read as visual glitching. */
.inbox-overlay__day-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 20px 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  background: #ffffff;
  box-shadow: 0 1px 0 #f1f5f9;
}

@media (min-width: 768px) {
  .inbox-overlay__day-header { padding: 18px 24px 8px; }
}

/* ───────────────────────────────────────────────────────────────────────────
   Compact rows (social)

   48px avatar with a category badge (heart / comment / follow / …)
   overlapping the corner, bold actor name in the copy, and the unread
   dot on the RIGHT edge — the old empty 16px left gutter is gone.
─────────────────────────────────────────────────────────────────────────── */

.inbox-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease;
  border-left: 3px solid transparent;
}

@media (min-width: 768px) {
  .inbox-row { padding: 14px 24px; }
}

.inbox-row + .inbox-row {
  border-top: 1px solid #f8fafc;
}

.inbox-row:hover {
  background: #f8fafc;
}

.inbox-row:active {
  background: #f1f5f9;
}

.inbox-row--unread {
  background: #fff7ed;
  border-left-color: var(--brand-primary, #f97316);
}

.inbox-row--unread:hover {
  background: #ffedd5;
}

/* Unread dot — right edge, vertically centered (feed convention). */
.inbox-row__indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
}

.inbox-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-primary, #f97316);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* Avatar — 48px, no overflow clipping so the category badge can sit on
   the corner; the image itself is rounded instead. */
.inbox-row__avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inbox-row__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.inbox-row__avatar-fallback {
  font-size: 17px;
  font-weight: 700;
  color: #64748b;
}

/* Category badge on the avatar corner — tells at a glance whether the
   row is a like, comment, follow, review, … Same data-icon → glyph
   pattern as the promo card icons. */
.inbox-row__badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 1px #f1f5f9, 0 1px 3px rgba(15, 23, 42, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}

.inbox-row__badge[data-icon="user-plus"]::before { content: "👤"; }
.inbox-row__badge[data-icon="message-circle"]::before { content: "💬"; }
.inbox-row__badge[data-icon="corner-down-right"]::before { content: "💬"; }
.inbox-row__badge[data-icon="heart"]::before { content: "❤️"; }
.inbox-row__badge[data-icon="star"]::before { content: "⭐"; }
.inbox-row__badge[data-icon="shopping-bag"]::before { content: "🛍️"; }
.inbox-row__badge[data-icon="edit-3"]::before { content: "✍️"; }
.inbox-row__badge[data-icon="video"]::before { content: "🎥"; }
.inbox-row__badge[data-icon="bell"]::before { content: "🔔"; }
/* Moderation outcome badges (content status updates). */
.inbox-row__badge[data-icon="check-circle"]::before { content: "✅"; }
.inbox-row__badge[data-icon="x-circle"]::before { content: "❌"; }
.inbox-row__badge[data-icon="alert-triangle"]::before { content: "⚠️"; }
.inbox-row__badge[data-icon="shield"]::before { content: "🛡️"; }
/* Auto-published media ("live") + follower fan-out badges. */
.inbox-row__badge[data-icon="camera"]::before { content: "📸"; }
.inbox-row__badge[data-icon="sparkles"]::before { content: "✨"; }
/* Social growth pack: milestone, mention and post-recap badges. */
.inbox-row__badge[data-icon="award"]::before { content: "🏆"; }
.inbox-row__badge[data-icon="at-sign"]::before { content: "@"; font-weight: 700; color: #f97316; }
.inbox-row__badge[data-icon="flame"]::before { content: "🔥"; }

.inbox-row__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.inbox-row__copy {
  font-size: 14px;
  line-height: 1.45;
  color: #334155;
  word-break: break-word;
}

.inbox-row__copy strong {
  font-weight: 600;
  color: #0f172a;
}

.inbox-row__time {
  font-size: 12px;
  color: #94a3b8;
}

/* Personal moderator message — secondary quoted line under the copy on
   moderation.* rows (meta.reason). */
.inbox-row__note {
  font-size: 12.5px;
  line-height: 1.4;
  font-style: italic;
  color: #64748b;
  word-break: break-word;
}

/* ───────────────────────────────────────────────────────────────────────────
   Promo cards (system / growth signals)
─────────────────────────────────────────────────────────────────────────── */

.inbox-promo {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  margin: 16px 20px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffe4cc 60%, #fed7aa 100%);
  border: 1px solid #fed7aa;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .inbox-promo { margin: 16px 24px; padding: 22px; }
}

.inbox-promo--read {
  background: #ffffff;
  border-color: #e2e8f0;
}

/* Subtle sheen on the unread state. */
.inbox-promo--unread::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: inboxPromoSheen 3.6s ease-in-out 0.6s infinite;
  pointer-events: none;
}

@keyframes inboxPromoSheen {
  0%, 100% { transform: translateX(-100%); opacity: 0; }
  40% { opacity: 1; }
  60% { transform: translateX(100%); opacity: 0.4; }
}

.inbox-promo__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-primary, #f97316);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  position: relative;
}

/* Map data-icon attributes to emoji-like glyphs without requiring an icon
   font. Producers can swap to lucide later by replacing this block. */
.inbox-promo__icon[data-icon="gift"]::before { content: "🎁"; }
.inbox-promo__icon[data-icon="camera"]::before { content: "📸"; }
.inbox-promo__icon[data-icon="flame"]::before { content: "🔥"; }
.inbox-promo__icon[data-icon="users"]::before { content: "👥"; }
.inbox-promo__icon[data-icon="heart-handshake"]::before { content: "🤝"; }
.inbox-promo__icon[data-icon="map-pin"]::before { content: "📍"; }
.inbox-promo__icon[data-icon="sparkles"]::before { content: "✨"; }
.inbox-promo__icon[data-icon="award"]::before { content: "🏆"; }

.inbox-promo__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.inbox-promo__copy {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: #0f172a;
}

.inbox-promo__copy strong {
  color: #c2410c;
  font-weight: 700;
}

.inbox-promo--read .inbox-promo__copy strong {
  color: #475569;
}

/* Secondary body line — admin broadcasts (system.promo) carry their body
   copy in meta.body under the headline. */
.inbox-promo__note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: #475569;
  word-break: break-word;
}

.inbox-promo__time {
  font-size: 12px;
  color: #94a3b8;
}

/* PG-M4: claim-deadline urgency line ("Expires in 3 days"). */
.inbox-promo__deadline {
  font-size: 12px;
  font-weight: 600;
  color: #c2410c;
}

.inbox-promo--read .inbox-promo__deadline {
  color: #64748b;
}

.inbox-promo__actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.inbox-promo__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-primary, #f97316);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease, transform 100ms ease, box-shadow 150ms ease;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.25);
}

.inbox-promo__cta:hover {
  background: #ea580c;
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.32);
}

.inbox-promo__cta:active {
  transform: scale(0.97);
}

.inbox-promo__cta--claim {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.inbox-promo__claimed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
}

/* Past-deadline unclaimed bonus — muted state, no claim affordance (the
   gateway refuses expired claims). */
.inbox-promo__expired {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.inbox-promo.is-claimed {
  opacity: 0.92;
}

/* ───────────────────────────────────────────────────────────────────────────
   Live-now cards (presence)

   Richer card than the compact notification row: 56px avatar with a green
   live-ring + pulsing status badge, name/location on two lines and an
   explicit Chat CTA pill so the tap affordance is obvious.
─────────────────────────────────────────────────────────────────────────── */

.inbox-live-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease;
}

@media (min-width: 768px) {
  .inbox-live-card { padding: 14px 24px; }
}

.inbox-live-card + .inbox-live-card {
  border-top: 1px solid #f1f5f9;
}

.inbox-live-card:hover {
  background: #f8fafc;
}

.inbox-live-card:active {
  background: #f1f5f9;
}

/* Static variant — rendered for viewers without a live environment
   (office accounts): informational only, no click affordance. */
.inbox-live-card.is-static {
  cursor: default;
}

.inbox-live-card.is-static:hover,
.inbox-live-card.is-static:active {
  background: transparent;
}

/* Avatar: 56px with a green "live" ring (2px white gap + 2px green) and a
   pulsing status badge overlapping the bottom-right edge. */
.inbox-live-card__avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #22c55e;
  /* The ring is drawn with box-shadow (4px past the box) — keep it clear
     of the card edges and the neighbouring card's divider. */
  margin: 4px 4px 4px 0;
}

.inbox-live-card__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.inbox-live-card__avatar-fallback {
  font-size: 20px;
  font-weight: 700;
  color: #475569;
}

.inbox-live-card__status {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #22c55e;
  border: 2.5px solid #ffffff;
  animation: inboxLivePulse 1.6s ease-in-out infinite;
}

.inbox-live-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.inbox-live-card__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-live-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-live-card__online {
  color: #16a34a;
  font-weight: 600;
}

.inbox-live-card__sep {
  color: #cbd5e1;
}

/* Chat CTA pill — outlined at rest, fills brand-orange on card hover so
   the whole card reads as one clickable unit. */
.inbox-live-card__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--brand-primary, #f97316);
  color: var(--brand-primary, #f97316);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.inbox-live-card:hover .inbox-live-card__cta {
  background: var(--brand-primary, #f97316);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.25);
}

@keyframes inboxLivePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ───────────────────────────────────────────────────────────────────────────
   Empty state
─────────────────────────────────────────────────────────────────────────── */

.inbox-overlay__empty {
  /* Fill the remaining list height so the empty state sits vertically
     centered in the fixed-size panel instead of hugging the top. */
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 24px;
  text-align: center;
  color: #475569;
}

.inbox-overlay__empty p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.inbox-overlay__empty .inbox-overlay__empty-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: #64748b;
  max-width: 260px;
}

.inbox-overlay__empty::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  background: radial-gradient(circle, #fed7aa 0%, transparent 70%);
  border-radius: 999px;
}

/* ───────────────────────────────────────────────────────────────────────────
   Skeleton loaders
─────────────────────────────────────────────────────────────────────────── */

.inbox-skeleton {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
}

.inbox-skeleton__avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
}

.inbox-skeleton__line {
  height: 12px;
  border-radius: 6px;
}

.inbox-skeleton__line + .inbox-skeleton__line {
  margin-top: 6px;
  width: 60%;
}

.inbox-skeleton__avatar,
.inbox-skeleton__line {
  background: linear-gradient(
    90deg,
    #f1f5f9 0%,
    #e2e8f0 50%,
    #f1f5f9 100%
  );
  background-size: 200% 100%;
  animation: inboxShimmer 1.4s linear infinite;
}

@keyframes inboxShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ───────────────────────────────────────────────────────────────────────────
   Footer (wallet snapshot + buy credit)
─────────────────────────────────────────────────────────────────────────── */

.inbox-overlay__footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  /* Keep the footer CTAs clear of the iOS home indicator on the bottom
     sheet (env() resolves to 0 everywhere else). */
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: #0f172a;
  color: #f8fafc;
  border-top: 1px solid #1e293b;
}

@media (min-width: 768px) {
  .inbox-overlay__footer {
    padding: 18px 24px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
}

.inbox-overlay__view-all {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 150ms ease;
}

.inbox-overlay__view-all:hover {
  color: #ffffff;
}

.inbox-overlay__credit {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.inbox-overlay__credit .notification-popup__credit-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0;
}

.inbox-overlay__credit .notification-popup__credit-amount {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.inbox-overlay__credit .notification-popup__buy-credit {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand-primary, #f97316);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 150ms ease, transform 100ms ease;
}

.inbox-overlay__credit .notification-popup__buy-credit:hover {
  background: #ea580c;
}

.inbox-overlay__credit .notification-popup__buy-credit:active {
  transform: scale(0.97);
}
