/* ============================================
   MESA.CSS — Barretus Grill Table Experience
   All dine-in specific styles
   ============================================ */

/* ---- TABLE MODE BANNER ---- */
.mesa-banner {
  background: linear-gradient(135deg, var(--ink-black), #1a0a00);
  color: var(--sun-yellow);
  padding: 10px 20px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 3px solid var(--clay-red);
  position: sticky;
  top: 60px;
  z-index: 99;
}

.mesa-banner.active { display: flex; }

.mesa-timer {
  background: rgba(255,184,0,0.15);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
}

/* ---- FLOATING ACTION BUTTONS (FAB) ---- */
.mesa-fab-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 500;
}

.mesa-fab-container.active { display: flex; }

.mesa-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--ink-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.2s;
  position: relative;
}

.mesa-fab:hover { transform: scale(1.1); }
.mesa-fab:active { transform: scale(0.95); }

.mesa-fab-refill { background: #3b82f6; color: white; }
.mesa-fab-waiter { background: var(--clay-red); color: white; }
.mesa-fab-utils { background: var(--cactus-green); color: white; }

.mesa-fab-label {
  position: absolute;
  right: 64px;
  background: var(--ink-black);
  color: var(--paper-bg);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.mesa-fab:hover .mesa-fab-label { opacity: 1; }

/* ---- DIETARY FILTERS ---- */
.mesa-filters {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mesa-filters::-webkit-scrollbar { display: none; }

.mesa-filter-chip {
  padding: 6px 14px;
  border: 2px solid var(--ink-black);
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  background: white;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mesa-filter-chip.active {
  background: var(--ink-black);
  color: var(--sun-yellow);
}

.mesa-filter-chip:hover { transform: translateY(-1px); }

/* ---- PORTION TOGGLE ---- */
.mesa-portion-toggle {
  display: flex;
  border: 2px solid var(--ink-black);
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0;
}

.mesa-portion-opt {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.mesa-portion-opt.active {
  background: var(--ink-black);
  color: var(--sun-yellow);
}

/* ---- MEAT DONENESS ---- */
.mesa-doneness {
  display: flex;
  gap: 6px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.mesa-doneness-opt {
  flex: 1;
  min-width: 70px;
  padding: 8px 4px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.mesa-doneness-opt.active {
  border-color: var(--clay-red);
  background: rgba(200,45,0,0.1);
  color: var(--clay-red);
  font-weight: bold;
}

.mesa-doneness-dot {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 0 auto 4px;
  border: 2px solid var(--ink-black);
}

/* ---- SPLIT BILL MODAL ---- */
.mesa-split-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.mesa-split-option {
  padding: 20px 12px;
  border: 3px solid var(--ink-black);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.mesa-split-option:hover {
  background: rgba(255,184,0,0.1);
  transform: translateY(-2px);
}

.mesa-split-option.active {
  background: var(--ink-black);
  color: var(--sun-yellow);
}

.mesa-split-option i { font-size: 2rem; display: block; margin-bottom: 8px; }

.mesa-people-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
}

.mesa-people-btn {
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink-black);
  border-radius: 50%;
  background: white;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mesa-people-count {
  font-family: var(--font-display);
  font-size: 3rem;
  min-width: 60px;
  text-align: center;
}

/* ---- TIP SELECTOR ---- */
.mesa-tip-row {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.mesa-tip-btn {
  flex: 1;
  padding: 14px 8px;
  border: 3px solid var(--ink-black);
  border-radius: 8px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  cursor: pointer;
  background: white;
  transition: all 0.2s;
}

.mesa-tip-btn.active {
  background: var(--cactus-green);
  color: white;
  border-color: var(--cactus-green);
}

.mesa-tip-btn:hover { transform: translateY(-1px); }

.mesa-tip-amount {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--clay-red);
  margin-top: 4px;
}

/* ---- PER-DISH RATING ---- */
.mesa-rating-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.mesa-rating-stars {
  display: flex;
  gap: 4px;
}

.mesa-rating-star {
  font-size: 1.4rem;
  cursor: pointer;
  color: #ddd;
  transition: color 0.15s;
}

.mesa-rating-star.filled { color: var(--sun-yellow); }
.mesa-rating-star:hover { color: var(--sun-yellow); }

/* ---- ALLERGEN BADGES ---- */
.mesa-allergens {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.mesa-allergen {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mesa-allergen-gluten { background: #fef3c7; color: #92400e; border: 1px solid #fbbf24; }
.mesa-allergen-lactose { background: #dbeafe; color: #1e40af; border: 1px solid #60a5fa; }
.mesa-allergen-nuts { background: #fce7f3; color: #9d174d; border: 1px solid #f472b6; }
.mesa-allergen-soy { background: #d1fae5; color: #065f46; border: 1px solid #34d399; }
.mesa-allergen-egg { background: #fef9c3; color: #854d0e; border: 1px solid #facc15; }

/* ---- HARMONIZATION CARD ---- */
.mesa-harmony-card {
  background: linear-gradient(135deg, #1a0a00, #2d1810);
  color: var(--paper-bg);
  padding: 16px;
  border-radius: 8px;
  border: 2px solid var(--sun-yellow);
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mesa-harmony-icon {
  font-size: 2rem;
  min-width: 40px;
  text-align: center;
}

.mesa-harmony-text {
  font-family: var(--font-heading);
  font-size: 0.85rem;
}

.mesa-harmony-text strong {
  color: var(--sun-yellow);
  display: block;
  margin-bottom: 2px;
}

.mesa-harmony-add {
  margin-left: auto;
  background: var(--sun-yellow);
  color: var(--ink-black);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

/* ---- WAIT QUEUE ---- */
.mesa-queue-card {
  background: white;
  border: 4px solid var(--ink-black);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  box-shadow: 6px 6px 0 var(--clay-red);
}

.mesa-queue-position {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--clay-red);
  line-height: 1;
}

.mesa-queue-estimate {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-top: 8px;
  color: var(--panel-muted);
}

/* ---- COLLECTION ALBUM ---- */
.mesa-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.mesa-collection-dish {
  aspect-ratio: 1;
  border: 3px solid #ddd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-family: var(--font-heading);
  text-align: center;
  padding: 6px;
  transition: all 0.2s;
  background: white;
}

.mesa-collection-dish.unlocked {
  border-color: var(--cactus-green);
  background: rgba(27,94,32,0.05);
}

.mesa-collection-dish.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.mesa-collection-dish i {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

/* ---- DARK MODE ---- */
body.mesa-dark {
  --paper-bg: #1a1a1a;
  --ink-black: #f5f5f5;
  --text-main: #e0e0e0;
}

body.mesa-dark .product-card { background: #2a2a2a; color: #e0e0e0; }
body.mesa-dark .category-list li { background: #2a2a2a; color: #e0e0e0; }
body.mesa-dark .main-header { background: rgba(30,30,30,0.95); }

/* ---- ACCESSIBILITY ---- */
body.mesa-accessible {
  font-size: 120%;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

body.mesa-accessible .product-card { font-size: 1.1rem; }
body.mesa-accessible .product-name { font-size: 1.3rem; }
body.mesa-accessible .product-price { font-size: 1.2rem; }

/* ---- BIRTHDAY MODE ---- */
.mesa-birthday-banner {
  background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #ff6b6b);
  background-size: 300% 100%;
  animation: birthdayGradient 3s ease infinite;
  color: white;
  text-align: center;
  padding: 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  display: none;
}

.mesa-birthday-banner.active { display: block; }

@keyframes birthdayGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- PREP TIME INDICATOR ---- */
.mesa-prep-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  color: var(--cactus-green);
  margin-top: 4px;
}

.mesa-prep-time i { font-size: 0.85rem; }

/* ---- STORYTELLING ---- */
.mesa-story {
  font-style: italic;
  font-size: 0.8rem;
  color: #777;
  margin-top: 6px;
  line-height: 1.4;
  border-left: 3px solid var(--sun-yellow);
  padding-left: 10px;
}

/* ---- LANGUAGE SWITCHER ---- */
.mesa-lang-switch {
  display: flex;
  gap: 6px;
}

.mesa-lang-btn {
  padding: 4px 10px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  background: transparent;
  color: var(--paper-bg);
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: bold;
}

.mesa-lang-btn.active {
  background: var(--sun-yellow);
  color: var(--ink-black);
  border-color: var(--sun-yellow);
}

/* ---- CHALLENGE TIMER ---- */
.mesa-challenge-timer {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--clay-red);
  text-align: center;
  margin: 20px 0;
}

.mesa-challenge-progress {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.mesa-challenge-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cactus-green), var(--sun-yellow), var(--clay-red));
  transition: width 1s linear;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .mesa-split-grid { grid-template-columns: 1fr; }
  .mesa-tip-row { flex-wrap: wrap; }
  .mesa-tip-btn { min-width: calc(50% - 10px); }
  .mesa-fab-container { bottom: 80px; right: 12px; }
  .mesa-fab { width: 48px; height: 48px; font-size: 1.2rem; }
  .mesa-filters { padding: 8px 12px; }
  .mesa-doneness { gap: 4px; }
  .mesa-doneness-opt { min-width: 60px; font-size: 0.65rem; }
}
