/* ═══════════════════════════════════════════════════════════════
   Spice Route Kitchen — Premium Heritage Theme (Mobile Frame)
   Fonts: Cormorant Garamond · Playfair Display · Poppins
═══════════════════════════════════════════════════════════════ */

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

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --bg-deep:        #1a0a00;
  --bg-rich:        #2d0f00;
  --bg-panel:       #200c00;
  --bg-panel-alt:   #2a1000;
  --bg-item:        #2e1200;
  --bg-input:       #2a1000;

  --gold:           #D4A017;
  --gold-bright:    #F4C430;
  --gold-dim:       #8B6914;
  --gold-subtle:    rgba(212, 160, 23, 0.18);
  --gold-glow:      rgba(212, 160, 23, 0.35);

  --copper:         #B87333;
  --maroon:         #7A1F1F;
  --maroon-bright:  #9E2B2B;
  --red-hot:        #cc2200;

  --ivory:          #FFF4E0;
  --text-primary:   #FFF4E0;
  --text-secondary: #C9A96E;
  --text-muted:     #7A5C3A;

  --veg-green:      #2d8a2d;
  --non-veg-red:    #cc2200;

  --border-gold:    rgba(212, 160, 23, 0.45);
  --border-subtle:  rgba(212, 160, 23, 0.18);
  --shadow-deep:    rgba(0, 0, 0, 0.7);

  --milo-bubble-bg:   #FFF4E0;
  --milo-bubble-text: #2a0e00;
  --user-grad-a:      #7A1F1F;
  --user-grad-b:      #B84A00;

  --font-serif:     'Cormorant Garamond', Georgia, serif;
  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'Poppins', sans-serif;

  --radius-card:    14px;
  --radius-bubble:  18px;
  --radius-btn:     24px;

  --ease-elegant:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:    cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --t-fast:         0.2s;
  --t-med:          0.35s;
}

/* ── Base ───────────────────────────────────────────────────── */
html, body {
  height: 100%;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-deep);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpolygon points='40,5 75,40 40,75 5,40' fill='none' stroke='%23D4A017' stroke-width='0.5' opacity='0.07'/%3E%3Ccircle cx='40' cy='40' r='6' fill='none' stroke='%23B87333' stroke-width='0.4' opacity='0.06'/%3E%3Ccircle cx='40' cy='5' r='1.2' fill='%23D4A017' opacity='0.09'/%3E%3Ccircle cx='75' cy='40' r='1.2' fill='%23D4A017' opacity='0.09'/%3E%3Ccircle cx='40' cy='75' r='1.2' fill='%23D4A017' opacity='0.09'/%3E%3Ccircle cx='5' cy='40' r='1.2' fill='%23D4A017' opacity='0.09'/%3E%3C/svg%3E"),
    linear-gradient(155deg, #1a0a00 0%, #2d0f00 55%, #1f0800 100%);
  background-size: 80px 80px, cover;
  background-attachment: fixed;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ════════════════════════════════════════════════
   PHONE FRAME
════════════════════════════════════════════════ */
.phone-frame {
  position: relative;
  width: 100vw;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-deep);
}

/* Desktop: render as a floating phone */
@media (min-width: 480px) {
  .phone-frame {
    width: 400px;
    height: min(860px, 96dvh);
    height: min(860px, 96vh);
    border-radius: 32px;
    box-shadow:
      0 0 0 1px rgba(212,160,23,0.35),
      0 0 0 2px #1c0800,
      0 0 0 3px rgba(184,115,51,0.45),
      0 0 0 4px rgba(212,160,23,0.08),
      0 32px 80px rgba(0,0,0,0.85),
      0 0 60px rgba(212,160,23,0.06);
  }
}

/* ════════════════════════════════════════════════
   VIEW SYSTEM
════════════════════════════════════════════════ */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.3s var(--ease-elegant), transform 0.3s var(--ease-elegant);
  will-change: transform, opacity;
  overflow: hidden;
}

.view.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.view.slide-back {
  transform: translateX(28px);
  opacity: 0;
}

