/* ==========================================================================
   Menu 2 Website — "Fresh" theme
   A friendly, food-delivery-inspired skin (think DoorDash / UberEats /
   Mastercard): warm tomato primary, amber accent, cream surfaces, big
   rounded corners, pill buttons, and soft elevation.

   Loaded AFTER styles.css so it only overrides design tokens and a small
   set of components. Remove this stylesheet (and the font link in
   includes/header.php) to revert to the original look.
   ========================================================================== */

:root {
  /* Core palette */
  --primary: #e8442e;              /* warm tomato red */
  --primary-soft: #fdebe7;         /* tinted background for chips/badges */
  --primary-hover: #cf331f;
  --accent: #ffeccc;               /* warm amber tint */
  --accent-strong: #f79e1b;        /* Mastercard amber */
  --ring: #e8442e;
  --secondary: #fff4e8;

  /* Surfaces & text */
  --background: #fdf9f3;           /* warm cream */
  --card: #ffffff;
  --popover: #ffffff;
  --input: #ffffff;
  --foreground: #211512;           /* warm near-black */
  --muted: #7c6f69;
  --muted-foreground: #7c6f69;
  --border: #f0e4d8;
  --sidebar: #fff7ed;
  --sidebar-border: #f0e4d8;
  --sidebar-primary: #e8442e;
  --sidebar-accent: #ffeccc;
  --sidebar-ring: #e8442e;

  --accent-foreground: #7a4a00;
  --card-foreground: #211512;
  --popover-foreground: #211512;
  --primary-foreground: #ffffff;
  --secondary-foreground: #6b4423;
  --sidebar-foreground: #211512;
  --sidebar-accent-foreground: #7a4a00;
  --sidebar-primary-foreground: #ffffff;

  /* Charts get a warm, appetizing range */
  --chart-1: #e8442e;
  --chart-2: #f79e1b;
  --chart-3: #2fa36b;
  --chart-4: #ff7a59;
  --chart-5: #8c5a3c;

  /* Shape & depth: big friendly radii, soft warm shadows */
  --radius: 1rem;
  --border-radius: 16px;
  --shadow-blur: 24px;
  --shadow-offset-y: 8px;
  --shadow-opacity: 0.07;
  --shadow-color: hsl(15 60% 20%);
  --shadow: 0 8px 24px rgba(120, 53, 15, 0.08);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;

  /* Compatibility aliases (defined in styles.css, re-pointed here) */
  --text: var(--foreground);
  --surface: var(--card);
  --primary-red: var(--primary);
  --primary-yellow: var(--accent);
  --text-dark: var(--foreground);
  --bg-body: var(--background);
  --bg-card: var(--card);
  --bg-footer: #2a1812;            /* warm espresso footer */
}

.dark {
  --primary: #ff6f54;
  --primary-soft: #3a221c;
  --primary-hover: #ff8a73;
  --accent: #3a2a16;
  --accent-strong: #f7b04f;
  --ring: #ff6f54;
  --secondary: #32231a;

  --background: #1b1310;
  --card: #261b16;
  --popover: #2b1f19;
  --input: #2f2119;
  --foreground: #f7ece6;
  --muted: #c4b3aa;
  --muted-foreground: #c4b3aa;
  --border: #433025;
  --sidebar: #221813;
  --sidebar-border: #433025;
  --sidebar-primary: #ff6f54;
  --sidebar-accent: #3a2a16;
  --sidebar-ring: #ff6f54;

  --accent-foreground: #ffd9a0;
  --card-foreground: #f7ece6;
  --popover-foreground: #f7ece6;
  --primary-foreground: #2a0f08;
  --secondary-foreground: #ecd9c8;
  --sidebar-foreground: #f7ece6;
  --sidebar-accent-foreground: #ffd9a0;
  --sidebar-primary-foreground: #2a0f08;

  --bg-footer: #140d0a;
}

