/* QBuster Design System */
/* Based on docs/design_update.md */

:root {
  /* Color Palette */
  --color-orange-500: #F97316;
  --color-orange-600: #EA580C;
  --color-orange-700: #C2410C;
  --color-orange-100: #FFEDD5;
  --color-orange-50: #FFF7ED;

  --color-slate-900: #0F172A;
  --color-slate-800: #1E293B;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748B;
  --color-slate-400: #94A3B8;
  --color-slate-300: #CBD5E1;
  --color-slate-200: #E2E8F0;
  --color-slate-100: #F1F5F9;
  --color-slate-50: #F8FAFC;

  --color-teal-500: #14B8A6;
  --color-white: #FFFFFF;

  /* Semantic Colors */
  --primary: var(--color-orange-600);
  --primary-hover: var(--color-orange-700);
  --secondary: var(--color-slate-900);
  --bg-light: var(--color-slate-50);
  --text-main: var(--color-slate-900);
  --text-muted: var(--color-slate-600);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-orange: 0 10px 15px -3px rgba(249, 115, 22, 0.3);

  /* Border Radius */
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.5;
}

/* --- Typography --- */
.font-sans {
  font-family: 'Inter', sans-serif;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

/* --- Colors --- */
.text-white {
  color: var(--color-white);
}

.text-slate-900 {
  color: var(--color-slate-900);
}

.text-slate-600 {
  color: var(--color-slate-600);
}

.text-slate-500 {
  color: var(--color-slate-500);
}

.text-slate-400 {
  color: var(--color-slate-400);
}

.text-orange-600 {
  color: var(--color-orange-600);
}

.text-orange-500 {
  color: var(--color-orange-500);
}

.bg-white {
  background-color: var(--color-white);
}

.bg-slate-50 {
  background-color: var(--color-slate-50);
}

.bg-slate-100 {
  background-color: var(--color-slate-100);
}

.bg-slate-900 {
  background-color: var(--color-slate-900);
}

.bg-orange-50 {
  background-color: var(--color-orange-50);
}

.bg-orange-100 {
  background-color: var(--color-orange-100);
}

.bg-orange-500 {
  background-color: var(--color-orange-500);
}

.bg-orange-600 {
  background-color: var(--color-orange-600);
}

.border-orange-500 {
  border-color: var(--color-orange-500);
}

.border-slate-100 {
  border-color: var(--color-slate-100);
}

/* --- Components --- */

/* Buttons */
.btn-qb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-qb-primary {
  background-color: var(--color-orange-600);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.2);
}

.btn-qb-primary:hover {
  background-color: var(--color-orange-700);
  transform: translateY(-1px);
}

.btn-qb-secondary {
  background-color: var(--color-slate-900);
  color: white;
}

.btn-qb-secondary:hover {
  background-color: var(--color-slate-800);
}

.btn-qb-outline {
  background-color: transparent;
  border: 2px solid var(--color-slate-200);
  color: var(--color-slate-700);
}

.btn-qb-outline:hover {
  border-color: var(--color-orange-600);
  color: var(--color-orange-600);
}

.btn-qb-ghost {
  background-color: transparent;
  color: var(--color-slate-600);
}

.btn-qb-ghost:hover {
  background-color: var(--color-slate-100);
  color: var(--color-slate-900);
}

/* Cards */
.card-qb {
  background-color: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-slate-100);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.card-qb:hover {
  box-shadow: var(--shadow-md);
}

/* Badges */
.badge-qb {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Utilities */
.rounded-xl {
  border-radius: var(--radius-xl);
}

.rounded-2xl {
  border-radius: var(--radius-2xl);
}

.rounded-full {
  border-radius: var(--radius-full);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-xl {
  box-shadow: var(--shadow-xl);
}

.shadow-orange {
  box-shadow: var(--shadow-orange);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Typography Utilities */
.text-transparent {
  color: transparent;
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--gradient-from, var(--color-orange-600)), var(--gradient-to, #F59E0B));
}

.from-orange-600 {
  --gradient-from: var(--color-orange-600);
}

.to-amber-500 {
  --gradient-to: #F59E0B;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.text-7xl {
  font-size: 4.5rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .text-7xl {
    font-size: 3rem;
  }
}

/* Transform Utilities */
.perspective-1000 {
  perspective: 1000px;
}

.rotate-y-12 {
  transform: rotateY(-12deg) rotateZ(2deg);
}

.rotate-0-hover:hover {
  transform: rotateY(0) rotateZ(0);
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 500ms;
}

/* --- Menu Image Optimization --- */
.object-fit-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.menu-image-container {
  width: 100%;
  aspect-ratio: 4/3;
  /* STRICT 4:3 aspect ratio to match standard images */
  /* NO fixed height here - let the width determine the height */
  overflow: hidden;
  position: relative;
  background-color: var(--color-slate-50);
}

/* --- Menu Branding Header --- */

/* Outer wrapper: cover image area */
.menu-branding-header {
  position: relative;
  overflow: visible;
}

/* Cover image — fully visible, prominent */
.menu-branding-cover-area {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 340px;
  min-height: 180px;
  overflow: hidden;
  background: #1E293B;
}

.menu-branding-cover-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Subtle bottom gradient so the glass bar transitions smoothly */
.menu-branding-cover-area::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.15));
  pointer-events: none;
}

/* Fallback when no cover image */
.menu-branding-cover-area--no-image {
  aspect-ratio: 3 / 1;
  max-height: 160px;
  background: linear-gradient(135deg, #1E293B 0%, #334155 50%, #475569 100%);
}

/* ── Floating glass pill bar ── */
.menu-branding-bar {
  position: relative;
  z-index: 10;
  margin: -28px 1rem 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);

  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo inside the bar — left side, fixed size container */
.menu-branding-bar-logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-branding-bar-logo .dining-place-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  display: block;
}

.menu-branding-bar-logo .menu-branding-fallback-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--color-slate-100);
  color: var(--color-slate-500);
  font-size: 1.25rem;
}

/* Name + address — center, fills available space */
.menu-branding-bar-info {
  flex: 1;
  min-width: 0;
}

.menu-branding-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-branding-address {
  font-size: 0.7rem;
  color: var(--color-slate-500);
  margin: 0.1rem 0 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Table badge — right side */
.menu-branding-table-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--color-slate-100);
  color: var(--color-slate-600);
  border: 1px solid var(--color-slate-200);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}