/* =============================================================
   Eats Now — Stitch "Culinary Modernism" Design System
   Plus Jakarta Sans (headings) + Inter (body)
   Brand Orange: #F97316  |  Cream BG: #FFFBF5  |  Peach: #FED7AA
   ============================================================= */

/* ---------- CSS Variables ---------- */
:root {
  --color-brand:        #F97316;
  --color-brand-dark:   #9d4300;
  --color-cream:        #FFFBF5;
  --color-peach:        #FED7AA;
  --color-peach-light:  #FFF7ED;
  --color-ink:          #111827;
  --color-ink-soft:     #584237;
  --color-outline:      #E0C0B1;
  --color-surface:      #FFFFFF;
  --shadow-card:        0 2px 12px rgba(17,24,39,0.04), 0 1px 3px rgba(17,24,39,0.06);
  --shadow-modal:       0 8px 32px rgba(17,24,39,0.12), 0 2px 8px rgba(17,24,39,0.08);
  --radius-sm:          0.25rem;
  --radius:             0.5rem;
  --radius-md:          0.75rem;
  --radius-lg:          1rem;
  --radius-xl:          1.5rem;
  --radius-pill:        9999px;
}

/* ---------- Base ---------- */
html, body {
  background-color: var(--color-cream);
  color: var(--color-ink);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.01em;
}

body,
p, span, label, input, textarea, select, button,
.font-body {
  font-family: Inter, sans-serif;
}

/* Display heading (hero titles) */
.text-display {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ---------- Cards ---------- */
.recipe-card,
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-peach);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.recipe-card:hover,
.card:hover {
  box-shadow: 0 6px 24px rgba(17,24,39,0.08), 0 2px 6px rgba(17,24,39,0.06);
  transform: translateY(-2px);
}

/* Tailwind card classes used on site */
.bg-white.rounded-xl,
.bg-white.rounded-lg,
a[href] .bg-white.rounded-xl {
  border: 1px solid var(--color-peach);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
a:hover .bg-white.rounded-xl,
a:hover .bg-white.rounded-lg {
  box-shadow: 0 6px 24px rgba(17,24,39,0.08);
  transform: translateY(-2px);
}

/* ---------- Search / Pill Input ---------- */
input[type="search"],
input[type="text"].search-input,
.search-pill {
  border-radius: var(--radius-pill) !important;
  border: 1.5px solid var(--color-outline);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  min-height: 48px;
  background: var(--color-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: Inter, sans-serif;
}
input[type="search"]:focus,
input[type="text"].search-input:focus,
.search-pill:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

/* Upgrade the hero search bar on the homepage */
form[action="/"] input[type="text"],
form[action="/"] input[type="search"] {
  border-radius: var(--radius-pill) !important;
  border: 1.5px solid var(--color-outline);
  min-height: 52px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  font-size: 1rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
form[action="/"] input[type="text"]:focus,
form[action="/"] input[type="search"]:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
form[action="/"] button[type="submit"] {
  border-radius: var(--radius-pill) !important;
  min-height: 52px;
  min-width: 52px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
/* Primary brand button */
.btn-primary,
button[type="submit"].bg-brand,
a.bg-brand {
  background-color: var(--color-brand);
  color: #fff;
  border-radius: var(--radius-lg);
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-primary:hover {
  background-color: var(--color-brand-dark);
  transform: translateY(-1px);
}

/* Tailwind orange button pattern used on the site */
.bg-orange-500,
.bg-orange-600 {
  transition: background-color 0.15s ease, transform 0.1s ease;
  min-height: 48px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
}
/* Actual fill colours — these were missing, so the button rendered
   white text on no background (i.e. invisible). Use the brand colour. */
.bg-orange-500 {
  background-color: var(--color-brand);
  color: #fff;
}
.bg-orange-600 {
  background-color: var(--color-brand-dark);
  color: #fff;
}
a.bg-orange-500:hover,
button.bg-orange-500:hover,
.hover\:bg-orange-600:hover {
  background-color: var(--color-brand-dark);
  transform: translateY(-1px);
}
/* Orange text utility (used by the "Reset" link) was also undefined */
.text-orange-500 {
  color: var(--color-brand);
}

/* ============================================================================
   Recipe tabs — wrap instead of horizontal scroll
   (ID selectors override the inline Tailwind `overflow-x-auto` utility)
   ========================================================================== */
#recipeTabs {
  flex-wrap: wrap;
  overflow-x: visible !important;
  justify-content: center;
  row-gap: 0;
}
#recipeTabs::-webkit-scrollbar { display: none; }     /* belt + suspenders */
#recipeTabs { scrollbar-width: none; }
#recipeTabs .tab-btn { flex: 0 0 auto; }

/* ============================================================================
   Nutrition estimator — polished empty-state card + visible button
   ========================================================================== */
#nutr-estimator { margin-top: 0.5rem; }

#nutr-cta {
  background: var(--color-peach-light);
  border: 1.5px dashed var(--color-peach);
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  gap: 1rem !important;
  text-align: center;
}
#nutr-cta::before {
  content: "\f200";                       /* fa-chart-pie */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--color-brand);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid var(--color-peach);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.12);
}
#nutr-cta p {
  color: #6b7280;
  max-width: 24rem;
  margin: 0 auto;
}

/* The button: forced brand fill so it can never render invisible again */
#nutr-calc-btn {
  background-color: var(--color-brand) !important;
  color: #fff !important;
  border: none;
  min-height: 46px;
  padding: 0.7rem 1.6rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.30);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
#nutr-calc-btn:hover {
  background-color: var(--color-brand-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.38);
}
#nutr-calc-btn:disabled {
  opacity: 0.75;
  transform: none;
  cursor: default;
}

/* Result view spacing */
#nutr-result-grid { margin-top: 0.25rem; }

/* ---------- Category Chips / Pills ---------- */
.category-chip,
a.rounded-full.text-sm {
  background: var(--color-peach-light);
  color: var(--color-ink);
  border: 1px solid var(--color-peach);
  font-family: Inter, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
a.rounded-full.text-sm:hover {
  background: var(--color-peach);
  border-color: var(--color-brand);
  color: var(--color-brand-dark);
}

/* ---------- Navigation ---------- */
nav, header {
  font-family: Inter, sans-serif;
}
nav a, header a {
  transition: color 0.15s ease;
}

/* ---------- Hero / Featured Section ---------- */
.hero-section h1,
.hero-section h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Section headings ---------- */
.section-heading {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

/* ---------- Rating Stars ---------- */
.star-rating {
  color: var(--color-brand);
}

/* ---------- Modal ---------- */
.modal-overlay {
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(2px);
}
.modal-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
}

/* ---------- Accessibility / Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Utility overrides ---------- */
.bg-brand { background-color: var(--color-brand); }
.text-brand {
  color: var(--color-brand);
}
