/* ============================================================
   makeBIMI.com — Synthetic Inbox FOMO Preview Component
   Glassmorphism dark-mode inbox mock with before/after states
   and animated verified badge checkmark
   ============================================================ */

/* ── CONTAINER ── */
.inbox-fomo {
  max-width: 560px;
  margin-top: 0;
  margin-right: auto;
  margin-bottom: 32px;
  margin-left: auto;
  animation: fadeSlideUp 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 100ms both;
}

/* ── BEFORE / AFTER LABEL ROW ── */
.inbox-fomo-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 0.72rem;
  font-weight: 510;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fomo-label-before {
  color: var(--text-muted);
}
.fomo-label-arrow {
  color: var(--border-hover);
  font-size: 0.8rem;
}
.fomo-label-after {
  color: var(--accent);
}

/* ── GLASSMORPHISM INBOX MOCK ── */
.inbox-fomo-mock {
  background: rgba(18, 18, 22, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 8px 32px rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.3);
}

/* ── WINDOW CHROME ── */
.inbox-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.chrome-dots {
  display: flex;
  gap: 5px;
}
.chrome-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.8;
}
.chrome-title {
  margin-left: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

/* ── SEARCH BAR ── */
.inbox-searchbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ── EMAIL ROWS ── */
.inbox-row-mock {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  transition: background 120ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.inbox-row-before {
  background: rgba(255,255,255,0.01);
}
.inbox-row-after {
  background: rgba(113, 112, 255, 0.04);
}
.inbox-row-after:hover {
  background: rgba(113, 112, 255, 0.07);
}

/* ── AVATARS ── */
.inbox-avatar-mock {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 1px;
}
.avatar-unverified {
  background: #2a2a30;
  border: 1px solid rgba(255,255,255,0.06);
}
.avatar-initial-mock {
  font-size: 0.875rem;
  font-weight: 510;
  color: var(--text-muted);
  font-family: var(--font);
  letter-spacing: -0.01em;
}
.avatar-verified {
  background: transparent;
  border: none;
}

/* ── EMAIL CONTENT ── */
.inbox-content-mock {
  flex: 1;
  min-width: 0;
}
.inbox-sender-mock {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}
.sender-unverified .sender-name {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.011em;
}
.sender-unverified .sender-address {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.6;
}
.sender-verified {
  gap: 4px;
}
.sender-name-verified {
  font-size: 0.8125rem;
  font-weight: 510;
  color: var(--text-primary);
  letter-spacing: -0.016em;
}

.inbox-subject-mock {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.011em;
}
.subject-verified {
  color: var(--text-primary);
  font-weight: 510;
}
.inbox-preview-mock {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.008em;
}

/* ── META ── */
.inbox-meta-mock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  padding-top: 1px;
}
.inbox-time-mock {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: -0.008em;
}
.inbox-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.3;
}
.unread-dot-accent {
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 6px rgba(113,112,255,0.5);
}

/* ── DIVIDER ── */
.inbox-divider {
  height: 1px;
  background: rgba(255,255,255,0.04);
  margin: 0 14px;
}

/* ── VERIFIED BADGE ── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  /* Staggered entrance: badge appears after sender name */
  animation: badgeEntrance 400ms cubic-bezier(0.34, 1.56, 0.64, 1) 600ms both;
}

.verified-badge svg {
  /* Subtle pulse to draw the eye on page load */
  animation:
    badgeEntrance 400ms cubic-bezier(0.34, 1.56, 0.64, 1) 600ms both,
    badgePulse 3s ease-in-out 1200ms infinite;
  filter: drop-shadow(0 0 4px rgba(29, 78, 216, 0.5));
}

@keyframes badgeEntrance {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-15deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes badgePulse {
  0%, 100% {
    filter: drop-shadow(0 0 3px rgba(29, 78, 216, 0.4));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(29, 78, 216, 0.7));
    transform: scale(1.08);
  }
}

/* ── CTA LABEL ── */
.inbox-fomo-cta {
  text-align: center;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: -0.008em;
}
.inbox-fomo-cta::before {
  content: '↓ ';
  color: var(--accent);
  opacity: 0.7;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .inbox-fomo {
    margin-bottom: 20px;
  }
  .sender-unverified .sender-address {
    display: none;
  }
  .inbox-preview-mock {
    display: none;
  }
}

