/* ═══════════════════════════════════════════════════════════════
   WAAS Restaurant — shared site chrome
   Nav, buttons, promo banner, AI chat, placeholders, cart pill,
   utilities. All styling reads theme tokens only.
   ═══════════════════════════════════════════════════════════════ */

*, *::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; }

.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { opacity: .9; }

/* ── Lucide icon sizing helper ── */
[data-lucide] { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.8; }
.btn [data-lucide] { width: 16px; height: 16px; }

/* ── Placeholder imagery (used as fallback only — most layouts use Unsplash) ── */
.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 span { position: relative; z-index: 1; padding: .4rem .7rem; background: var(--surface); border: 1px solid var(--border); }

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

.promo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
}
.promo-icon [data-lucide] { width: 16px; height: 16px; }

.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: 26px; height: 26px;
  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; }

.promo-banner[data-variant="flash"]::before,
.promo-banner[data-variant="flash"]::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 80px;
  background: repeating-linear-gradient(45deg, transparent 0 8px, color-mix(in oklab, #fff 15%, transparent) 8px 16px);
  opacity: .6;
}
.promo-banner[data-variant="flash"]::before { left: 0; }
.promo-banner[data-variant="flash"]::after { right: 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-launcher [data-lucide] { width: 22px; height: 22px; }

.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); }

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

/* ═══════════════════════════════════════════════════════════════
   CART DRAWER — used by menu + checkout pages
   ═══════════════════════════════════════════════════════════════ */
.cart-pill {
  position: fixed; bottom: 20px; left: 20px; z-index: 55;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 12px 28px color-mix(in oklab, var(--text) 30%, transparent);
  transition: transform .18s;
}
.cart-pill:hover { transform: translateY(-2px); }
.cart-pill .badge {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--brand);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.cart-pill .price { font-family: var(--font-mono); opacity: .75; }
