/* EatOutLog website — shared design system
   Palette mirrors the app's Material3 tonal colors (app/.../ui/theme/Color.kt):
   light theme uses the *40 tones, dark theme uses *80 — same pairing here.
   Exception: --color-secondary is a deliberate departure from the app's
   OrangeGrey — that tone sits too close to --color-primary in hue to tell apart
   as adjacent chart-series colors (or, before this, as link text against orange
   buttons/accents). A genuinely different hue (blue) fixes both at the source,
   since this one token drives the site's link color and the charts' secondary
   series/legend swatch. */

:root {
  --color-primary: #ff6f3d;      /* Orange40 */
  --color-secondary: #2f6fb4;    /* deliberately off-palette — see note above */
  --color-tertiary: #7c6425;     /* Amber40 */
  --color-on-primary: #2b1200;   /* fixed dark text for on-primary surfaces, both themes */

  --color-bg: #fffbf8;
  --color-surface: #ffffff;
  --color-surface-alt: #fff1ea;
  --color-text: #2b1b14;
  --color-text-muted: #6b5850;
  --color-border: #f0ddd3;

  --radius-lg: 1.25rem;
  --radius-md: 0.75rem;
  --radius-sm: 0.5rem;
  --shadow-card: 0 1px 3px rgba(43, 27, 20, 0.08), 0 8px 24px rgba(43, 27, 20, 0.06);
  --max-width: 68rem;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Any class below that sets its own display (flex, grid, block, ...) has the same
   specificity as the browser's built-in [hidden]{display:none} — author CSS wins that
   tie, so without this, a plain .some-class{display:flex} silently overrides `hidden`
   and shows the element unconditionally, regardless of what JS sets el.hidden to. Real,
   live impact found 2026-09-05: the Verified Owner badge (.verified-owner-badge showed
   for accounts that own nothing), Browse's "Load more" buttons (.btn, stayed visible
   with nothing left to load), and the dish/restaurant stats grids (.profile-stats,
   showed blank before data loaded) — all via this exact collision. One global rule
   fixes the whole class of bug instead of patching each selector with :not([hidden]).
   !important is deliberate and appropriate here — [hidden] must always win, full stop. */
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-secondary);
}

a:hover {
  color: var(--color-primary);
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------- Header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand svg {
  width: 1.9rem;
  height: 1.9rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  color: var(--color-text);
}

.nav-toggle svg {
  width: 1.4rem;
  height: 1.4rem;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}

.link-button:hover {
  color: var(--color-primary);
}

.auth-not-configured {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-header .container {
    flex-wrap: wrap;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--color-border);
    margin-top: 0.75rem;
    padding-top: 0.5rem;
  }

  .site-nav li {
    padding-block: 0.6rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: 4rem 3rem;
  text-align: center;
}

.hero-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin-inline: auto;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0.5rem 0 0.75rem;
}

.hero .tagline {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-text-muted);
  max-width: 40rem;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

.hero p.lede {
  max-width: 38rem;
  margin-inline: auto;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.btn-primary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---------- Cards / sections ---------- */

.section {
  padding-block: 3rem;
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 780px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

.card svg {
  width: 2rem;
  height: 2rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
}

/* ---------- Legal / content pages ---------- */

.page-header {
  padding-block: 2.5rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.page-header .meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.draft-banner {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-tertiary);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--color-text);
  margin-block: 1.25rem 0;
}

.prose {
  max-width: 46rem;
  padding-block: 2.5rem;
}

.prose h2 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.callout {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
}

.request-form-shell {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.request-form-shell h2 {
  margin-top: 0;
}

.request-form-shell ul {
  padding-left: 1.25rem;
}

/* Deliberately fixed white/black, not theme-tokens — an experiment to see
   how the owner-analytics charts read as a plain printed-looking card,
   independent of the site's light/dark theme. Wraps the chart's own div
   rather than styling it directly: renderGroupedBarChart() clears that
   element's style attribute entirely on its "not enough data yet" path,
   which would silently strip inline framing styles placed there instead. */
.chart-frame {
  background: #ffffff;
  border: 1px solid #000000;
  padding: 1rem;
}

/* ---------- Badges ---------- */

/* Deliberately a different shape (pill, inline with the username) and color
   (blue, not tied to any achievement badge's own color) from the regular
   badge-chip grid below — it's not one of the collectible achievement badges,
   it's a distinct verification mark, and should read as one at a glance. This
   class is exactly what motivated the global [hidden] rule near the top of this
   file (see its comment) — found showing unconditionally regardless of `hidden`. */
.verified-owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1976d2;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: 999px;
  vertical-align: middle;
}

.verified-owner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.badge-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  max-width: 320px;
}

