/* Texas Roadhouse Early Dine — base styles + 10 switchable themes.
   Theme is set on <html data-theme="slug">. Only colours, header style
   and a few layout details change per theme; content stays the same. */

/* ---- Theme 1: Rustic Roadhouse (default) ---- */
:root,
[data-theme="rustic-roadhouse"] {
  --bg: #f7efe2; --surface: #fffdf7; --text: #241a12; --muted: #6b5a48;
  --accent: #7a1f1f; --accent-2: #a83226; --header-bg: #1c1210; --header-text: #f7efe2;
  --card-border: #d9c7a7; --button-bg: #7a1f1f; --button-text: #fff;
  --font-head: Georgia, 'Times New Roman', serif; --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px; --header-style: solid;
}
[data-theme="dark-steakhouse"] {
  --bg: #121212; --surface: #1e1e1e; --text: #f2ede4; --muted: #b3a99a;
  --accent: #c9a227; --accent-2: #e0b93c; --header-bg: #000; --header-text: #f2ede4;
  --card-border: #3a3a3a; --button-bg: #c9a227; --button-text: #111;
}
[data-theme="clean-light-guide"] {
  --bg: #ffffff; --surface: #f6f7f8; --text: #1a1a1a; --muted: #5c6670;
  --accent: #c8102e; --accent-2: #e0314d; --header-bg: #ffffff; --header-text: #1a1a1a;
  --card-border: #e2e5e8; --button-bg: #c8102e; --button-text: #fff; --radius: 6px;
}
[data-theme="western-vintage"] {
  --bg: #efe3c8; --surface: #faf3df; --text: #3b2a18; --muted: #7a6248;
  --accent: #8b4513; --accent-2: #a0522d; --header-bg: #4a2f1a; --header-text: #efe3c8;
  --card-border: #cbb27a; --button-bg: #8b4513; --button-text: #fff;
  --font-head: Georgia, 'Times New Roman', serif;
}
[data-theme="bold-red-americana"] {
  --bg: #f4f6fb; --surface: #ffffff; --text: #16233f; --muted: #55617a;
  --accent: #b22234; --accent-2: #d62828; --header-bg: #b22234; --header-text: #fff;
  --card-border: #d5dce8; --button-bg: #16233f; --button-text: #fff; --radius: 4px;
}
[data-theme="modern-grill"] {
  --bg: #eef1f4; --surface: #ffffff; --text: #22292f; --muted: #5f6b76;
  --accent: #e8590c; --accent-2: #f76707; --header-bg: #22292f; --header-text: #fff;
  --card-border: #dde3e8; --button-bg: #e8590c; --button-text: #fff; --radius: 8px;
}
[data-theme="fresh-green"] {
  --bg: #f3f7ee; --surface: #ffffff; --text: #22301f; --muted: #5d6f57;
  --accent: #2f7d32; --accent-2: #43a047; --header-bg: #2f7d32; --header-text: #fff;
  --card-border: #d7e4cd; --button-bg: #2f7d32; --button-text: #fff;
}
[data-theme="midnight-blue-gold"] {
  --bg: #0f1c33; --surface: #16294a; --text: #eef2f8; --muted: #a9b8d0;
  --accent: #d4af37; --accent-2: #e5c15a; --header-bg: #0a1424; --header-text: #eef2f8;
  --card-border: #2c4266; --button-bg: #d4af37; --button-text: #111;
}
[data-theme="desert-sunset"] {
  --bg: #fdf0dd; --surface: #fff8ee; --text: #402512; --muted: #8a6a4d;
  --accent: #c1502e; --accent-2: #e07a3f; --header-bg: #7a3b1e; --header-text: #fdf0dd;
  --card-border: #e8c9a0; --button-bg: #c1502e; --button-text: #fff;
}
[data-theme="classic-newspaper"] {
  --bg: #fbfaf5; --surface: #ffffff; --text: #111111; --muted: #555555;
  --accent: #9e1b1b; --accent-2: #b91c1c; --header-bg: #fbfaf5; --header-text: #111111;
  --card-border: #111111; --button-bg: #111111; --button-text: #fff;
  --font-head: Georgia, 'Times New Roman', serif; --font-body: Georgia, 'Times New Roman', serif; --radius: 2px;
}

