/* ==========================================================================
   BB's Dirty Soda Shack — Bray's Business Dashboard
   ========================================================================== */

:root {
  --bray-gold:      #FFCC00;
  --bray-gold-dim:  rgba(255, 204, 0, 0.10);
  --bray-gold-mid:  rgba(255, 204, 0, 0.20);
  --bray-gold-glow: rgba(255, 204, 0, 0.40);
}

/* ── Page layout ──────────────────────────────────────────────────────────── */
.bray-main { min-height: calc(100vh - 64px); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.bray-hero {
  position: relative;
  padding: 56px 40px 44px;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
}

/* Subtle Tron scan-line shimmer */
.bray-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 204, 0, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 204, 0, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, rgba(0,0,0,0.6) 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, rgba(0,0,0,0.6) 0%, transparent 75%);
  pointer-events: none;
}

.bray-badge {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bray-gold);
  background: var(--bray-gold-dim);
  border: 1px solid rgba(255, 204, 0, 0.22);
  border-radius: 100px;
  padding: 4px 14px;
  display: inline-block;
  margin-bottom: 18px;
  position: relative;
}

.bray-title {
  font-family: 'Syne', sans-serif;
  font-weight: 900;
  font-size: clamp(36px, 6.5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 16px;
  position: relative;
}
.bray-title span { color: var(--bray-gold); text-shadow: 0 0 30px var(--bray-gold-glow); }

.bray-underline {
  height: 2px;
  width: 140px;
  background: var(--bray-gold);
  box-shadow: 0 0 12px var(--bray-gold-glow);
  margin-bottom: 20px;
  position: relative;
}

.bray-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  position: relative;
}

/* ── Sections wrapper ─────────────────────────────────────────────────────── */
.bray-sections {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px 120px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Widget card ──────────────────────────────────────────────────────────── */
.bray-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  transition: border-color 0.25s;
}
.bray-widget:hover { border-color: rgba(255, 204, 0, 0.18); }

.bray-widget-head {
  padding: 24px 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.bray-widget-icon {
  font-size: 30px;
  color: var(--bray-gold);
  --ph-duotone-opacity: 0.25;
  flex-shrink: 0;
  filter: drop-shadow(0 0 7px var(--bray-gold-glow));
  line-height: 1;
  margin-top: 2px;
}

.bray-widget-meta h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.bray-widget-meta p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ── Ingredient list ──────────────────────────────────────────────────────── */
.ingredient-list {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
}

.ingredient-group-label {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 14px 0 4px;
}
.ingredient-group-label:first-child { padding-top: 6px; }

.ingredient-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.ingredient-row:last-child { border-bottom: none; }

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

.ingredient-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ingredient-unit {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
}

.ingredient-stepper {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.stepper-btn {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--bray-gold);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  transition: background 0.12s;
  flex-shrink: 0;
  line-height: 1;
}
.stepper-btn:active { background: var(--bray-gold-dim); }
.stepper-btn:disabled { color: var(--text-faint); cursor: default; }

.stepper-qty {
  font-family: 'Geist Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 28px;
  text-align: center;
  line-height: 1;
}

.ingredient-cost {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
  text-align: right;
  flex-shrink: 0;
  min-width: 50px;
  transition: color 0.2s;
}
.ingredient-cost.active { color: var(--neon-pink); }

/* ── Planner summary bar ──────────────────────────────────────────────────── */
.planner-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}

.planner-stat {
  background: var(--bg-elevated);
  padding: 16px 12px;
  text-align: center;
}

.planner-stat-value {
  font-family: 'Geist Mono', monospace;
  font-size: 19px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  line-height: 1;
  margin-bottom: 5px;
}
.planner-stat-value.gold { color: var(--bray-gold); }
.planner-stat-value.pink { color: var(--neon-pink); }

.planner-stat-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-family: 'Satoshi', sans-serif;
}

/* ── Drinks breakdown ─────────────────────────────────────────────────────── */
.drinks-section {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border-subtle);
}

