/*
  shows-results.css
  The results area of the shows page: count and view toggle, the card grid, the map, and the right rail.
  The card shell (.fm-card, .fm-media, .fm-kicker) is in css/base.css; buttons are in shows-filters.css.
  Needs css/base.css.
*/


.fm-shows { padding-block: 1.25rem calc(var(--fm-section) * 0.6); }

/* ---------- Count + tools ---------- */
.fm-shows__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin-bottom: 1rem; }
.fm-shows__count { font-size: var(--fm-t-sm); font-weight: 600; color: var(--fm-muted); }
.fm-shows__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }

/* List | Map toggle */
.fm-views { display: flex; overflow: hidden; border: 1px solid var(--fm-blue); border-radius: 999px; background: #fff; }
.fm-views button { min-height: 2.6rem; padding: 0.4rem 1.2rem; font: inherit; font-size: var(--fm-t-sm); font-weight: 700; cursor: pointer; color: var(--fm-blue); background: none; border: 0; }
.fm-views button.is-on { color: #fff; background: var(--fm-blue); }

/* ---------- Layout: cards | rail ---------- */
.fm-shows__layout { display: grid; gap: var(--fm-gap); align-items: start; }
.fm-shows__main { min-width: 0; container-type: inline-size; }
.fm-shows__rail { display: grid; gap: var(--fm-gap); min-width: 0; }
.fm-shows__rail .fm-ad--mpu { margin-top: 0; }
/* Desktop: rail sits beside the cards and stays in view while they scroll */
@media (min-width: 62rem) { .fm-shows__layout { grid-template-columns: minmax(0, 1fr) 300px; } .fm-shows__rail { position: sticky; top: 1.5rem; } }
/* Tablet: the rail sits under the cards, its three boxes in a row where there is room */
@media (min-width: 48rem) and (max-width: 61.99rem) { .fm-shows__rail { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fm-shows__rail .fm-ad { grid-column: 1 / -1; } }

/* ---------- Cards ---------- */
.fm-shows__cards { display: grid; gap: calc(var(--fm-gap) * 0.7) calc(var(--fm-gap) * 0.6); }
@container (min-width: 32rem) { .fm-shows__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 62rem) { .fm-shows__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.fm-show { display: flex; flex-direction: column; }
.fm-show .fm-media { position: relative; }
.fm-show .fm-media img { aspect-ratio: 16 / 9; }
.fm-show .fm-card__body { flex: 1; padding-bottom: 1rem; }
.fm-show h3 { font-size: 1.0625rem; line-height: 1.3; }
.fm-show__line { margin-top: 0.3rem; font-size: var(--fm-t-xs); line-height: 1.45; color: var(--fm-muted); }
.fm-show h3 + .fm-show__line { margin-top: 0.5rem; }

/* White date chip on the photo, and the status badge */
.fm-show__date { position: absolute; left: 0.7rem; top: 0.7rem; z-index: 1; padding: 0.3rem 0.6rem; border-radius: 8px; background: #fff; box-shadow: 0 1px 6px rgb(0 20 40 / 0.2); font-size: 0.6875rem; font-weight: 700; line-height: 1.1; text-align: center; letter-spacing: 0.05em; color: var(--fm-blue); }
.fm-show__date b { display: block; font-family: var(--fm-serif); font-size: 1.35rem; font-weight: 600; letter-spacing: 0; color: var(--fm-ink); }
.fm-show__badge { position: absolute; right: 0.7rem; top: 0.7rem; z-index: 1; padding: 0.25rem 0.7rem; border: 1px solid var(--fm-blue); border-radius: 999px; background: #fff; font-size: 0.75rem; font-weight: 700; color: var(--fm-blue); }
.fm-show__badge.is-soon { background: var(--fm-blue); color: #fff; }

/* Footer row: distance or county on the left, small links on the right. Sits above the stretched headline link. */
.fm-show__foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 1.25rem; border-top: 1px solid var(--fm-rule); font-size: var(--fm-t-xs); }
.fm-show__dist { font-weight: 700; color: var(--fm-blue); }
.fm-show__where { color: var(--fm-muted); }
.fm-show__links { display: flex; gap: 0.9rem; }
.fm-show__foot a, .fm-show__foot button { padding: 0; font: inherit; font-weight: 700; color: var(--fm-blue); background: none; border: 0; cursor: pointer; }
.fm-show__foot a:hover, .fm-show__foot button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Map ---------- */
.fm-shows__map { height: 34rem; border-radius: var(--fm-radius); overflow: hidden; background: var(--fm-blue-tint); }
.fm-shows__map[hidden] { display: none; }
.fm-shows__map-note { display: grid; place-items: center; height: 100%; padding: 1.5rem; font-size: var(--fm-t-sm); color: var(--fm-muted); }

.fm-shows__empty { padding: 2rem; border: 2px dashed var(--fm-rule); border-radius: var(--fm-radius); background: #fff; text-align: center; color: var(--fm-muted); }
.fm-shows__empty[hidden], .fm-shows__more[hidden] { display: none; }
.fm-shows__more { margin-top: calc(var(--fm-gap) * 0.9); text-align: center; }

/* ---------- Rail boxes ---------- */
.fm-months h2, .fm-promo h2, .fm-browse h2 { margin-bottom: 0.7rem; font-size: 1.25rem; }
.fm-months ul, .fm-browse ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fm-months a, .fm-browse a { display: block; padding: 0.3rem 0.85rem; border: 1px solid var(--fm-rule); border-radius: 999px; font-size: var(--fm-t-xs); font-weight: 600; color: var(--fm-ink); }
.fm-months a:hover, .fm-browse a:hover { border-color: var(--fm-blue); color: var(--fm-blue); }
.fm-promo { background: var(--fm-blue-tint); }
.fm-promo p { margin-bottom: 1rem; font-size: var(--fm-t-sm); line-height: 1.5; color: var(--fm-muted); }

/* ---------- Browse by county (full-width band under the newsletter band) ---------- */
.fm-browse { padding-block: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); background: var(--fm-wash); }
.fm-browse h2 { margin-bottom: 1.25rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.fm-browse ul { gap: 0.7rem; }
.fm-browse a { padding: 0.55rem 1.3rem; font-size: 1.0625rem; background: #fff; }
