/* /food/ tag page — paired with food.hbs (food-tag__ BEM namespace). */

.food-tag {
  --ft-ink: #fff;
  --ft-line: rgba(255, 255, 255, 0.22);
  --ft-card-bg: rgba(255, 255, 255, 0.06);
  --ft-card-bg-hover: rgba(255, 255, 255, 0.1);

  /* Mirror food-map.css's Dusk tokens. */
  --ft-map-bg: #0e2d58; /* bleu outremer foncé · 4320T */
  --ft-map-ink: #fffceb; /* blanc ivoire · 4320B */
  --ft-map-ink-dim: rgba(255, 252, 235, 0.72);
  --ft-map-accent: #e3b09b; /* rose clair · 32102 — matches --fm-accent */

  /* Matches screen.css --font-sans. */
  --ft-font: "Helvetica Neue", Helvetica, Arial, sans-serif;

  color: var(--ft-ink);
  font-family: var(--ft-font);
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────────────────────
   Bands (Features / Map / Reviews)
   ───────────────────────────────────────────────────────────── */

.food-tag__band {
  padding: 28px 32px 48px;
}

.food-tag__band-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}

/* Theme h2 defaults carry weight + scale; only add italic + colour. */
.food-tag__band-title {
  margin: 0;
  font-style: italic;
  color: var(--ft-ink);
}

.food-tag__band-title em {
  font-style: italic;
}

.food-tag__band-foot {
  margin-top: 28px;
  text-align: center;
}

/* :not([hidden]) lets food-tag.js hide the button when the Content API key is missing. */
.food-tag__load-more:not([hidden]) {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--ft-line);
  border-radius: 2px;
  color: var(--ft-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.food-tag__load-more:hover,
.food-tag__load-more:focus-visible {
  background: var(--ft-ink);
  color: var(--ft-map-bg);
  border-color: var(--ft-ink);
  outline: none;
}

/* ─────────────────────────────────────────────────────────────
   Features band
   ───────────────────────────────────────────────────────────── */

.food-tag__features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.food-tag__feature-card {
  display: flex;
  flex-direction: column;
  /* Flat cards — restore --ft-card-bg if the boxed look returns. */
  background: transparent;
  overflow: hidden;
}

.food-tag__feature-image {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.food-tag__feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.food-tag__feature-image[data-empty] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.16));
}

.food-tag__feature-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* No horizontal padding — text aligns with the image's left edge. */
  padding: 16px 0 0;
  flex: 1;
}

/* Cancel post-card-tags' screen.css margin. */
.food-tag__feature-body .post-card-tags {
  margin: 0;
}

.food-tag__feature-title {
  margin: 0;
  font-family: var(--ft-font);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ft-ink);
}

.food-tag__feature-title a {
  color: inherit;
  text-decoration: none;
}

.food-tag__feature-title a:hover,
.food-tag__feature-title a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Solid white — rgba 0.85 was borderline WCAG on the page blue. */
.food-tag__feature-excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ft-ink);
}

.food-tag__feature-excerpt:empty {
  display: none;
}

.food-tag__feature-date {
  margin-top: auto;
  padding-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ft-ink);
}

/* Map widget styles live in assets/css/food-map-widget.css (shared with the homepage). */

/* ─────────────────────────────────────────────────────────────
   Reviews band
   ───────────────────────────────────────────────────────────── */

.food-tag__reviews {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.food-tag__review-card {
  display: flex;
  flex-direction: column;
  /* Flat cards — restore --ft-card-bg if the boxed look returns. */
  background: transparent;
  overflow: hidden;
  /* Set per-card by food-tag.js from the cuisine hash. */
  --cuisine-color: var(--ft-line);
}

.food-tag__review-image {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.food-tag__review-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.food-tag__review-image[data-empty] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.16));
}

.food-tag__review-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* No horizontal padding — text aligns with the image's left edge. */
  padding: 14px 0 0;
  flex: 1;
}

/* nowrap keeps both badges on one line; food-tag.js shrinks the meta font-size if content overflows. */
.food-tag__review-meta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.7em;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  min-width: 0;
}

/* em padding scales with the JS font-shrink; deliberately BEM-distinct from food-map.css's panel tag. */
.food-tag__review-cuisine {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.2em 0.75em 0.3em;
  background: var(--ft-map-bg);
  color: var(--ft-map-ink);
  border: 1px solid var(--cuisine-color);
  border-radius: 2px;
  flex-shrink: 0;
}

.food-tag__review-cuisine::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  background: var(--cuisine-color);
  border-radius: 50%;
  flex-shrink: 0;
}

.food-tag__review-cuisine:empty {
  display: none;
}

.food-tag__review-neighborhood {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.2em 0.75em 0.3em;
  background: var(--ft-map-bg);
  color: var(--ft-map-ink);
  border: 1px solid var(--ft-map-ink);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Map-pin glyph marks the tag as a location; ink-white like the rest of the tag. */
.food-tag__review-neighborhood::before {
  content: "";
  width: 0.7em;
  height: 0.9em;
  background: var(--ft-map-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2C7.58 2 4 5.58 4 10c0 5.25 8 12 8 12s8-6.75 8-12c0-4.42-3.58-8-8-8zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2C7.58 2 4 5.58 4 10c0 5.25 8 12 8 12s8-6.75 8-12c0-4.42-3.58-8-8-8zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  flex-shrink: 0;
}

.food-tag__review-neighborhood:empty {
  display: none;
}

.food-tag__review-title {
  margin: 4px 0 2px;
  font-family: var(--ft-font);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ft-ink);
}

.food-tag__review-title a {
  color: inherit;
  text-decoration: none;
}

.food-tag__review-title a:hover,
.food-tag__review-title a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.food-tag__review-excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ft-ink);
}

.food-tag__review-excerpt:empty {
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .food-tag__reviews {
    grid-template-columns: repeat(2, 1fr);
  }
  .food-map-widget {
    grid-template-columns: 1fr;
  }
  .food-map-widget__copy {
    padding: 24px 20px 28px;
  }
  .food-map-widget__map {
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .food-tag__band {
    padding: 20px 20px 36px;
  }
  .food-tag__band-head {
    margin-bottom: 14px;
  }
  .food-tag__features,
  .food-tag__reviews {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .food-map-widget__copy {
    padding: 20px 20px 24px;
    gap: 10px;
  }
  .food-map-widget__stats {
    gap: 16px;
  }
  .food-map-widget__map {
    min-height: 180px;
  }
}
