/* ==========================================================================
 * Festival Studio - Overview
 *
 * Rules for this screen only (st-overview-* classes). Cards, buttons, stat
 * tiles, badges, lists and people rows come from /studio/studio.css; this
 * file adds the two-column page, the festival header, the checklist rows,
 * the activity rows and the map box.
 *
 *  1. Page grid          st-overview  __main  __side  st-overview-skel
 *  2. Festival header    st-overview-hero
 *  3. Setup checklist    st-overview-setup  st-overview-checklist  st-overview-check
 *                        (built by js/ui/setup-list.js; Tickets > Ticket types uses it too)
 *  4. Coming up          st-overview-upcoming  st-overview-event
 *  5. Key numbers        st-overview-groups  st-overview-group  st-overview-stats
 *                        st-overview-tickets  st-overview-note  st-overview-infonote
 *  6. Venue preview      st-overview-venue
 *  7. Team               st-overview-team
 *  8. Narrow screens
 * ========================================================================== */

/* ---------- 1. Page grid ---------- */
/* Main column for what to do, side column for what is there. The side column
   follows the page width between two fixed limits so the stat tiles never
   get too narrow for a five-digit number. */
.st-overview { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 35%, 400px); gap: 16px; align-items: start; }
.st-overview__main, .st-overview__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* The tiles answer to the width of the side column, not of the window. */
.st-overview__side { container: st-overview-side / inline-size; }
.st-overview-skel { display: inline-block; max-width: 100%; vertical-align: middle; }