/* ── ADDENDUM 8: Elevated card, monochromatic before, color pop after ────── */

/* Elevated container — distinct from page background */
.inbox-fomo.inbox-fomo--elevated {
  margin-top: 0;   /* gap provided by utility-panel padding-bottom */
  margin-bottom: 0;
  padding-top: 20px;  /* breathing room above the label row */
  /* BFC handled by .hero display:flow-root */
}

/* Elevated mock — #111111 bg, #2a2a2a border, stronger shadow */
.inbox-fomo-mock--elevated {
  background: #111111;
  border: 1px solid #2a2a2a;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 12px 40px rgba(0,0,0,0.6),
    0 4px 12px rgba(0,0,0,0.4);
}

/* BEFORE row: fully desaturated, lower opacity — strictly monochromatic */
.inbox-row-before {
  filter: saturate(0);
  opacity: 0.55;
}
.inbox-row-before:hover {
  filter: saturate(0);
  opacity: 0.55;
  background: transparent;
}

/* AFTER row: full color, elevated background */
.inbox-row-after {
  background: rgba(66, 133, 244, 0.04);
}
.inbox-row-after:hover {
  background: rgba(66, 133, 244, 0.07);
}

/* Verified avatar radial glow — draws eye to the positive state */
.avatar-verified--glow {
  position: relative;
}
.avatar-verified--glow::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66,133,244,0.25) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.avatar-verified--glow svg {
  position: relative;
  z-index: 1;
}

/* Override badge color to #4285F4 */
.verified-badge svg path[fill="#1d4ed8"] {
  fill: #4285F4;
}
@keyframes badgePulse {
  0%, 100% {
    filter: drop-shadow(0 0 3px rgba(66,133,244,0.4));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(66,133,244,0.75));
    transform: scale(1.1);
  }
}

/* Margin collapse prevention on hero container ─────────────────────────────
   The .hero .container is a block; its last child's margin-bottom can collapse
   with .inbox-fomo--elevated's margin-top. Setting overflow:hidden on the
   hero section creates a new BFC and prevents this without any visual change.
   ─────────────────────────────────────────────────────────────────────────── */
.hero {
  display: flow-root; /* BFC without clipping — prevents margin collapse */
}


/* ── ADDENDUM 23: Ubiquity Matrix — Strict Flexbox Architecture ─────────────
   Wipes all previous hf-* and cross-client-* rules.
   ─────────────────────────────────────────────────────────────────────────── */

/* Section wrapper: client label + split row */
.um-section {
  padding: 0;
}

/* Client label bar */
.um-client-label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px 4px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247,248,248,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Split: before | after */
.um-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Universal row: flex container per spec */
.um-row {
  display: flex;
  align-items: center;
  padding: 16px 20px; /* Addendum 24: more breathing room */
  gap: 0;
  position: relative;
}

/* Vertical divider between before and after */
.um-split .um-row:first-child {
  border-right: 1px solid rgba(255,255,255,0.06);
}

/* Divider between sections */
.um-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
}

/* ── BEFORE: desaturated + dimmed ── */
.um-before {
  filter: saturate(0);
  opacity: 0.65; /* Addendum 24: legible but desaturated */
}

/* ── AFTER: full color ── */
.um-after {
  opacity: 1;
}

/* ── AVATAR: fixed 40×40 ── */
.um-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(247,248,248,0.4);
}
.um-avatar-circle  { border-radius: 50%; }
.um-avatar-rounded { border-radius: 10px; }
.um-avatar-gray    { background: #2a2a30; border: 1px solid rgba(255,255,255,0.06); }
.um-avatar-logo    { background: transparent; border: none; }

/* ── BODY: flex-grow text column ── */
.um-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin-left: 12px;
  min-width: 0;
  overflow: hidden;
}

/* Apple Mail uses system font */
.um-apple-body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

