/* CSS Variables & Theme System */
:root {
  --primary-color: #1976d2; /* Logo Blue */
  --secondary-color: #558b2f; /* Logo Green */
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --bg-light: rgba(255, 255, 255, 0.85);
  --bg-card: rgba(255, 255, 255, 0.92);
  --border-color: #e2e8f0;
  --accent-color: #e74c3c;
  --font-serif: 'Playfair Display', 'Times New Roman', serif;
  --font-sans: 'Outfit', 'Inter', sans-serif;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: #f7fafc;
  background-image: url('background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: 90px; /* Space for sticky basket */
  overflow-x: clip; /* Fix for position: sticky breaking on mobile */
}


/* Brightness Dimmer Overlay */
#brightness-dimmer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity var(--transition-normal);
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header & Logo Area */
header {
  background: var(--bg-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0 8px 0;
  position: relative;
  z-index: 101; /* Higher than tabs-container's z-index: 99 */
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 16px;
}

.logo-container {
  width: 180px;
  height: 90px;
  margin: 0 auto;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.logo-container:hover {
  transform: scale(1.02);
}

/* Controls (Brightness & Language Selectors) */
.controls-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(248, 250, 252, 0.9);
  padding: 10px 16px;
  border-radius: 12px;
  margin: 8px 16px;
  border: 1px solid var(--border-color);
}

/* Brightness Slider Styling */
.brightness-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
}

.brightness-icon {
  font-size: 1.1rem;
  color: var(--primary-color);
}

.brightness-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #cbd5e1;
  outline: none;
  transition: background var(--transition-fast);
}

.brightness-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 2px solid white;
}

.brightness-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 2px solid white;
}

/* Language Dropdown Selector */
.lang-selector {
  position: relative;
  min-width: 140px;
}

.lang-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: white;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.lang-select-btn:hover {
  border-color: var(--primary-color);
}

.lang-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 180px;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 110;
  display: none;
  list-style: none;
  padding: 4px 0;
}

.lang-dropdown-list.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

.lang-dropdown-item {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition-fast);
}

.lang-dropdown-item:hover {
  background: #f1f5f9;
  color: var(--primary-color);
}

.lang-dropdown-item.active {
  background: rgba(25, 118, 210, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

/* Sticky Category Tabs */
.tabs-container {
  background: var(--bg-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  padding: 4px 0;
}

.tabs-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.tabs-wrapper {
  display: flex;
  padding: 8px 16px;
  gap: 8px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.04);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.3);
}

/* Menu Content & Grid Layout */
.menu-sections {
  margin-top: 16px;
  padding-bottom: 24px;
}

.menu-section {
  scroll-margin-top: 65px; /* Offset for sticky tabs container only */
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-color);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: capitalize;
}

.section-divider {
  flex-grow: 1;
  height: 1px;
  background: var(--border-color);
}

/* Menu Items Grid */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .menu-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Menu Item Card */
.menu-item-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.menu-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(25, 118, 210, 0.2);
}

.menu-item-info {
  margin-bottom: 12px;
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.menu-item-title-block {
  flex-grow: 1;
}

.menu-item-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}

.menu-item-subtitle {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 4px;
}

.menu-item-price {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary-color);
  white-space: nowrap;
}

.menu-item-desc {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* Item Action Area (Add/Remove Counter) */
.menu-item-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: auto;
}

.add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
  transition: all var(--transition-fast);
}

.add-btn:hover {
  background: #1565c0;
  box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

.counter-controls {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 2px;
  border: 1px solid var(--border-color);
  animation: scaleUp 0.15s ease;
}

.counter-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.counter-btn:hover {
  background: #f8fafc;
  color: var(--primary-color);
}

.counter-val {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 12px;
  min-width: 32px;
  text-align: center;
}

/* Category Footers (Taverna Info Notes) */
.section-footer-notes {
  margin: 16px 8px;
  padding: 12px 16px;
  background: rgba(25, 118, 210, 0.04);
  border-left: 3px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: #475569;
}

.section-footer-note {
  margin-bottom: 4px;
  line-height: 1.4;
}

.section-footer-note:last-child {
  margin-bottom: 0;
}

/* Sticky Bottom Order Bar */
.bottom-basket-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  padding: 12px 16px 24px 16px; /* Extra padding for mobile bottom safe area */
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  z-index: 95;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.bottom-basket-bar.show {
  transform: translateY(0);
}

.basket-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary-color), #1e88e5);
  color: white;
  border: none;
  border-radius: 16px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(25, 118, 210, 0.3);
  transition: all var(--transition-fast);
}

.basket-btn:hover {
  box-shadow: 0 6px 14px rgba(25, 118, 210, 0.4);
  transform: translateY(-1px);
}

.basket-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.basket-badge {
  background: white;
  color: var(--primary-color);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.basket-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Waiter Order Modal / Bottom Sheet overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: white;
  width: 100%;
  max-width: 600px;
  border-radius: 24px 24px 0 0;
  padding: 24px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.modal-overlay.show .modal-sheet {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 16px;
}

.modal-title-block {
  text-align: left;
}

.modal-title {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.close-modal-btn {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-dark);
  transition: all var(--transition-fast);
}

.close-modal-btn:hover {
  background: #e2e8f0;
}

/* Order List Items - Waiter Optimized */
.order-items-list {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 4px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.order-item-details {
  flex-grow: 1;
  padding-right: 12px;
}

.order-item-titles {
  display: flex;
  flex-direction: column;
}

.order-item-main-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a202c;
  /* Extra styling for high contrast readability by the waiter */
}

.order-item-sec-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

.order-item-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-item-qty-badge {
  background: rgba(25, 118, 210, 0.1);
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  min-width: 45px;
  text-align: center;
  border: 1px solid rgba(25, 118, 210, 0.2);
}

.order-item-price-sum {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--secondary-color);
  min-width: 65px;
  text-align: right;
}

.order-summary-block {
  background: #f8fafc;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-label {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.summary-value {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--secondary-color);
}

/* Modal Bottom Actions */
.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-action-btn {
  flex-grow: 1;
  padding: 14px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.clear-btn {
  background: #fee2e2;
  color: #ef4444;
  flex-grow: 0.3;
}

.clear-btn:hover {
  background: #fecaca;
}

.done-btn {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 8px rgba(25, 118, 210, 0.2);
}

.done-btn:hover {
  background: #1565c0;
}

/* Empty State Styling */
.empty-basket-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
}

.empty-basket-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Custom Scrollbar for modern feel */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Accessibility and SEO helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

