/*
  Oasis Food — Delivery & Pickup Mobile Web App
  Design system: warm tropical night market. One committed dark base,
  one amber accent for selection/price, one terracotta accent for primary actions.
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Surface ramp — deep tropical night, not pure teal-template black */
  --bg-deep: oklch(22% 0.032 195);
  --bg-mid: oklch(27% 0.038 193);
  --surface: oklch(30% 0.035 190);
  --surface-hover: oklch(34% 0.036 188);
  --line: oklch(55% 0.04 190 / 0.22);
  --line-strong: oklch(65% 0.05 190 / 0.35);

  /* Ink */
  --ink: oklch(96% 0.015 95);
  --ink-muted: oklch(82% 0.02 95 / 0.78);
  --ink-faint: oklch(70% 0.02 95);

  /* Accents — amber carries selection/price, terracotta carries primary action */
  --amber: oklch(80% 0.15 78);
  --amber-strong: oklch(74% 0.16 72);
  --amber-deep: oklch(52% 0.11 62);
  --terracotta: oklch(55% 0.17 42);
  --terracotta-hover: oklch(60% 0.17 42);
  --terracotta-deep: oklch(42% 0.14 36);
  --danger: oklch(64% 0.19 25);

  --focus-ring: oklch(80% 0.15 78 / 0.55);

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.48);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --z-dropdown: 20;
  --z-bubble: 90;
  --z-modal-backdrop: 100;
  --z-modal: 101;
  --z-fullscreen: 200;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: #0b0f10;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Background wallpaper on desktop */
.desktop-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(rgba(6, 10, 10, 0.8), rgba(6, 10, 10, 0.8)), url('d780db8f-1231-4700-95df-af00e4c43b6c.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(14px) scale(1.1);
  z-index: -1;
  opacity: 0.7;
}

/* Main Mobile App Container */
.phone-container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: radial-gradient(ellipse 120% 60% at 50% -10%, var(--bg-mid) 0%, var(--bg-deep) 55%);
  border: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 481px) {
  .phone-container {
    height: 90vh;
    border-radius: 36px;
    border: 8px solid #1a1a1a;
    max-height: 850px;
  }
}

/* Scrollbar styling for dynamic lists */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--amber-deep);
  border-radius: 10px;
}

/* Safe Area Layout for Scrolling */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  padding-bottom: 90px; /* space for cart bubble */
  position: relative;
}

.hidden {
  display: none !important;
}

/* Focus visibility for keyboard/AT users (tap-highlight is suppressed above) */
button:focus-visible,
.category-card:focus-visible,
.special-card:focus-visible,
input:focus-visible,
textarea:focus-visible,
.lang-option:focus-visible,
.order-tab:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* --- COMPONENTS & TYPOGRAPHY --- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.gold-text {
  color: var(--amber);
}