/* ════════════════════════════════════════════════
   APP HEADER (shared by chat view)
════════════════════════════════════════════════ */
.app-header {
  flex-shrink: 0;
  padding: 14px 18px 0;
  background: linear-gradient(180deg, rgba(45,18,0,0.98) 0%, rgba(32,12,0,0.95) 100%);
  border-bottom: 1px solid var(--border-gold);
  box-shadow:
    0 1px 0 rgba(212,160,23,0.5),
    0 2px 0 rgba(184,115,51,0.2),
    0 4px 16px rgba(0,0,0,0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}

/* ── Milo Avatar ────────────────────────────────────────────── */
.milo-header-avatar {
  flex-shrink: 0;
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a1000, #1a0800);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(212,160,23,0.12), 0 4px 16px rgba(0,0,0,0.5);
  transition: box-shadow var(--t-med) var(--ease-elegant);
}

.milo-header-avatar .avatar-svg { width: 36px; height: 36px; }

.milo-header-avatar.milo-speaking {
  box-shadow:
    0 0 0 3px rgba(212,160,23,0.5),
    0 0 0 7px rgba(212,160,23,0.2),
    0 0 20px rgba(212,160,23,0.4),
    0 4px 16px rgba(0,0,0,0.5);
  animation: avatar-glow 1.8s ease-in-out infinite;
}

@keyframes avatar-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(212,160,23,0.5), 0 0 0 7px rgba(212,160,23,0.2), 0 0 20px rgba(212,160,23,0.4), 0 4px 16px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 0 4px rgba(244,196,48,0.7), 0 0 0 10px rgba(212,160,23,0.25), 0 0 32px rgba(244,196,48,0.5), 0 4px 16px rgba(0,0,0,0.5); }
}

/* ── Header Text ────────────────────────────────────────────── */
.header-text { flex: 1; min-width: 0; }

.restaurant-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.4px;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(212,160,23,0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.restaurant-subtitle {
  font-family: var(--font-serif);
  font-size: 0.74rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── CodeSizzler ────────────────────────────────────────────── */
.codesizzler-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.cs-label { font-size: 0.54rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }

.cs-name {
  font-family: var(--font-serif);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--copper);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cs-flame {
  width: 8px; height: 11px; flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(244,196,48,0.45));
}

/* ── Header Divider ─────────────────────────────────────────── */
.header-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 10px;
}

.divider-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.divider-ornament {
  width: 56px; height: 20px; flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(212,160,23,0.4));
}

/* ── Title flourish (shared) ────────────────────────────────── */
.title-flourish {
  width: 13px; height: 17px; flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(212,160,23,0.5));
}

/* ════════════════════════════════════════════════
   CHAT WINDOW
════════════════════════════════════════════════ */
.chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-window::-webkit-scrollbar        { width: 3px; }
.chat-window::-webkit-scrollbar-track  { background: transparent; }
.chat-window::-webkit-scrollbar-thumb  { background: linear-gradient(180deg, var(--gold), var(--copper)); border-radius: 2px; }

/* ── Message Rows ───────────────────────────────────────────── */
.message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: revealUp 0.4s var(--ease-elegant) both;
}

.user-row { flex-direction: row-reverse; }

.msg-avatar {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a1000, #1a0800);
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(212,160,23,0.2), 0 2px 6px rgba(0,0,0,0.5);
}

.msg-avatar .avatar-svg { width: 22px; height: 22px; }

/* ── Milo Bubble ────────────────────────────────────────────── */
.msg-bubble {
  max-width: 78%;
  padding: 10px 15px;
  border-radius: var(--radius-bubble);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.65;
  word-break: break-word;
}

.milo-bubble {
  background: var(--milo-bubble-bg);
  color: var(--milo-bubble-text);
  border-bottom-left-radius: 4px;
  border-left: 3px solid var(--gold);
  box-shadow: 0 3px 14px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.6);
}