.drinks-section-label {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.drink-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.drink-row:last-child { border-bottom: none; }

.drink-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drink-bar-track {
  flex: 0 0 72px;
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.drink-bar-fill {
  height: 100%;
  background: var(--bray-gold);
  border-radius: 2px;
  transition: width 0.28s ease;
  box-shadow: 0 0 5px var(--bray-gold-glow);
}

.drink-count {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--bray-gold);
  text-align: right;
  min-width: 62px;
  flex-shrink: 0;
}
.drink-count.zero { color: var(--text-faint); }

/* ── Menu widget ──────────────────────────────────────────────────────────── */
.menu-open-area {
  padding: 20px 24px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-bray {
  background: var(--bray-gold);
  color: #07071A;
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 0 18px rgba(255, 204, 0, 0.28);
}
.btn-bray i { font-size: 17px; --ph-duotone-opacity: 0.3; }
.btn-bray:hover { box-shadow: 0 0 32px rgba(255, 204, 0, 0.5); transform: translateY(-1px); }
.btn-bray:active { transform: translateY(1px); box-shadow: none; }

.menu-hint {
  font-size: 12px;
  color: var(--text-faint);
}

/* ── Menu overlay ─────────────────────────────────────────────────────────── */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--bg-void);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.menu-overlay-controls {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  background: rgba(7, 7, 26, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.menu-overlay-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--bray-gold);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-menu-ctrl {
  font-family: 'Satoshi', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  transition: background 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.btn-menu-ctrl i { font-size: 15px; --ph-duotone-opacity: 0.3; }

.btn-menu-close {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-menu-close:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.15); }

.btn-menu-print {
  background: var(--bray-gold);
  border: none;
  color: #07071A;
  box-shadow: 0 0 14px rgba(255, 204, 0, 0.28);
}
.btn-menu-print:hover { box-shadow: 0 0 26px rgba(255, 204, 0, 0.5); }

/* ── Printable menu ───────────────────────────────────────────────────────── */
.printable-menu {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.menu-brand {
  text-align: center;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 204, 0, 0.18);
  position: relative;
}

.menu-brand-scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(255, 204, 0, 0.012) 2px, rgba(255, 204, 0, 0.012) 3px
  );
  pointer-events: none;
  border-radius: 12px;
}

.menu-brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 900;
  font-size: clamp(30px, 6.5vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--bray-gold);
  text-shadow: 0 0 40px rgba(255, 204, 0, 0.35), 0 0 80px rgba(255, 204, 0, 0.12);
  margin: 0 0 10px;
}

.menu-brand-tagline {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.menu-price-badge {
  display: inline-block;
  margin-top: 16px;
  background: var(--bray-gold-dim);
  border: 1px solid rgba(255, 204, 0, 0.28);
  border-radius: 100px;
  padding: 5px 18px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--bray-gold);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.menu-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 204, 0, 0.12);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.menu-card:hover {
  border-color: rgba(255, 204, 0, 0.35);
  box-shadow: 0 0 22px rgba(255, 204, 0, 0.08);
}

.menu-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 204, 0, 0.08);
  position: relative;
  overflow: hidden;
}
.menu-card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 204, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 204, 0, 0.03) 1px, transparent 1px);
  background-size: 18px 18px;
}
.menu-card-img i {
  font-size: 34px;
  color: rgba(255, 204, 0, 0.18);
  position: relative;
  z-index: 1;
  --ph-duotone-opacity: 0.25;
}

.menu-card-body { padding: 13px 15px 16px; }

.menu-card-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 5px;
  letter-spacing: -0.01em;
}

.menu-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.45;
  min-height: 34px;
}

.menu-card-price {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--bray-gold);
}

/* ── Tracker stats ────────────────────────────────────────────────────────── */
.tracker-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
}

.tracker-stat {
  background: var(--bg-elevated);
  padding: 18px 16px;
}

