/* ═══════════════════════════════════════════════════════════════
   Shared site chrome — nav, buttons, promo banner, AI chat,
   emergency CTA, placeholders. All styling reads theme tokens.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }

.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.h-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.h-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  transition: background .18s, color .18s, transform .12s, border-color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--bg); }
.btn-primary:hover { background: var(--brand-dk); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); padding: .65rem .9rem; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 1.1rem 1.8rem; font-size: 1rem; }

/* ── Placeholder imagery ── */
.placeholder-img {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      var(--surface-2) 0 14px,
      color-mix(in oklab, var(--surface-2) 80%, var(--text) 8%) 14px 15px);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  overflow: hidden;
}
.placeholder-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, color-mix(in oklab, var(--bg) 80%, transparent) 100%);
  pointer-events: none;
}
.placeholder-img span { position: relative; z-index: 1; padding: .4rem .7rem; background: var(--surface); border: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════════
   PROMO BANNER  — dismissible top strip
   Variants via data-variant: holiday | flash | weather | promo |
   announce | emergency
   ═══════════════════════════════════════════════════════════════ */
.promo-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 48px 10px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  min-height: 40px;
  background: var(--text);
  color: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.promo-banner[data-variant="holiday"] {
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dk) 100%);
  color: var(--bg);
}
.promo-banner[data-variant="flash"] {
  background: var(--accent);
  color: var(--bg);
}
.promo-banner[data-variant="weather"] {
  background: #f2c029;
  color: #1a1a1a;
}
.promo-banner[data-variant="promo"] {
  background: var(--surface-2);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.promo-banner[data-variant="announce"] {
  background: var(--brand);
  color: var(--bg);
}
.promo-banner[data-variant="emergency"] {
  background: #d62828;
  color: #ffffff;
}

.promo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  flex-shrink: 0;
}
.promo-msg { }
.promo-msg strong { font-weight: 700; letter-spacing: .02em; }
.promo-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: color-mix(in oklab, currentColor 15%, transparent);
  border: 1px dashed color-mix(in oklab, currentColor 60%, transparent);
  border-radius: 3px;
  margin-left: 2px;
}
.promo-countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 3px 8px;
  background: color-mix(in oklab, currentColor 18%, transparent);
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.promo-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  white-space: nowrap;
}
.promo-link:hover { opacity: .8; }
.promo-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: inherit;
  opacity: .7;
  transition: opacity .15s, background .15s;
}
.promo-close:hover { opacity: 1; background: color-mix(in oklab, currentColor 15%, transparent); }
.promo-banner.dismissed { display: none; }

/* Holiday seasonal sparkle decoration */
.promo-banner[data-variant="holiday"]::before,
.promo-banner[data-variant="holiday"]::after {
  content: "✦";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: .35;
  font-size: 16px;
}
.promo-banner[data-variant="holiday"]::before { left: 18%; }
.promo-banner[data-variant="holiday"]::after { right: 18%; }

/* ── Floating emergency call button (persistent) ── */
.emergency-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: #d62828;
  color: #ffffff;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 10px 30px color-mix(in oklab, #d62828 40%, transparent), 0 0 0 4px color-mix(in oklab, #d62828 18%, transparent);
  transition: transform .18s;
}
.emergency-fab:hover { transform: translateY(-2px); }
.emergency-fab .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s ease-out infinite;
  box-shadow: 0 0 0 0 rgba(255,255,255,.8);
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.9); }
  70%  { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ═══════════════════════════════════════════════════════════════
   AI Chat (theme-driven)
   ═══════════════════════════════════════════════════════════════ */
.ai-chat-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px color-mix(in oklab, var(--brand) 40%, transparent);
  transition: transform .2s;
}
.ai-chat-launcher:hover { transform: scale(1.06); }

.ai-chat {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: min(380px, calc(100vw - 40px));
  height: min(560px, calc(100vh - 40px));
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px color-mix(in oklab, var(--text) 18%, transparent);
  display: flex; flex-direction: column;
  overflow: hidden;
  font-family: var(--font-body);
}
.ai-chat-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
}
.ai-chat-avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--brand); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.ai-chat-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.1; }
.ai-chat-sub { font-size: 11px; color: var(--text-dim); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.ai-chat-close { margin-left: auto; color: var(--text-dim); padding: 6px; border-radius: 6px; }
.ai-chat-close:hover { background: var(--surface-2); color: var(--text); }

.ai-chat-body {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in oklab, var(--brand) 8%, transparent) 0%, transparent 60%),
    var(--surface);
}
.ai-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.45;
}
.ai-msg-bot {
  background: var(--surface-2);
  color: var(--text);
  border-top-left-radius: 4px;
  align-self: flex-start;
}
.ai-msg-user {
  background: var(--brand);
  color: var(--bg);
  border-top-right-radius: 4px;
  align-self: flex-end;
}
.ai-chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 16px 12px;
}
.ai-chip {
  font-size: 12px;
  padding: 7px 11px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background .15s, border-color .15s;
}
.ai-chip:hover { background: var(--surface-2); border-color: var(--text-dim); }

.ai-chat-input {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
}
.ai-chat-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.ai-chat-input input:focus { outline: none; border-color: var(--brand); }
.ai-chat-send {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.ai-chat-send:hover { background: var(--brand-dk); }

/* ── Theme indicator badge ── */
.theme-badge {
  position: fixed; top: 14px; right: 14px; z-index: 50;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 7px;
}
.theme-badge::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
}

/* ── Utility ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

/* ── Trust badge row (reusable) ── */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}
.trust-item svg { color: var(--brand); flex-shrink: 0; }
.trust-item strong { color: var(--text); font-weight: 700; }