.milo-bubble strong { font-weight: 600; color: #1e0800; }
.milo-bubble em     { font-style: italic; color: #5a2800; }

/* ── User Bubble ────────────────────────────────────────────── */
.user-bubble {
  background: linear-gradient(135deg, var(--user-grad-a) 0%, var(--user-grad-b) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.12);
}

/* ── Error Bubble ───────────────────────────────────────────── */
.error-bubble {
  align-self: center;
  background: rgba(122,31,31,0.3);
  color: #ffb3b3;
  border: 1px solid rgba(204,34,0,0.35);
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 0.78rem;
  text-align: center;
  font-style: italic;
  animation: revealUp 0.3s var(--ease-elegant);
}

/* ── Typing Indicator ───────────────────────────────────────── */
.typing-row { display: flex; align-items: flex-end; gap: 8px; animation: revealUp 0.3s var(--ease-elegant); }

.typing-indicator {
  background: var(--milo-bubble-bg);
  border-radius: var(--radius-bubble);
  border-bottom-left-radius: 4px;
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  display: flex; gap: 5px; align-items: center;
  box-shadow: 0 3px 14px rgba(0,0,0,0.5);
}

.typing-indicator span {
  display: block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold); opacity: 0.4;
  animation: gold-shimmer 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.22s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.44s; }

@keyframes gold-shimmer {
  0%, 70%, 100% { transform: translateY(0);    opacity: 0.35; background: var(--gold); }
  35%            { transform: translateY(-7px); opacity: 1;    background: var(--gold-bright); }
}

/* ════════════════════════════════════════════════
   ORDER BAR (bottom of chat, above input)
════════════════════════════════════════════════ */
.order-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #2a1000, #1e0a00);
  border-top: 1px solid var(--border-gold);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
  transition: transform 0.35s var(--ease-spring), opacity 0.3s;
}

.order-bar.hidden {
  display: none;
}

.order-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.order-bar-items { font-family: var(--font-body); font-weight: 500; }
.order-bar-dot   { color: var(--text-muted); }
.order-bar-total { font-family: var(--font-display); font-weight: 700; color: var(--gold); font-size: 0.9rem; }

.order-bar-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--gold);
  background: linear-gradient(135deg, var(--maroon), #5a1010);
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
}

.order-bar-btn:hover {
  background: linear-gradient(135deg, #9e2b2b, #7a1f1f);
  box-shadow: 0 4px 14px rgba(212,160,23,0.3);
}

/* ════════════════════════════════════════════════
   INPUT BAR
════════════════════════════════════════════════ */
.input-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 12px;
  background: linear-gradient(180deg, rgba(32,12,0,0.9) 0%, rgba(26,10,0,0.97) 100%);
  border-top: 1px solid var(--border-gold);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}

/* ── Mic Wrapper ────────────────────────────────────────────── */
.mic-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 48px; height: 48px;
}

.mic-wrapper::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(212,160,23,0.2);
  pointer-events: none;
}

.mic-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(212,160,23,0.35);
  pointer-events: none;
  transition: border-color var(--t-med);
}

.mic-wrapper:has(.mic-btn.processing)::before {
  border-color: transparent;
  border-top-color: var(--gold-bright);
  animation: ring-spin 0.75s linear infinite;
}
.mic-wrapper:has(.mic-btn.processing)::after { opacity: 0; }

@keyframes ring-spin { to { transform: rotate(360deg); } }

/* ── Mic Button ─────────────────────────────────────────────── */
.mic-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: linear-gradient(145deg, #3a1800, #240e00);
  color: var(--gold);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(212,160,23,0.15), 0 4px 16px rgba(0,0,0,0.5);
  transition: background var(--t-med), box-shadow var(--t-med);
  user-select: none; -webkit-user-select: none;
  touch-action: none;
  animation: mic-idle-glow 3s ease-in-out infinite;
}

@keyframes mic-idle-glow {
  0%, 100% { box-shadow: 0 0 0 0   rgba(212,160,23,0.0),  0 4px 16px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 0 7px rgba(212,160,23,0.15), 0 4px 16px rgba(0,0,0,0.5); }
}