.tracker-stat-value {
  font-family: 'Geist Mono', monospace;
  font-size: 21px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  line-height: 1;
  margin-bottom: 5px;
}
.tracker-stat-value.gold { color: var(--bray-gold); }
.tracker-stat-value.pink { color: var(--neon-pink); }
.tracker-stat-value.teal { color: var(--neon-teal); }

.tracker-stat-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-family: 'Satoshi', sans-serif;
}

/* ── Tracker log ──────────────────────────────────────────────────────────── */
.tracker-log {
  padding: 18px 24px 28px;
}

.tracker-log-label {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.tracker-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.6;
}
.tracker-empty i {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
  --ph-duotone-opacity: 0.2;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.log-entry:last-child { border-bottom: none; }

.log-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.log-dot.sale    { background: var(--bray-gold); box-shadow: 0 0 5px var(--bray-gold-glow); }
.log-dot.expense { background: var(--neon-pink); box-shadow: 0 0 5px rgba(255,45,120,0.5); }

.log-body { flex: 1; min-width: 0; }

.log-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.log-date {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  flex-shrink: 0;
}

.log-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
}

.log-amount {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}
.log-amount.sale    { color: var(--bray-gold); }
.log-amount.expense { color: var(--neon-pink); }

.log-detail {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.45;
  word-break: break-word;
}

.log-delete {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 17px;
  padding: 4px 2px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  flex-shrink: 0;
  transition: color 0.15s;
  --ph-duotone-opacity: 0.2;
  margin-top: 1px;
}
.log-delete:hover { color: #FF5B6E; }

/* ── FABs (inline, widget header — top-right of Sales Tracker) ────────────── */
.tracker-fabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  align-self: flex-start;
  padding-top: 2px;
}

.tracker-fab {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  font-family: 'Satoshi', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  transition: box-shadow 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.tracker-fab:active { transform: scale(0.92); }

.tracker-fab-plus {
  background: var(--bray-gold);
  color: #07071A;
  box-shadow: 0 4px 18px rgba(255, 204, 0, 0.38);
}
.tracker-fab-plus:hover { box-shadow: 0 4px 30px rgba(255, 204, 0, 0.6); transform: translateY(-1px); }

.tracker-fab-minus {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 45, 120, 0.28);
  color: var(--neon-pink);
  box-shadow: 0 4px 14px rgba(255, 45, 120, 0.18);
}
.tracker-fab-minus:hover { box-shadow: 0 4px 22px rgba(255, 45, 120, 0.35); transform: translateY(-1px); }

.tracker-fab i { font-size: 22px; --ph-duotone-opacity: 0.3; }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.bray-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(7, 7, 26, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 500px) {
  .bray-modal-bg { align-items: center; padding: 20px; }
}

.bray-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px 20px 0 0;
  padding: 20px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 440px;
}

@media (min-width: 500px) {
  .bray-modal { border-radius: 20px; padding: 28px; }
}

.bray-modal-handle {
  width: 34px;
  height: 4px;
  background: rgba(255,255,255,0.14);
  border-radius: 2px;
  margin: 0 auto 18px;
}
@media (min-width: 500px) { .bray-modal-handle { display: none; } }

.bray-modal-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
  margin: 0 0 18px;
}

.bray-field { margin-bottom: 14px; }

.bray-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
  font-family: 'Satoshi', sans-serif;
}

.bray-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Satoshi', sans-serif;
  font-size: 15px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
  display: block;
}
.bray-input:focus {
  border-color: var(--bray-gold);
  box-shadow: 0 0 0 1px var(--bray-gold), 0 0 14px rgba(255, 204, 0, 0.14);
}

textarea.bray-input {
  resize: none;
  min-height: 76px;
  line-height: 1.5;
}

.bray-field-hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 5px;
  line-height: 1.4;
}

.bray-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn-modal-cancel {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: 'Satoshi', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 13px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  transition: background 0.14s;
}
.btn-modal-cancel:hover { background: var(--bg-elevated); }