/* --------------------------------------------------------------------------
   Typography: rounder, friendlier
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  letter-spacing: 0.005em;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Buttons: pill-shaped, confident, tactile
   -------------------------------------------------------------------------- */
.btn,
button.btn,
a.btn,
input[type="submit"].btn {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.btn:hover,
a.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 68, 46, 0.25);
}

.btn:active,
a.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Header: floating, friendly bar
   -------------------------------------------------------------------------- */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(120, 53, 15, 0.06);
}

.dark .site-header {
  background: rgba(27, 19, 16, 0.92);
}

.logo a {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo a span {
  color: var(--accent-strong);
}

.primary-nav a {
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.primary-nav a:hover {
  background: var(--primary-soft);
  color: var(--primary);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Cards & panels: lifted, rounded, generous
   -------------------------------------------------------------------------- */
.card,
.panel,
.dashboard-card,
.project-card,
.pricing-card,
.review-item,
.extraction-workspace,
.auth-card,
.form-card {
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card:hover,
.project-card:hover {
  box-shadow: 0 12px 32px rgba(120, 53, 15, 0.12);
  transition: box-shadow 0.15s ease;
}

/* --------------------------------------------------------------------------
   Forms: soft, rounded inputs with warm focus ring
   -------------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
select,
textarea {
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--input);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(232, 68, 46, 0.12);
  outline: none;
}

/* --------------------------------------------------------------------------
   Chips & tags: rounded, tinted, tappable
   -------------------------------------------------------------------------- */
.dietary-chip,
.tag,
.badge,
.status-pill {
  border-radius: 999px;
  font-weight: 600;
}

.dietary-chip {
  background: var(--card);
  border: 1.5px solid var(--border);
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.dietary-chip:hover {
  border-color: var(--accent-strong);
  background: var(--accent);
}

.dietary-chip--active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Tabs (extraction workspace etc.)
   -------------------------------------------------------------------------- */
.extraction-tab,
.tab {
  border-radius: 999px;
  font-weight: 700;
}

.extraction-tab.is-active,
.tab.is-active {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-footer);
  border-top: 4px solid var(--accent-strong);
}

/* ==========================================================================
   Ingredients & Nutrition panel (Pro feature)
   ========================================================================== */
.nutrition-panel {
  margin-top: 1rem;
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  background: var(--secondary);
  overflow: hidden;
}

.nutrition-panel__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--secondary-foreground);
  text-align: left;
}

.nutrition-panel__toggle:hover {
  background: var(--accent);
}

.nutrition-panel__summary {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.nutrition-panel__body {
  display: none;
  padding: 1rem;
  background: var(--card);
  border-top: 1.5px dashed var(--border);
}

.nutrition-panel.is-open .nutrition-panel__body {
  display: block;
}

.nutrition-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.nutrition-panel__status {
  font-size: 0.85rem;
  color: var(--muted);
}

.nutrition-panel__status--error {
  color: var(--destructive);
}

.nutrition-panel__status--success {
  color: #2fa36b;
}

.nutrition-ingredients {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nutrition-ingredients__row {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr auto;
  gap: 0.5rem;
  align-items: center;
}

.nutrition-ingredients__row input {
  margin: 0;
}

@media (max-width: 640px) {
  .nutrition-ingredients__row {
    grid-template-columns: 1fr;
  }
}

.nutrition-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nutrition-facts .form-group {
  margin: 0;
}

.nutrition-facts label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nutrition-meta-note {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--secondary);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin: 0 0 1rem;
}

.nutrition-assumptions {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
}

.nutrition-upsell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--primary-soft), var(--accent));
  border: 1.5px solid var(--border);
  margin: 1rem 0;
}

.nutrition-upsell strong {
  color: var(--primary);
}

.btn--ai {
  background: linear-gradient(120deg, var(--primary), var(--accent-strong));
  color: #fff;
  border: 0;
}

.btn--ai[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