.mic-btn:hover { background: linear-gradient(145deg, #4a2200, #301200); animation: none; }

.mic-icon-svg { width: 20px; height: 20px; pointer-events: none; }

.mic-btn.recording {
  background: linear-gradient(145deg, #5a0800, #3a0400);
  border-color: #ff5533;
  color: #ff8866;
  animation: mic-record-pulse 0.9s ease-in-out infinite;
}

@keyframes mic-record-pulse {
  0%, 100% { box-shadow: 0 0 0  0   rgba(204,34,0,0.8),  0 4px 16px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 0 12px rgba(204,34,0,0.0),  0 4px 16px rgba(0,0,0,0.5); }
}

.mic-btn.processing { opacity: 0.7; animation: none; border-color: var(--gold-dim); }

/* ── Text Input ─────────────────────────────────────────────── */
.message-input {
  flex: 1;
  height: 42px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.84rem;
  padding: 0 16px;
  outline: none;
  transition: border-color var(--t-med), box-shadow var(--t-med);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
  min-width: 0;
}

.message-input::placeholder { color: var(--text-muted); font-style: italic; }
.message-input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,160,23,0.15), inset 0 2px 6px rgba(0,0,0,0.3); }
.message-input:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── View Menu Button ───────────────────────────────────────── */
.view-menu-btn {
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-gold);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.view-menu-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(212,160,23,0.06); }

.view-menu-icon { width: 13px; height: 13px; flex-shrink: 0; }
.view-menu-label { display: none; }

/* ── Send Button ────────────────────────────────────────────── */
.send-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.4px;
  cursor: pointer;
  white-space: nowrap;
  position: relative; overflow: hidden;
  transition: color var(--t-med), background var(--t-med), box-shadow var(--t-med), opacity var(--t-fast);
}

.send-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  opacity: 0;
  transition: opacity var(--t-med);
}

.send-btn:hover::before { opacity: 1; }
.send-btn:hover { color: #1a0a00; box-shadow: 0 4px 16px rgba(212,160,23,0.4); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ════════════════════════════════════════════════
   SHARED ORDER ITEM STYLES (used in checkout)
════════════════════════════════════════════════ */
.order-items-list {
  display: flex;
  flex-direction: column;
}

.order-item {
  padding: 10px 0;
  border-bottom: 1px dotted rgba(212,160,23,0.2);
  animation: slide-in-item 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-item:first-child { padding-top: 4px; }
.order-item:last-child  { border-bottom: none; }

@keyframes slide-in-item {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.item-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }

.item-left { display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }

.veg-dot, .non-veg-dot {
  flex-shrink: 0;
  margin-top: 3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
  color: transparent; font-size: 0;
  border: 1.5px solid var(--gold);
}

.veg-dot     { background: radial-gradient(circle at 35% 30%, #6ec96e, #2d8a2d); }
.non-veg-dot { background: radial-gradient(circle at 35% 30%, #ff6644, #cc2200); }

.item-details { flex: 1; min-width: 0; }

.item-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }

.item-name {
  font-family: var(--font-display);
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-primary); word-break: break-word;
}

.item-qty {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  background: rgba(212,160,23,0.12);
  border: 1px solid rgba(212,160,23,0.25);
  color: var(--text-secondary);
  font-size: 0.67rem; font-weight: 600; white-space: nowrap;
}

/* ── Spice Badge ────────────────────────────────────────────── */
.spice-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px 2px 4px;
  border-radius: 8px; border: 1px solid currentColor;
  font-size: 0.63rem; font-weight: 600;
  font-family: var(--font-body); letter-spacing: 0.3px;
  white-space: nowrap; opacity: 0.9;
}

.spice-badge::before {
  content: '';
  display: inline-block; width: 0; height: 0;
  border-left: 3px solid transparent; border-right: 3px solid transparent;
  border-bottom: 6px solid currentColor; flex-shrink: 0;
}

.spice-mild        { color: #c8b020; background: rgba(200,176,32,0.1);  border-color: rgba(200,176,32,0.35); }
.spice-medium      { color: #d07020; background: rgba(208,112,32,0.1);  border-color: rgba(208,112,32,0.35); }
.spice-spicy       { color: #c04020; background: rgba(192,64,32,0.1);   border-color: rgba(192,64,32,0.35); }
.spice-extra-spicy { color: #a01020; background: rgba(160,16,32,0.12);  border-color: rgba(160,16,32,0.4); }

.item-customizations { font-size: 0.68rem; color: var(--text-muted); font-style: italic; margin-top: 3px; }

.item-price { font-family: var(--font-display); font-size: 0.88rem; font-weight: 600; color: var(--gold); white-space: nowrap; flex-shrink: 0; }

/* ── Totals ─────────────────────────────────────────────────── */
.order-divider {
  height: 4px;
  background:
    linear-gradient(90deg, transparent, var(--gold), transparent) top / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, var(--copper), transparent) bottom / 100% 1px no-repeat;
}

.order-totals, .co-totals { display: flex; flex-direction: column; gap: 7px; }

.total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--text-secondary);
}

.gst-row { font-size: 0.77rem; color: var(--text-muted); }

.grand-total-row {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700; color: var(--gold);
  padding: 8px 10px; margin-top: 2px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(212,160,23,0.1), rgba(184,115,51,0.06));
  border: 1px solid rgba(212,160,23,0.2);
  text-shadow: 0 1px 6px rgba(212,160,23,0.3);
}

/* ── Order Type Badge ───────────────────────────────────────── */
.order-type-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase;
  background: var(--bg-item); color: var(--text-muted);
  border: 1px solid rgba(212,160,23,0.2);
  transition: all var(--t-med) var(--ease-elegant);
}

.order-type-badge.active {
  background: linear-gradient(135deg, var(--maroon), #5a1010);
  color: var(--ivory); border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(212,160,23,0.3), 0 2px 8px rgba(0,0,0,0.4);
}

/* ════════════════════════════════════════════════
   CHECKOUT VIEW
════════════════════════════════════════════════ */
.checkout-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(45,18,0,0.98) 0%, rgba(32,12,0,0.95) 100%);
  border-bottom: 1px solid var(--border-gold);
  box-shadow: 0 1px 0 rgba(212,160,23,0.4), 0 4px 16px rgba(0,0,0,0.5);
}

.back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--t-fast);
}