.btn-modal-save {
  flex: 2;
  background: var(--bray-gold);
  border: none;
  border-radius: 10px;
  color: #07071A;
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 13px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  box-shadow: 0 0 14px rgba(255, 204, 0, 0.28);
  transition: box-shadow 0.2s, transform 0.15s;
}
.btn-modal-save:hover { box-shadow: 0 0 26px rgba(255, 204, 0, 0.5); transform: translateY(-1px); }
.btn-modal-save:active { transform: translateY(1px); }

.btn-modal-save.expense {
  background: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 45, 120, 0.28);
}
.btn-modal-save.expense:hover { box-shadow: 0 0 26px rgba(255, 45, 120, 0.5); }

/* ── Planner → no summary until after ingredients (no double border-radius) */
.planner-has-drinks .planner-summary { border-radius: 0; }
.planner-has-drinks .drinks-section { border-radius: 0 0 20px 20px; }

/* ── Print styles ─────────────────────────────────────────────────────────── */
@media print {
  body > *:not(.menu-overlay) { display: none !important; }

  .menu-overlay {
    position: static !important;
    background: #fff !important;
    overflow: visible !important;
  }
  .menu-overlay-controls { display: none !important; }
  .printable-menu { padding: 12px 0 0 !important; }

  .menu-brand-name  { color: #111 !important; text-shadow: none !important; }
  .menu-brand-tagline { color: #555 !important; }
  .menu-price-badge { background: #f0f0f0 !important; border-color: #ccc !important; color: #333 !important; }
  .menu-brand { border-bottom-color: #ddd !important; }
  .menu-brand-scanlines { display: none; }

  .menu-card { background: #fff !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .menu-card-name  { color: #111 !important; }
  .menu-card-desc  { color: #444 !important; }
  .menu-card-price { color: #111 !important; }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .bray-hero     { padding: 36px 20px 30px; }
  .bray-sections { padding: 0 16px 120px; gap: 20px; }

  .bray-widget-head  { padding: 20px 18px 0; }
  .ingredient-list   { padding: 12px 18px; }
  .drinks-section    { padding: 14px 18px 20px; }
  .menu-open-area    { padding: 16px 18px 20px; }
  .tracker-log       { padding: 14px 18px 24px; }
  .tracker-stat      { padding: 14px 14px; }

  .planner-stat-value  { font-size: 16px; }
  .tracker-stat-value  { font-size: 18px; }
  .tracker-fab         { width: 36px; height: 36px; }
  .tracker-fab i       { font-size: 18px; }
}

@media (max-width: 400px) {
  .drink-bar-track { display: none; }
}

/* ==========================================================================
   Updated component styles — ingredient rows, soda breakdown, menu cards
   ========================================================================== */

/* ── Widget overflow fix (clips stat backgrounds at rounded corners) ────── */
.bray-widget { overflow: hidden; }

/* ── Ingredient row — updated layout with yield + cost stack ─────────────── */
.ingredient-detail {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 1px;
  line-height: 1.3;
}

.ingredient-right {
  text-align: right;
  flex-shrink: 0;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.ingredient-yield {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--bray-gold);
  line-height: 1.2;
}
.ingredient-yield.zero { color: var(--text-faint); font-weight: 400; }
.ingredient-yield.warn { color: var(--neon-pink); }
.ingredient-yield.ok   { color: var(--neon-teal); }

/* Override old direct-child cost rule when it's inside .ingredient-right */
.ingredient-right .ingredient-cost {
  font-size: 11px;
  min-width: unset;
  flex-shrink: unset;
  line-height: 1.2;
}

/* ── Soda type breakdown rows ─────────────────────────────────────────────── */
.soda-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.soda-row:last-of-type { border-bottom: none; }

.soda-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.soda-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.soda-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 82px;
  flex-shrink: 0;
}

.soda-bar-track {
  flex: 1;
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.soda-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.28s ease;
  opacity: 0.85;
}

.soda-cans {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-primary);
  min-width: 62px;
  text-align: right;
  flex-shrink: 0;
}
.soda-cans.zero { color: var(--text-faint); }

.soda-row-menu {
  font-size: 11px;
  color: var(--text-faint);
  padding-left: 18px;
  line-height: 1.4;
}

/* ── Creamer status row ───────────────────────────────────────────────────── */
.cream-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  transition: border-color 0.2s, background 0.2s;
  font-size: 13px;
  font-weight: 500;
}

.cream-row i {
  font-size: 17px;
  --ph-duotone-opacity: 0.3;
  flex-shrink: 0;
  color: var(--text-faint);
  transition: color 0.2s;
}

#cream-status-text {
  transition: color 0.2s;
  color: var(--text-faint);
  line-height: 1.4;
}

.cream-row.ok   { border-color: rgba(0, 194, 204, 0.28); background: rgba(0, 194, 204, 0.05); }
.cream-row.ok i { color: var(--neon-teal); }
.cream-row.ok #cream-status-text { color: var(--neon-teal); }

.cream-row.warn   { border-color: rgba(255, 45, 120, 0.28); background: rgba(255, 45, 120, 0.05); }
.cream-row.warn i { color: var(--neon-pink); }
.cream-row.warn #cream-status-text { color: var(--neon-pink); }

/* ── Menu card — per-drink colored header ─────────────────────────────────── */
.menu-card {
  --drink-accent: var(--bray-gold);
  border-color: color-mix(in srgb, var(--drink-accent) 15%, transparent);
}
.menu-card:hover {
  border-color: color-mix(in srgb, var(--drink-accent) 40%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--drink-accent) 10%, transparent);
}

.menu-card-header {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--drink-accent) 14%, var(--bg-elevated)),
    color-mix(in srgb, var(--drink-accent) 5%, var(--bg-void))
  );
  border-bottom: 1px solid color-mix(in srgb, var(--drink-accent) 16%, transparent);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.menu-card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--drink-accent) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--drink-accent) 7%, transparent) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.menu-card-img-real {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.menu-card-drink-icon {
  font-size: 40px;
  color: var(--drink-accent);
  --ph-duotone-opacity: 0.35;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--drink-accent) 55%, transparent));
}