/* ---------- 2. Festival header ---------- */
.st-overview-hero { display: grid; grid-template-columns: clamp(140px, 30%, 216px) minmax(0, 1fr); overflow: hidden; }
.st-overview-hero__cover { position: relative; min-height: 164px; background: var(--st-bg-elev); border-right: 1px solid var(--st-border); }
.st-overview-hero__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-overview-hero__placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; font-size: 12.5px; color: var(--st-text-muted); }
.st-overview-hero__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 20px; }
.st-overview-hero__status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--st-text-dim); }
.st-overview-hero__badge { display: inline-flex; }
.st-overview-hero__title { font-size: 19px; font-weight: 700; letter-spacing: -0.012em; line-height: 1.3; overflow-wrap: anywhere; }
.st-overview-hero__meta { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--st-text-dim); }
.st-overview-hero__meta li { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.st-overview-hero__meta li > span { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.st-overview-hero__meta .st-icon { margin-top: 3px; color: var(--st-text-muted); }
.st-overview-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }

/* ---------- 3. Setup checklist ---------- */
.st-overview-setup__count { font-size: 13px; font-weight: 600; color: var(--st-text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 20px; }
/* The count sits in the card header; the bar's own caption would repeat it. */
.st-overview-setup__progress .st-progress__text { display: none; }
.st-overview-setup .st-card__body > .st-overview-checklist { margin-top: 6px; }
.st-overview-checklist { display: flex; flex-direction: column; }
.st-overview-check { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 0; border-top: 1px solid var(--st-border); }
.st-overview-check:first-child { border-top: 0; }
.st-overview-check:last-child { padding-bottom: 0; min-height: 49px; }
.st-overview-check__mark { display: grid; place-items: center; width: 20px; height: 20px; color: var(--st-text-muted); }
.st-overview-check.is-done .st-overview-check__mark { color: var(--st-green); }
.st-overview-check.is-error .st-overview-check__mark { color: var(--st-amber); }
/* Set, but wrong (Tickets: sales close before they open). */
.st-overview-check.is-problem .st-overview-check__mark { color: var(--st-red); }
.st-overview-check.is-problem .st-overview-check__detail { color: var(--st-red-text); }
.st-overview-check__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.st-overview-check__title { font-size: 13.5px; font-weight: 600; }
/* "Needed to publish" next to the items Publish checks (drafts only). */
.st-overview-check__title .st-badge { margin-left: 8px; vertical-align: 1px; font-weight: 600; }

/* Worth a look: the publish check's points on a published event (the Publish dialog's list look). */
.st-overview-look .st-publish__item--blocker .st-publish__icon { color: var(--st-red); }
.st-overview-look .st-publish__item--warning .st-publish__icon { color: var(--st-amber); }
.st-overview-look .st-small:empty { display: none; }
.st-overview-check__detail { font-size: 13px; line-height: 1.45; color: var(--st-text-dim); }
/* Finished items step back so the open ones read first. */
.st-overview-check.is-done .st-overview-check__title { font-weight: 500; color: var(--st-text-dim); }
.st-overview-check.is-done .st-overview-check__detail { color: var(--st-text-muted); }
.st-overview-check .st-overview-skel { margin: 5px 0 3px; }

/* The team's own marks and notes on a step (ui/setup-list.js, Nov 2026): quiet
   until used - a muted "..." per row, a lavender mark, a note card under the detail. */
.st-overview-check__controls { display: flex; align-items: center; gap: 2px; }
/* The note goes under the whole row, as wide as the text and the controls. */
.st-overview-check.has-below { row-gap: 2px; }
.st-overview-check__below { grid-column: 2 / -1; min-width: 0; }
.st-overview-check.is-unchecked .st-overview-check__mark { color: var(--st-lavender); }
.st-setup-more { color: var(--st-text-muted); }
@media (hover: hover) {
  .st-setup-more { opacity: 0.6; }
  .st-overview-check:hover .st-setup-more, .st-setup-more:focus-visible, .st-setup-more[aria-expanded="true"] { opacity: 1; }
}
.st-setup-mark { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; font-weight: 500; color: var(--st-lavender); }
.st-setup-mark .st-icon { flex: 0 0 auto; }
.st-setup-note {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; padding: 7px 4px 7px 10px;
  border-radius: var(--st-r-8); background: rgba(185, 174, 255, 0.06); border: 1px solid rgba(185, 174, 255, 0.18);
}
.st-setup-note__icon { flex: 0 0 auto; margin-top: 2px; color: var(--st-lavender); }
.st-setup-note__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-setup-note__text { font-size: 13px; line-height: 1.45; color: var(--st-text); white-space: pre-line; overflow-wrap: anywhere; }
.st-setup-note__by { font-size: 12px; color: var(--st-text-muted); }
.st-setup-note__edit { flex: 0 0 auto; width: 26px; height: 26px; margin: -3px 0; padding: 0; }
.st-setup-edit { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.st-setup-edit .st-textarea { min-height: 58px; font-size: 13px; line-height: 1.45; resize: vertical; }
.st-setup-edit__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.st-setup-edit__hint { flex: 1 1 auto; font-size: 12px; color: var(--st-text-muted); }
.st-setup-edit__count { font-size: 12px; color: var(--st-text-muted); font-variant-numeric: tabular-nums; }
.st-setup-edit__actions { display: flex; gap: 6px; margin-left: auto; }

/* ---------- 4. Coming up ---------- */
/* Rows are links with the kit's hover background; the negative margin lines
   their text up with the card title. */
.st-overview-upcoming > .st-list, .st-overview-upcoming__skeleton { margin: -4px -10px; }
.st-overview-event { gap: 14px; }
.st-overview-upcoming__skeleton .st-overview-event { display: flex; align-items: center; min-height: 52px; padding: 8px 10px; }
.st-overview-event__time { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; flex: 0 0 84px; line-height: 1.3; }
.st-overview-event__hour { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-overview-event__day { font-size: 12.5px; color: var(--st-text-muted); white-space: nowrap; }
.st-overview-event__icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: var(--st-r-10); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--st-border); color: var(--st-lavender); }
.st-overview-event__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.st-overview-event__title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-overview-event__sub { font-size: 12.5px; color: var(--st-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-overview-event__go { color: var(--st-text-muted); }
.st-overview-upcoming__more { margin-top: 12px; }

/* ---------- 5. Key numbers ---------- */
.st-overview-groups { display: flex; flex-direction: column; gap: 16px; }
.st-overview-group { min-width: 0; }
.st-overview-group__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; margin-bottom: 8px; }
.st-overview-group__label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--st-text-muted); }
.st-overview-group__link { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; margin-right: -4px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--st-text-dim); transition: color var(--st-ease); }
.st-overview-group__link:hover { color: var(--st-lavender); }
.st-overview-group__link .st-icon { color: currentColor; }
/* Tiles sit inside a card here, so they take the darker inset surface. */
.st-overview-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-overview-stats > .st-stat { padding: 12px 14px; background: var(--st-bg-elev); }
.st-overview-stats > .st-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.st-overview-stats .st-stat__value { min-height: 26px; font-size: 22px; line-height: 26px; }
.st-overview-stats .st-stat__value .st-overview-skel { vertical-align: -3px; }
.st-overview-stat__of { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--st-text-muted); }
/* A tile that is a link (vendor registration: into Vendors > Applications). The tile keeps its look; the link adds hover and focus. */
.st-overview-statlink { display: block; min-width: 0; border-radius: var(--st-r-12); color: inherit; text-decoration: none; }
.st-overview-stats > .st-overview-statlink > .st-stat { height: 100%; padding: 12px 14px; background: var(--st-bg-elev); transition: border-color var(--st-ease), background-color var(--st-ease); }
.st-overview-stats > .st-overview-statlink:last-child:nth-child(odd) { grid-column: 1 / -1; }
.st-overview-statlink:hover > .st-stat { border-color: var(--st-border-strong); background: var(--st-bg-hover); }
.st-overview-statlink:focus-visible { outline: 2px solid var(--st-focus); outline-offset: 2px; }
.st-overview-stat__retry { font-size: inherit; }
/* Just above the one-column breakpoint the side column is at its narrowest:
   the label icons go so that "Activity check-ins" still fits on one line. */