.back-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(212,160,23,0.08); }

.checkout-header-text { flex: 1; min-width: 0; }

.checkout-title {
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 700; color: var(--gold);
  letter-spacing: 0.3px; text-shadow: 0 2px 8px rgba(212,160,23,0.3);
}

.checkout-sub {
  font-family: var(--font-serif);
  font-size: 0.72rem; font-style: italic; color: var(--text-secondary);
}

/* Scrollable body */
.checkout-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.checkout-scroll::-webkit-scrollbar        { width: 3px; }
.checkout-scroll::-webkit-scrollbar-track  { background: transparent; }
.checkout-scroll::-webkit-scrollbar-thumb  { background: linear-gradient(180deg, var(--gold), var(--copper)); border-radius: 2px; }

.co-section { display: flex; flex-direction: column; gap: 12px; }

.co-section-heading {
  font-family: var(--font-display);
  font-size: 0.82rem; font-weight: 600; color: var(--gold);
  letter-spacing: 0.5px; text-transform: uppercase;
  display: flex; align-items: center; gap: 7px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212,160,23,0.18);
}

.co-totals { padding: 6px 0; }

/* ── Payment Cards ──────────────────────────────────────────── */
.co-payment-options { display: flex; flex-direction: column; gap: 10px; }

.co-payment-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(212,160,23,0.2);
  background: var(--bg-item);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  user-select: none;
}

.co-payment-card:hover {
  border-color: rgba(212,160,23,0.45);
  background: rgba(46,18,0,0.95);
}

.co-payment-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,160,23,0.12), rgba(184,115,51,0.06));
  box-shadow: 0 0 0 1px rgba(212,160,23,0.2), 0 4px 16px rgba(0,0,0,0.35);
}

.co-pay-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(212,160,23,0.1);
  border: 1px solid rgba(212,160,23,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}

.co-payment-card.active .co-pay-icon {
  background: rgba(212,160,23,0.18);
  border-color: rgba(212,160,23,0.4);
}

.co-pay-info { flex: 1; min-width: 0; }

.co-pay-name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-primary);
}

.co-pay-desc {
  display: block;
  font-size: 0.71rem; color: var(--text-muted); margin-top: 2px;
}