/* ---- Base layout (mobile-first) ---- */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; }
a { color: var(--accent); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.site-header { background: var(--header-bg); color: var(--header-text); padding: 16px 0 0; }
.site-header a { color: var(--header-text); text-decoration: none; }
.header-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; }
.brand { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; }
.brand span { color: var(--accent-2); }
.brand-tag { margin: 0; color: var(--header-text); opacity: .8; font-size: .9rem; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 0; }
.main-nav a { padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--accent-2); }
.theme-switcher { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.theme-switcher select { padding: 6px; border-radius: 6px; border: 1px solid var(--card-border); background: var(--surface); color: var(--text); }
.cat-nav { background: var(--accent); padding: 8px 0; }
/* The 13 category links wrap to a second line at every width, so every
   category is visible without horizontal scrolling. */
.cat-nav .wrap { display: flex; flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }
.cat-nav a { color: #fff; text-decoration: none; margin-right: 14px; font-size: .95rem; white-space: nowrap; flex-shrink: 0; }
.cat-nav a:last-child { margin-right: 0; }
.cat-nav a:hover { text-decoration: underline; }
main { padding: 24px 0 40px; }
.hero { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px 24px; margin-bottom: 24px; }
.hero h1 { margin-top: 0; font-size: 2rem; }
.btn { display: inline-block; background: var(--button-bg); color: var(--button-text); padding: 10px 18px; border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.btn:hover { opacity: .9; }
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .grid { grid-template-columns: 1fr 1fr; } .hero h1 { font-size: 2.6rem; } }
@media (min-width: 1000px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card, .menu-item { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 16px 18px; }
.card h2, .card h3 { margin-top: 0; }
.menu-item h3 { margin: 0 0 6px; font-size: 1.1rem; }
.menu-item h3 a { color: inherit; text-decoration: none; }
.menu-item h3 a:hover { text-decoration: underline; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 0; }
.price { font-weight: 700; color: var(--accent); font-size: 1.15rem; }
.calories { color: var(--muted); font-size: .9rem; }
.badge-sample { background: #f59e0b; color: #111; font-size: .7rem; padding: 2px 6px; border-radius: 4px; vertical-align: middle; font-family: var(--font-body); }
.notice { background: #fff8e1; color: #5d4037; border: 1px solid #ffcc02; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; }
[data-theme="dark-steakhouse"] .notice, [data-theme="midnight-blue-gold"] .notice { background: #2a2410; color: #ffe9a8; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--card-border); }
form label { display: block; margin: 12px 0 4px; font-weight: 600; }
form input, form select, form textarea { width: 100%; padding: 9px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
form button, .btn-admin { background: var(--button-bg); color: var(--button-text); border: 0; padding: 10px 16px; border-radius: var(--radius); cursor: pointer; font: inherit; }
.site-footer { background: var(--header-bg); color: var(--header-text); padding: 24px 0; font-size: .92rem; }
.site-footer a { color: var(--header-text); margin-right: 16px; }
.site-footer p { opacity: .9; }
.admin-table { font-size: .95rem; }
.theme-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .theme-list { grid-template-columns: 1fr 1fr; } }
.theme-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.theme-card.active { outline: 3px solid var(--accent); }

/* ---- Original photos (assets/img/) ---- */
.brand-logo { height: 48px; width: 48px; vertical-align: middle; margin-right: 10px; border-radius: 50%; }
.hero-img, .cat-banner { display: block; width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 16px; }
.hero-img { max-height: 420px; object-fit: cover; }
.cat-banner { max-height: 260px; object-fit: cover; }
.card-img { display: block; width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius); margin-bottom: 12px; }

/* ---- Smooth scrolling ---- */
/* Page scrolls (up and down) animate smoothly instead of jumping. The
   small scroll-padding keeps anchored sections clear of the page top. */
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
/* The horizontal category row scrolls smoothly too. */
.cat-nav .wrap { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html, .cat-nav .wrap { scroll-behavior: auto; }
}

/* ---- Back-to-top button ---- */
/* Small round button, bottom-right, dark red / cream like Theme 1
   Rustic Roadhouse. Hidden until the user has scrolled down. */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--button-bg); color: var(--button-text); font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease, visibility .3s; }
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { opacity: .9; }
.to-top:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ---- Admin theme preview bar ---- */
/* Shown only to a logged-in admin while previewing a theme (see
   preview_theme() in includes/data.php). Visitors never see it: the bar
   renders only when the admin's own session holds a preview theme. Fixed
   colours keep it readable in every theme. */
.preview-bar { position: sticky; top: 0; z-index: 100; background: #1a1a1a; color: #fff; border-bottom: 3px solid #c8102e; }
.preview-bar-inner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; }
.preview-bar p { margin: 0; flex: 1 1 300px; }
.preview-bar form { margin: 0; }
.preview-bar button { background: #c8102e; color: #fff; border: 0; padding: 8px 14px; border-radius: 4px; cursor: pointer; font: inherit; }
.preview-bar .preview-exit { background: #555; color: #fff; padding: 8px 14px; }
.theme-actions { display: flex; gap: 8px; align-items: center; }
.theme-actions form { margin: 0; }

/* ---- Cookie consent banner ---- */
/* Fixed bar at the bottom of every public page, shown on first visit
   only (see main.js: the choice is kept in localStorage, so no cookie
   is set before consent). Colours come from the active theme variables
   so it reads correctly in all 10 themes. While it is visible, the
   body gets extra bottom padding so the footer can scroll fully above
   it, and the back-to-top button is lifted above the bar. */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); color: var(--text); border-top: 1px solid var(--card-border); box-shadow: 0 -4px 16px rgba(0, 0, 0, .2); }
.cookie-banner-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.cookie-banner p { margin: 0; flex: 1 1 320px; font-size: .95rem; }
.cookie-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.cookie-actions .btn { padding: 8px 16px; }
.cookie-decline { background: transparent; color: var(--text); border: 1px solid var(--card-border); }
body.has-cookie-banner { padding-bottom: 84px; }
body.has-cookie-banner .to-top { bottom: 100px; }
@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner p { flex-basis: auto; }
  .cookie-actions .btn { flex: 1; }
  body.has-cookie-banner { padding-bottom: 172px; }
  body.has-cookie-banner .to-top { bottom: 188px; }
}