/* Primary action button — flat terracotta, one consistent affordance */
.btn-primary {
  background: var(--terracotta);
  border: none;
  border-radius: var(--radius-sm);
  color: oklch(98% 0.01 90);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 160ms var(--ease-out-quart), transform 160ms var(--ease-out-quart), box-shadow 160ms var(--ease-out-quart);
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn-primary:hover {
  background: var(--terracotta-hover);
}

.btn-primary:active {
  transform: scale(0.97);
  background: var(--terracotta-deep);
  box-shadow: none;
}

/* --- HEADER --- */
header {
  padding: 14px 20px;
  background: oklch(20% 0.03 195 / 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 38px;
  width: auto;
}

.restaurant-title {
  display: flex;
  flex-direction: column;
}

.restaurant-title h1 {
  font-size: 17px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink);
}

.restaurant-title span {
  font-size: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.restaurant-title .restaurant-location {
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language Dropdown */
.lang-selector {
  position: relative;
  font-family: var(--font-sans);
}

.lang-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background-color 160ms var(--ease-out-quart);
}

.lang-btn:hover {
  background: var(--surface-hover);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-mid);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
}

.lang-dropdown.show {
  display: flex;
}

.lang-option {
  padding: 9px 16px;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 140ms;
  white-space: nowrap;
}

.lang-option:hover {
  background: var(--surface-hover);
}

/* Cart Icon Button */
.cart-btn-header {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background-color 160ms var(--ease-out-quart), transform 120ms var(--ease-out-quart);
}

.cart-btn-header:hover {
  background: var(--surface-hover);
}

.cart-btn-header:active {
  transform: scale(0.92);
}

.cart-badge-header {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--amber);
  color: oklch(24% 0.03 195);
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- HERO BANNER & SPECIALS --- */
.hero-section {
  margin-bottom: 22px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* Specials Slider */
.specials-slider {
  display: flex;
  overflow-x: auto;
  gap: 14px;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.special-card {
  flex: 0 0 82%;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

/* Overlay gradient for text readability */
.special-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
}

.special-content {
  position: relative;
  z-index: 2;
  padding: 14px;
}

.special-tag {
  background: var(--amber);
  color: oklch(24% 0.03 195);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.special-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: oklch(99% 0 0);
}

.special-price {
  color: var(--amber);
  font-size: 14px;
  font-weight: 600;
  margin-top: 3px;
  font-family: var(--font-sans);
}

/* Slider Dots Indicator */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: all 220ms var(--ease-out-quart);
}

.slider-dot.active {
  background: var(--amber);
  width: 16px;
  border-radius: 3px;
}

/* --- SEARCH BAR --- */
.search-container {
  margin-bottom: 22px;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 42px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 160ms var(--ease-out-quart), background-color 160ms var(--ease-out-quart);
}

.search-input::placeholder {
  color: var(--ink-faint);
}

.search-input:focus {
  border-color: var(--amber-deep);
  background: var(--surface-hover);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}

/* --- CATEGORIES --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.category-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  height: 72px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6px;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out-quart), border-color 160ms var(--ease-out-quart), transform 160ms var(--ease-out-quart);
}

.category-card:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
}

.category-card:active {
  transform: scale(0.96);
}

.category-card.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.category-name {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.1px;
  line-height: 1.25;
  transition: color 160ms;
}

.category-card.active .category-name {
  color: oklch(98% 0.01 90);
  font-weight: 700;
}

/* --- VIEW TRANSITIONS (home <-> menu) --- */
.view {
  transition: opacity 220ms var(--ease-out-quart), transform 220ms var(--ease-out-quart);
  opacity: 1;
  transform: translateX(0);
}

.view.view-exit {
  opacity: 0;
  transform: translateX(-14px);
}

.view.view-enter-start {
  opacity: 0;
  transform: translateX(14px);
}

@media (prefers-reduced-motion: reduce) {
  .view,
  .view.view-exit,
  .view.view-enter-start {
    transition: opacity 120ms linear;
    transform: none;
  }
}

/* --- DISH MENU LIST --- */
.dishes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dish-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  position: relative;
  transition: border-color 200ms var(--ease-out-quart), background-color 200ms var(--ease-out-quart);
  animation: dishIn 320ms var(--ease-out-quart) backwards;
}

@media (prefers-reduced-motion: reduce) {
  .dish-card {
    animation: none;
  }
}

@keyframes dishIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dish-card:hover {
  border-color: var(--line-strong);
}

.dish-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms var(--ease-out-quart), transform 120ms var(--ease-out-quart);
}

.dish-thumb:hover {
  border-color: var(--line-strong);
}

.dish-thumb:active {
  transform: scale(0.94);
}

.dish-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dish-thumb-placeholder {
  font-size: 24px;
  opacity: 0.5;
}

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

.dish-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.dish-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.dish-description {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}

.dish-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dish-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--amber);
}

/* Quantity controls & Add buttons */
.add-btn {
  background: var(--terracotta);
  border: none;
  border-radius: 8px;
  color: oklch(98% 0.01 90);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: background-color 160ms var(--ease-out-quart), transform 120ms var(--ease-out-quart);
}

.add-btn:hover {
  background: var(--terracotta-hover);
}

.add-btn:active {
  transform: scale(0.92);
  background: var(--terracotta-deep);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 2px 6px;
}

.qty-btn {
  background: none;
  border: none;
  color: var(--amber);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms var(--ease-out-quart);
}

.qty-btn:active {
  transform: scale(0.85);
}

.qty-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  min-width: 14px;
  text-align: center;
  display: inline-block;
}

.qty-val.bump {
  animation: qtyBump 220ms var(--ease-out-quart);
}

@keyframes qtyBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .qty-val.bump { animation: none; }
}