.co-pay-tick {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(212,160,23,0.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: all var(--t-fast);
}

.co-payment-card.active .co-pay-tick {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a0a00;
}

.co-cta-spacer { height: 90px; flex-shrink: 0; }

/* ── Sticky CTA ─────────────────────────────────────────────── */
.co-cta {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: linear-gradient(180deg, rgba(26,10,0,0.0) 0%, rgba(26,10,0,0.98) 22%);
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex; flex-direction: column; gap: 8px;
}

.co-error {
  text-align: center;
  font-size: 0.78rem;
  color: #ffb3b3;
  font-style: italic;
  padding: 4px 0;
}

.co-error.hidden { display: none; }

.co-place-btn {
  width: 100%;
  height: 52px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--gold);
  background: linear-gradient(135deg, var(--maroon) 0%, #B84A00 100%);
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(212,160,23,0.3), 0 8px 32px rgba(0,0,0,0.5);
  transition: opacity var(--t-fast), box-shadow var(--t-med);
}

.co-place-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  opacity: 0;
  transition: opacity var(--t-med);
}

.co-place-btn:hover::before { opacity: 1; }
.co-place-btn:hover { color: #1a0a00; box-shadow: 0 6px 24px rgba(212,160,23,0.5); }
.co-place-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.co-place-btn span { position: relative; z-index: 1; }

/* ════════════════════════════════════════════════
   THANK YOU VIEW
════════════════════════════════════════════════ */
.thankyou-view {
  background: linear-gradient(170deg, #230f00 0%, #1a0a00 100%);
}

.ty-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
  overflow-y: auto;
}

/* Checkmark medallion */
.checkmark-anim {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(30,100,30,0.25), rgba(20,60,20,0.15));
  border: 1.5px solid var(--gold);
  box-shadow:
    0 0 0 3px rgba(212,160,23,0.12),
    0 0 0 5px rgba(184,115,51,0.07),
    0 6px 28px rgba(30,120,30,0.3),
    0 0 20px rgba(212,160,23,0.2);
  display: flex; align-items: center; justify-content: center;
  animation: medal-pop 0.55s var(--ease-spring) both;
}

@keyframes medal-pop {
  0%   { transform: scale(0);    opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

.check-svg { width: 54px; height: 54px; overflow: visible; }

.check-circle {
  fill: none; stroke: var(--gold); stroke-width: 1.5;
  stroke-dasharray: 148; stroke-dashoffset: 148;
  transform-origin: 26px 26px;
  animation: draw-circle 0.65s cubic-bezier(0.65,0,0.45,1) 0.1s forwards;
}

.check-path {
  fill: none; stroke: var(--gold-bright); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: draw-check 0.42s cubic-bezier(0.65,0,0.45,1) 0.7s forwards;
}

@keyframes draw-circle { to { stroke-dashoffset: 0; } }
@keyframes draw-check  { to { stroke-dashoffset: 0; } }

.confirmed-heading {
  font-family: var(--font-serif);
  font-size: 1.55rem; font-weight: 700; color: var(--gold);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(212,160,23,0.4);
}

.confirmed-order-id {
  background: var(--bg-item);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 0.78rem; color: var(--text-secondary);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.8px;
}

.ty-payment-badge {
  display: inline-flex; align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(212,160,23,0.1);
  border: 1px solid rgba(212,160,23,0.3);
  color: var(--gold);
}

.confirmed-flourish { opacity: 0.75; filter: drop-shadow(0 0 3px rgba(212,160,23,0.3)); }

.confirmed-eta {
  display: flex; align-items: center; gap: 6px;
  background: rgba(212,160,23,0.08);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 10px; padding: 8px 18px;
  font-family: var(--font-display);
  font-size: 0.86rem; font-weight: 500; color: var(--gold);
}

.confirmed-thankyou {
  font-family: var(--font-serif);
  font-size: 0.9rem; font-style: italic; color: var(--text-secondary);
}

/* ── Place New Order button ─────────────────────────────────── */
.new-order-btn {
  margin-top: 6px;
  height: 48px; padding: 0 32px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.5px;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: color var(--t-med), box-shadow var(--t-med);
}

.new-order-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  opacity: 0;
  transition: opacity var(--t-med);
}

.new-order-btn:hover { color: #1a0a00; box-shadow: 0 6px 20px rgba(212,160,23,0.4); }
.new-order-btn:hover::before { opacity: 1; }
.new-order-btn span { position: relative; z-index: 1; }

/* ════════════════════════════════════════════════
   FULL MENU MODAL
════════════════════════════════════════════════ */
.menu-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 3, 0, 0.82);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-med) var(--ease-elegant);
}