/* Soda base badge (replaces old .menu-card-img i rule) */
.menu-card-soda-badge {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--drink-accent);
  background: color-mix(in srgb, var(--drink-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--drink-accent) 22%, transparent);
  border-radius: 100px;
  padding: 2px 10px;
  display: inline-block;
  margin-bottom: 6px;
}

/* Print: menu card header hidden on page 1 (photos move to page 2) */
@media print {
  .menu-card-header { display: none !important; }
  .menu-card-soda-badge { background: #eee !important; border-color: #ccc !important; color: #555 !important; }
}

/* ── Build Your Own — subtle tagline-style text ───────────────────────────── */
.byo-subtle {
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: center;
}

.byo-subtle p {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.byo-cat { color: var(--text-primary); }

/* ── Signature drinks divider ─────────────────────────────────────────────── */
.menu-section-label {
  font-family: 'Syne', sans-serif;
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.menu-section-label::before,
.menu-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── Print photo page (page 2) ────────────────────────────────────────────── */
.print-photo-page { display: none; }

@media print {
  /* Page 1: BYO subtle text + text-only drink cards */
  .byo-subtle p  { color: #888 !important; opacity: 1 !important; }
  .menu-section-label { color: #888 !important; }
  .menu-section-label::before,
  .menu-section-label::after { background: #ddd !important; }

  /* Page 2: photo gallery */
  .print-photo-page {
    display: block;
    break-before: page;
    page-break-before: always;
    padding: 24px 0 0;
  }

  .print-photo-heading {
    font-family: 'Syne', sans-serif;
    font-weight: 900;
    font-size: 20px;
    color: #111;
    text-align: center;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
  }

  .print-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .print-photo-card { text-align: center; }

  .print-photo-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 5px;
  }

  .print-photo-name {
    font-family: 'Satoshi', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    display: block;
  }
}