/* --- BOTTOM FLOATING CART BUBBLE --- */
.cart-floating-bubble {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--terracotta);
  color: oklch(98% 0.01 90);
  border-radius: 50px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 180ms var(--ease-out-quart), background-color 180ms var(--ease-out-quart);
  z-index: var(--z-bubble);
  animation: bubbleIn 320ms var(--ease-out-expo);
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cart-floating-bubble { animation: none; }
}

.cart-floating-bubble:hover {
  background: var(--terracotta-hover);
}

.cart-floating-bubble:active {
  transform: scale(0.94);
}

.cart-bubble-count {
  background: oklch(20% 0.03 195 / 0.35);
  color: oklch(98% 0.01 90);
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-bubble-text {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* --- MODALS & DRAWER LAYERS --- */
.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms var(--ease-out-quart), visibility 220ms;
}

.drawer-overlay.show {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 85%;
  background: var(--bg-mid);
  border-top: 1px solid var(--line-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: var(--z-modal);
  transform: translateY(100%);
  transition: transform 280ms var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.drawer.show {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .drawer-overlay,
  .drawer {
    transition-duration: 1ms;
  }
}

.drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 140ms;
}

.drawer-close:hover {
  color: var(--ink);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  flex-shrink: 0;
}

/* --- CART DRAWER SPECIFICS --- */
.spice-note {
  display: flex;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.cart-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 13px;
  color: var(--amber);
  font-weight: 600;
}

/* Per-item "extra spicy" stepper */
.spice-control {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.spice-btn {
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 120ms var(--ease-out-quart), background-color 160ms var(--ease-out-quart);
}

.spice-btn:hover {
  background: var(--surface-hover);
}

.spice-btn:active {
  transform: scale(0.88);
}

.spice-btn.dec-hidden {
  visibility: hidden;
}

.spice-icon {
  font-size: 12px;
}

.spice-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  min-width: 10px;
  text-align: center;
}

.spice-hint {
  font-size: 10.5px;
  color: var(--ink-faint);
  margin-left: 2px;
}

/* Total Summary in Cart */
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}

.summary-total {
  font-size: 21px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--amber);
}

.btn-checkout-submit {
  width: 100%;
  padding: 15px;
  font-size: 14px;
}

/* Empty cart state */
.empty-cart-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-cart-icon {
  font-size: 44px;
  opacity: 0.7;
}

/* --- CHECKOUT DRAWER SPECIFICS --- */
/* Tab switch for Pickup vs Delivery */
.order-type-tabs {
  display: flex;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
}

.order-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 180ms var(--ease-out-quart), color 180ms var(--ease-out-quart);
}

.order-tab.active {
  background: var(--terracotta);
  color: oklch(98% 0.01 90);
}

/* Checkout Form Input fields */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 5px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  outline: none;
  transition: border-color 160ms var(--ease-out-quart);
}

.form-control::placeholder {
  color: var(--ink-faint);
}

.form-control:focus {
  border-color: var(--amber-deep);
}

textarea.form-control {
  resize: none;
  height: 64px;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23968A78' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  margin-bottom: 10px;
}

.district-fee-note {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
  margin: -4px 0 10px;
}

.district-fee-note strong {
  color: var(--amber-deep);
}

.form-error {
  color: var(--danger);
  font-size: 11px;
  margin-top: 2px;
  display: none;
}

/* --- DELIVERY MAP PICKER --- */
.address-map-hint {
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.4;
  margin-bottom: 8px;
}

.map-picker {
  position: relative;
  height: 190px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.delivery-map {
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
}

.btn-locate-me {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;
  background: var(--terracotta);
  color: oklch(98% 0.01 90);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 160ms var(--ease-out-quart);
}

.btn-locate-me:hover {
  background: var(--terracotta-hover);
}

.btn-locate-me:active {
  transform: scale(0.96);
}

/* --- PAYMENT METHOD --- */
.payment-method-tabs {
  display: flex;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.pay-tab {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background-color 180ms var(--ease-out-quart), color 180ms var(--ease-out-quart);
}

.pay-tab.active {
  background: var(--terracotta);
  color: oklch(98% 0.01 90);
}

.pay-icon {
  font-size: 13px;
}

.pay-icon-paypal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1a2b5f;
  color: #ffc93c;
  font-size: 10px;
  font-weight: 800;
  font-family: Georgia, serif;
}

.btn-paypal-pay {
  padding: 11px 22px;
  width: 100%;
}

.payment-hint {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 8px;
  line-height: 1.4;
}

.qr-payment-box {
  margin-top: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-code-canvas img {
  display: block;
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}

.qr-amount-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--amber);
}