.menu-modal-overlay.open { opacity: 1; pointer-events: all; }

.menu-modal {
  width: min(440px, 94vw);
  max-height: 88vh;
  background: linear-gradient(170deg, #230f00 0%, #1c0800 100%);
  border-radius: var(--radius-card);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 3px #1c0800, 0 0 0 4px var(--copper), 0 24px 64px rgba(0,0,0,0.85);
  display: flex; flex-direction: column; overflow: hidden;
}

.menu-modal-overlay.open .menu-modal {
  animation: modal-enter 0.32s var(--ease-spring) both;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.93) translateY(14px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.menu-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 10px; flex-shrink: 0;
}

.menu-modal-title {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 700; color: var(--gold);
  display: flex; align-items: center; gap: 8px;
  text-shadow: 0 2px 8px rgba(212,160,23,0.3);
}

.menu-modal-subtitle {
  font-size: 0.82rem; font-weight: 400; font-style: italic;
  color: var(--text-secondary);
}

.menu-modal-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-gold); background: transparent;
  color: var(--text-secondary); font-size: 1.2rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all var(--t-fast);
}

.menu-modal-close:hover { background: rgba(212,160,23,0.1); color: var(--gold); border-color: var(--gold); }

.menu-modal-divider { padding: 0 16px 10px; flex-shrink: 0; }

.menu-modal-body {
  flex: 1; overflow-y: auto;
  padding: 4px 20px 24px;
  display: flex; flex-direction: column; gap: 24px;
}

.menu-modal-body::-webkit-scrollbar        { width: 3px; }
.menu-modal-body::-webkit-scrollbar-track  { background: transparent; }
.menu-modal-body::-webkit-scrollbar-thumb  { background: linear-gradient(180deg, var(--gold), var(--copper)); border-radius: 2px; }

.menu-loading {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted); font-style: italic;
  font-family: var(--font-serif); font-size: 0.9rem;
}

.menu-cat-heading {
  font-family: var(--font-display); font-size: 0.86rem; font-weight: 600;
  color: var(--gold); letter-spacing: 0.7px; text-transform: uppercase;
  margin-bottom: 9px; padding-bottom: 7px;
  border-bottom: 1px solid rgba(212,160,23,0.2);
  display: flex; align-items: center; gap: 7px;
}

.menu-cat-heading::before {
  content: ''; display: inline-block; width: 5px; height: 5px;
  background: var(--gold); border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 4px rgba(212,160,23,0.5);
}

.menu-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }

.menu-item-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 7px; padding: 8px 11px;
  background: var(--bg-item); border: 1px solid var(--border-subtle);
  border-radius: 8px; transition: border-color var(--t-fast), background var(--t-fast);
}

.menu-item-card:hover { border-color: rgba(212,160,23,0.35); background: rgba(46,18,0,0.95); }

.menu-item-top { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }

.menu-item-name {
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 500;
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.menu-item-price {
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
  color: var(--gold); white-space: nowrap; flex-shrink: 0;
}

/* ════════════════════════════════════════════════
   KEYFRAMES
════════════════════════════════════════════════ */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════
   MOBILE (fills edge-to-edge, no decorative frame)
════════════════════════════════════════════════ */
@media (max-width: 479px) {
  .phone-frame {
    width: 100vw;
    height: 100dvh;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .menu-cat-grid    { grid-template-columns: 1fr; }
  .view-menu-label  { display: inline; }
  .menu-modal { width: 98vw; }
}

/* On slightly wider screens show menu button label */
@media (min-width: 360px) {
  .view-menu-label { display: inline; }
}