/* Sender name */
.um-sender {
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(247,248,248,0.55);
  letter-spacing: -0.011em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.um-sender-verified {
  font-weight: 600;
  color: var(--text-primary);
}

/* Subject / snippet */
.um-subject {
  font-size: 0.75rem;
  color: rgba(247,248,248,0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  letter-spacing: -0.008em;
}
.um-subject-verified {
  font-weight: 510;
  color: rgba(247,248,248,0.65);
}

/* ── TIME: right-aligned ── */
.um-time {
  font-size: 12px;
  color: rgba(247,248,248,0.3);
  flex-shrink: 0;
  margin-left: 8px;
  white-space: nowrap;
}
.um-time-yahoo { color: #6001D2; font-weight: 500; }

/* ── GMAIL CHECKMARK ── */
.um-checkmark {
  flex-shrink: 0;
  animation: badgeEntrance 400ms cubic-bezier(0.34, 1.56, 0.64, 1) 600ms both,
             badgePulse 3s ease-in-out 1200ms infinite;
  filter: drop-shadow(0 0 4px rgba(66,133,244,0.5));
}

/* ── APPLE MAIL iOS unread dot ── */
.um-ios-unread-dot {
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #007AFF;
  box-shadow: 0 0 6px rgba(0,122,255,0.5);
  flex-shrink: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 540px) {
  .um-split { grid-template-columns: 1fr 1fr; }
  .um-subject { display: none; }
  .um-row { padding: 10px 10px; }
  .um-avatar { width: 32px; height: 32px; }
  .um-body { margin-left: 8px; }
  .um-client-label { padding: 5px 10px 3px; }
}

/* Addendum 24: Hide macOS window chrome on the matrix container */
.inbox-fomo--elevated .inbox-chrome { display: none !important; }

/* ── Apple Single-Shot Gmail Inbox Component ─────────────────────────────── */

.apple-inbox-section {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* The "screenshot" frame */
.apple-inbox-frame {
  background: #1c1c1e;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 24px 80px rgba(0,0,0,0.6),
    0 8px 24px rgba(0,0,0,0.4);
  font-family: 'Google Sans', 'Roboto', 'Inter', sans-serif;
}

/* Gmail chrome bar */
.ai-chrome {
  background: #111113;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
}
.ai-chrome-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 24px;
  padding: 7px 16px;
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: -0.008em;
}

/* Inbox container */
.ai-inbox { padding: 0; }

/* Divider */
.ai-divider {
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin: 0 16px;
}

/* Row base */
.ai-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: default;
  transition: background 120ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}
.ai-row:hover { background: rgba(255,255,255,0.03); }

/* Verified row — the hero */
.ai-row--verified {
  background: rgba(255,255,255,0.07);
  border-left: 2px solid rgba(66,133,244,0.6);
}
.ai-row--verified:hover {
  background: rgba(255,255,255,0.1);
}

/* Unverified rows — slightly muted */
.ai-row--unverified { opacity: 0.42; }

/* Avatar */
.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  overflow: hidden;
}
.ai-avatar--logo { background: transparent; }
.ai-avatar--initial {
  background: #3c4043;
  color: rgba(255,255,255,0.7);
}
.ai-avatar--purple { background: #5c35a8; }

/* Row body */
.ai-row-body {
  flex: 1;
  min-width: 0;
}
.ai-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

/* Sender */
.ai-sender {
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  letter-spacing: -0.011em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ai-sender--verified {
  font-weight: 600;
  color: #f7f8f8;
}

/* Verified checkmark */
.ai-checkmark {
  flex-shrink: 0;
  animation:
    aiCheckIn 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 800ms both,
    aiCheckPulse 4s ease-in-out 1500ms infinite;
  filter: drop-shadow(0 0 5px rgba(66,133,244,0.6));
}
@keyframes aiCheckIn {
  from { opacity: 0; transform: scale(0.3) rotate(-20deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes aiCheckPulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(66,133,244,0.4)); }
  50%       { filter: drop-shadow(0 0 10px rgba(66,133,244,0.9)); }
}

/* Time */
.ai-time {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
  letter-spacing: -0.008em;
}

/* Subject */
.ai-subject {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  letter-spacing: -0.011em;
}
.ai-subject--verified {
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

/* Snippet */
.ai-snippet {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.008em;
}

/* Star icon */
.ai-star { flex-shrink: 0; }

/* Caption */
.ai-caption {
  text-align: center;
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: -0.008em;
  margin-top: 16px;
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 540px) {
  .ai-snippet { display: none; }
  .ai-row { padding: 12px 12px; gap: 10px; }
  .apple-inbox-section { padding: 0 16px; }
}