/* --- ORDER STATUS SCREEN (OUTRIDER) --- */
.outrider-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  z-index: var(--z-fullscreen);
  display: flex;
  flex-direction: column;
}

.outrider-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.outrider-back {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}

.outrider-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--amber);
  margin-right: 50px; /* offset back button to center title */
}

.outrider-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status-info-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.status-info-box h3 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.status-desc {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 4px;
}

.eta-large {
  font-size: 30px;
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--amber);
}

/* Timeline/Progress indicators */
.timeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin: 18px 10px 0 10px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--line-strong);
}

.timeline-progress-bar {
  position: absolute;
  top: 15px;
  left: 0;
  height: 2px;
  background: var(--amber);
  width: 50%; /* updates dynamically */
  transition: width 900ms var(--ease-out-quart);
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 14px;
  transition: all 220ms var(--ease-out-quart);
}

.timeline-step.active .step-dot {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-deep);
  box-shadow: 0 0 0 4px oklch(80% 0.15 78 / 0.18);
}

.timeline-step.completed .step-dot {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: oklch(98% 0.01 90);
}

.step-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-faint);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.timeline-step.active .step-label,
.timeline-step.completed .step-label {
  color: var(--ink);
}

/* Map widget */
.map-widget {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: #cce0d8;
  box-shadow: inset 0 0 24px rgba(0,0,0,0.3);
  min-height: 200px;
}

.map-svg {
  width: 100%;
  height: 100%;
}

.support-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.whatsapp-prompt-text {
  font-size: 11.5px;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.4;
}

.btn-support {
  padding: 13px;
  font-size: 12px;
}

/* Category detail view layout */
.menu-view-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.btn-back-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out-quart), transform 120ms var(--ease-out-quart);
  padding: 0;
}

.btn-back-arrow:hover {
  background: var(--surface-hover);
}

.btn-back-arrow:active {
  transform: scale(0.9);
}

.btn-back-arrow svg {
  width: 16px;
  height: 16px;
  display: block;
}

.active-category-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

/* --- DISH DETAIL MODAL (large photo + description) --- */
.dish-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 14, 0.6);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms var(--ease-out-quart), visibility 220ms;
}

.dish-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.dish-modal {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 460px;
  max-height: 86vh;
  background: var(--bg-mid);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: var(--z-modal);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 280ms var(--ease-out-expo), opacity 220ms var(--ease-out-quart), visibility 280ms;
}

.dish-modal.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 520px) {
  .dish-modal {
    bottom: 50%;
    transform: translate(-50%, 50%) scale(0.94);
    border-radius: var(--radius-lg);
  }

  .dish-modal.show {
    transform: translate(-50%, 50%) scale(1);
  }
}

.dish-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 15, 16, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.dish-modal-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dish-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dish-modal-placeholder {
  font-size: 56px;
  opacity: 0.4;
}

.dish-modal-body {
  padding: 18px 20px 22px;
}

.dish-modal-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.dish-modal-desc {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: 18px;
}

.dish-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dish-modal-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--amber);
}

.dish-modal-add {
  padding: 11px 22px;
  width: auto;
}

@media (prefers-reduced-motion: reduce) {
  .dish-modal,
  .dish-modal-overlay {
    transition: none;
  }
}

/* --- ORDER CHAT LOG (post-checkout notifications) --- */
.chat-log-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-log-heading {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.order-chat-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: dishIn 260ms var(--ease-out-quart) backwards;
}

@media (prefers-reduced-motion: reduce) {
  .chat-msg {
    animation: none;
  }
}

.chat-msg-icon {
  font-size: 16px;
  line-height: 1.3;
  flex-shrink: 0;
}

.chat-msg-text {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}

.chat-msg-time {
  font-size: 10.5px;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* --- ORDER HISTORY DRAWER --- */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: border-color 160ms var(--ease-out-quart);
}

.history-card:hover {
  border-color: var(--line-strong);
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.history-card-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-card-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.history-card-date {
  font-size: 11px;
  color: var(--ink-faint);
}

.history-card-status {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--amber);
  background: oklch(80% 0.15 78 / 0.14);
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.history-card-total {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--amber);
  margin-top: 8px;
}

.history-card-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: none;
  flex-direction: column;
  gap: 10px;
}

.history-card.expanded .history-card-details {
  display: flex;
}

.history-items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
}