.badge-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-chip-label {
  margin: 0;
  font-weight: 600;
}

.badge-chip-description {
  margin: 0.15rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ---------- Feed / profile / follow lists ---------- */

.feed-grid {
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.feed-tile-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  cursor: zoom-in;
}

/* Grid of visitor-submitted photos (currently just menu photos) — thumbnails reuse
   .feed-tile-photo for sizing/lightbox behavior, this just controls the grid cells. */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.photo-gallery .feed-tile-photo {
  margin-bottom: 0;
}

/* display:none as the base rule, only overridden when [hidden] is absent — a rule
   that sets display unconditionally on a class silently beats the [hidden]
   attribute's own display:none (bit us twice already this session: the heart icon
   and the lightbox), so this is the safe way to pair "flex when shown" with
   "hidden by default". */
.pagination-controls {
  display: none;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.pagination-controls:not([hidden]) {
  display: flex;
}

/* ---------- Ad placeholders ----------
   No real ad network wired up yet — same "skeleton first" approach the app took
   with AdMob's test ad units (see PROJECT.md > Ads / Monetization), but there's no
   website equivalent of a universal test unit id to drop in without a real,
   verified publisher account, so this is a static placeholder rather than a live
   SDK integration. Swap the placeholder markup for a real ad unit once one exists. */

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block: 2rem;
  margin-inline: auto;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ad-placeholder--banner {
  width: 100%;
  max-width: 728px;
  height: 90px;
}

.ad-placeholder--rail {
  width: 300px;
  max-width: 100%;
  height: 250px;
}

/* ---------- Lightbox (js/lightbox.js) ---------- */

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  padding: 2rem;
  cursor: zoom-out;
}

/* [hidden] alone isn't enough — display:flex above would otherwise always win over
   the hidden attribute's implicit display:none, since author CSS beats it regardless
   of the hidden attribute's state (same bug class as the feed like-button icon). */
.lightbox-overlay:not([hidden]) {
  display: flex;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  cursor: default;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

/* ---------- Dish likers modal (js/dish-likers-modal.js) ----------
   Reuses .lightbox-overlay for the full-screen dim/center-content shape, but the
   content is a normal surface-colored card (a user list), not a full-bleed image —
   .lightbox-close's fixed white viewport-corner positioning is overridden below to
   sit inside the card instead. */
.likers-modal {
  position: relative;
  width: 100%;
  max-width: 24rem;
  max-height: 80vh;
  overflow-y: auto;
  cursor: default;
  padding: 1.5rem;
}

.likers-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  color: var(--color-text-muted);
  font-size: 1.75rem;
}

.likers-modal-close:hover {
  color: var(--color-primary);
}

.feed-tile-rating {
  color: var(--color-tertiary);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.like-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.like-button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.like-button.is-liked {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

.want-to-try-button.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

.like-count-button {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
}

.like-count-button:disabled {
  cursor: default;
}

.like-count-button:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.like-button-icon {
  display: inline-flex;
  line-height: 1;
}

/* Overrides .card svg (width/height/margin/color) — the feed tile is itself a .card,
   which was pinning this icon to a fixed 2rem with unwanted spacing and forced
   orange color regardless of the svg's own width/height attributes. */
.like-button .like-button-icon svg {
  width: 16px;
  height: 16px;
  margin-bottom: 0;
  color: inherit;
}

/* A tile's comment-count badge — links straight to that dish's #dish-comments-section
   rather than just the dish page, so it lands right on the comments instead of leaving
   the viewer to scroll and find them (see PROJECT.md > Social / Sharing > Comments). */
.comment-count-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  /* Separates it from the like cluster right before it (heart + count, tightly
     coupled via .like-row's own gap) — without this the like count and comment icon
     sat right on top of each other with no visual break between the two clusters. */
  margin-left: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  line-height: 1;
  text-decoration: none;
}

.comment-count-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* .comment-count-link is shared between an <a> (Browse/restaurant page, still
   navigates to dish.html) and a <button> (Home feed, opens the comments overlay
   below) — this resets the button-specific chrome so it matches the link's look. */
.comment-overlay-trigger {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* Same .card svg override as .like-button-icon svg above — missing margin-bottom:0
   here was the actual cause of the icon sitting visibly lower than the count next to
   it (a spacing fix alone didn't touch this; this is a vertical-alignment bug, not a
   horizontal one). */
.comment-count-link svg {
  width: 16px;
  height: 16px;
  margin-bottom: 0;
  color: inherit;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1rem;
  margin-block: 1.5rem;
}

.profile-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.profile-stat .value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.profile-stat .label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.user-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

/* ---------- Dish comments (js/dish-comments.js) ---------- */

.comment-textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  resize: vertical;
}

.comment-composer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.comment-composer .btn,
.comment-reply-form .btn {
  align-self: flex-end;
}

.comment-reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.comment-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  background: var(--color-surface);
}

.comment-item.is-deleted {
  color: var(--color-text-muted);
  font-style: italic;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.comment-meta a {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.comment-meta a:hover {
  color: var(--color-primary);
}

.comment-body {
  margin: 0 0 0.5rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-hidden-note {
  font-size: 0.75rem;
  color: var(--color-tertiary);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.comment-actions {
  display: flex;
  gap: 1rem;
}

.comment-actions button {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.comment-actions button:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.comment-admin-actions {
  margin-top: 0.35rem;
}

.comment-admin-actions button {
  color: var(--color-tertiary);
}

.comment-admin-actions button:hover {
  color: var(--color-primary);
}

.comment-replies {
  list-style: none;
  padding: 0 0 0 1rem;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.75rem;
  border-left: 2px solid var(--color-border);
}

/* Past MAX_VISUAL_DEPTH (js/dish-comments.js), further nesting stops indenting further
   so a very deep sub-thread doesn't squeeze the text into a sliver on a narrow screen —
   still fully threaded data-wise, just visually flattened from here down. */
.comment-replies.comment-replies-flat {
  padding-left: 0;
  border-left: none;
  margin-top: 0.5rem;
}

.comment-collapse-toggle,
.comment-view-thread {
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin-top: 0.5rem;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.comment-collapse-toggle:hover,
.comment-view-thread:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Reuses .lightbox-overlay/.card the same way .likers-modal does. */
.comment-report-modal {
  position: relative;
  width: 100%;
  max-width: 22rem;
  cursor: default;
  padding: 1.5rem;
}

.comment-thread-modal {
  position: relative;
  width: 100%;
  max-width: 36rem;
  max-height: 80vh;
  overflow-y: auto;
  cursor: default;
  padding: 1.5rem;
}

/* The Home feed's lightweight comments overlay (js/dish-comments.js's
   openDishCommentsOverlay) — same shape as .comment-thread-modal, just its own class
   since it wraps a dish title too, not only a comment list. */
.comment-dish-overlay-modal {
  position: relative;
  width: 100%;
  max-width: 36rem;
  max-height: 80vh;
  overflow-y: auto;
  cursor: default;
  padding: 1.5rem;
}

.comment-report-reasons {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 1.25rem;
}

.comment-report-reasons label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
}

.user-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
}

.user-list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
}

.user-list a:hover {
  color: var(--color-primary);
}

/* ---------- Admin fraud dashboard (admin.html / js/admin.js) ---------- */

.fraud-dashboard-row:hover {
  background: var(--color-surface-alt);
}

.sign-in-history-btn {
  font-size: 0.8rem;
}

.sign-in-history-panel {
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin: 0.35rem 0 0.75rem;
  font-size: 0.9rem;
}

.sign-in-history-panel ul {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
}

/* ---------- Browse (browse.html / js/browse.js) ---------- */

.browse-tabs {
  display: flex;
  gap: 0.75rem;
  margin-block: 1.5rem 1rem;
}

.browse-tabs [aria-selected="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}

.browse-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.browse-controls input[type="search"] {
  flex: 1 1 16rem;
}

.browse-controls input[type="search"],
.browse-controls select,
.tag-filter-option input {
  font: inherit;
}

.browse-controls input[type="search"],
.browse-controls select {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.dish-has-image-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.tag-filter {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.tag-filter legend {
  padding: 0 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.tag-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tag-filter-group-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.tag-filter-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
  padding-block: 2rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-primary);
}

/* ---------- Admin dashboard: fixed-theme data tables (js/admin.js) ----------
   Developer's ask (2026-09-03): dynamically-loaded content (tables populated from
   the API at runtime, via adminTableHtml()) should always look white-background/
   black-text, regardless of the site's light/dark theme — a deliberate convention
   marking it apart from static page chrome, not just a color preference for one
   table. Re-pins every color token this markup references — adminTableHtml()'s own
   inline var(--color-border)/var(--color-primary), plus class-based ones nested
   inside cells like .meta's var(--color-text-muted) and links' var(--color-
   secondary) — to fixed light-mode values, since CSS custom properties cascade to
   every descendant, not just the element they're set on. */
.admin-fixed-theme-table {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f2f2f2;
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-border: #dddddd;
  --color-primary: #ff6f3d;
  --color-secondary: #2f6fb4;
  --color-tertiary: #7c6425;
}