@container st-overview-side (max-width: 350px) {
  .st-overview-stats > .st-stat { padding: 11px 12px; }
  .st-overview-stats > .st-overview-statlink > .st-stat { padding: 11px 12px; }
  .st-overview-stats .st-stat__label .st-icon { display: none; }
}
.st-overview-tickets { display: flex; flex-direction: column; gap: 8px; }
.st-overview-tickets__note { font-size: 12.5px; line-height: 1.45; color: var(--st-text-muted); }
.st-overview-tickets__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -2px -6px -8px 0; font-size: 12.5px; color: var(--st-text-muted); font-variant-numeric: tabular-nums; }
.st-overview-note { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--st-r-12); border: 1px dashed var(--st-border-strong); background: var(--st-bg-elev); font-size: 13px; line-height: 1.5; color: var(--st-text-dim); }
.st-overview-note strong { color: var(--st-text); }
/* Information-only festival: one quiet line in place of the pass and scan tiles. */
.st-overview-infonote { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--st-text-muted); }
.st-overview-infonote > .st-icon { flex: 0 0 auto; margin-top: 2px; }
.st-overview-infonote strong { color: var(--st-text-dim); font-weight: 600; }

/* ---------- 6. Venue preview ---------- */
.st-overview-venue__map { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 440px; overflow: hidden; background: var(--st-bg-elev); border-top: 1px solid var(--st-border); border-radius: 0 0 13px 13px; }
.st-overview-venue__map.is-ready { cursor: pointer; }
/* Two classes on purpose: mapbox-gl.css loads later and sets
   .mapboxgl-map { position: relative }, which would collapse the box. */
.st-overview-venue__map > .st-overview-venue__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-overview-venue__wait { position: absolute; inset: 0; display: grid; place-items: center; background: var(--st-bg-elev); }
.st-overview-venue__map > .st-empty { height: 100%; justify-content: center; padding: 20px; }
.st-overview-venue__map > .st-map-fallback { min-height: 0; border: 0; }
.st-overview-venue__map > .st-map-fallback .st-btn { margin-top: 8px; }
.st-overview-venue__hint { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 10px; border-radius: var(--st-r-8); background: rgba(11, 15, 26, 0.9); border: 1px solid var(--st-border-strong); font-size: 12.5px; font-weight: 500; color: var(--st-text); pointer-events: none; }

/* ---------- 7. Team ---------- */
.st-overview-team__people { display: flex; flex-direction: column; gap: 12px; }
.st-overview-team__brand { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.st-overview-team__ghost { width: 32px; height: 32px; background: rgba(255, 255, 255, 0.08); }
.st-overview-team__you { font-weight: 500; color: var(--st-text-muted); }
.st-overview-team__none { font-size: 13px; color: var(--st-text-muted); }
.st-overview-team__more { font-size: 13px; }
.st-overview-team__counts { display: flex; flex-direction: column; padding-top: 4px; border-top: 1px solid var(--st-border); }
.st-overview-team__count { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0 0; font-size: 13.5px; }
.st-overview-team__count dt { color: var(--st-text-dim); }
.st-overview-team__count dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.st-overview-team__count dd.st-muted { font-weight: 400; }

/* ---------- 8. Narrow screens ---------- */
/* One column: the side cards follow the main ones, and the number groups sit
   two by two to use the width. */
@media (max-width: 1100px) {
  .st-overview { grid-template-columns: minmax(0, 1fr); }
  .st-overview-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; align-items: start; }
}

@media (max-width: 720px) {
  .st-overview-hero { grid-template-columns: minmax(0, 1fr); }
  .st-overview-hero__cover { min-height: 0; aspect-ratio: 16 / 7; border-right: 0; border-bottom: 1px solid var(--st-border); }
  .st-overview-groups { grid-template-columns: minmax(0, 1fr); }
  .st-overview-event__time { flex-basis: 72px; }
}
