/*
 * The Live section.
 *
 * Built from the tokens the rest of the site already uses — --text, --dim,
 * --line, --panel-2, --fill, --magenta — so it inherits the theme, both colour
 * schemes and the branded-domain accents without knowing they exist. There are
 * no new colours here, only new arrangements: a Live page should look like a
 * page of ersy, not like a second product wearing the same header.
 */

.gig-page { padding-bottom: 64px; }

.gig-head { align-items: flex-start; flex-wrap: wrap; gap: 16px; }

/* ------------------------------------------------------------ place control */

.gig-place {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-navelements, 20px);
  background: var(--panel-2);
  font-size: 13px;
}
.gig-place-ico { display: inline-flex; width: 18px; height: 18px; color: var(--dim); }
.gig-place-ico svg { width: 100%; height: 100%; }
.gig-place-now { color: var(--text); font-weight: 600; }
.gig-place-form { display: flex; gap: 6px; }
.gig-place-form input {
  min-width: 132px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-full, 100px);
  background: var(--fill);
  color: var(--text);
  font: inherit;
}
.gig-place-form input:focus-visible { outline: 2px solid var(--magenta); outline-offset: 1px; }
/* The privacy line is part of the control, not a footnote somewhere else — it
   is next to the button that would ask for a position. */
.gig-place-note { flex-basis: 100%; color: var(--dim); font-size: 12px; }
.gig-locate[disabled] { opacity: .6; cursor: progress; }

/* -------------------------------------------------------------------- cards */

.gig-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
.gig-rail > * { scroll-snap-align: start; flex: 0 0 auto; }
.gig-rail-wide > * { width: 220px; }

.gig-list { display: grid; gap: 10px; }
.gig-list .gig-card { width: 100%; }
/* Past dates read as history rather than as something to act on. */
.gig-list.is-past .gig-card { opacity: .72; }

.gig-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 340px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-cards, 8px);
  background: var(--panel-2);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.gig-card:hover { border-color: var(--magenta); transform: translateY(-1px); }
.gig-card:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }
/* A cancelled or postponed show stays legible and stops looking clickable-ish;
   it must still be findable by somebody holding a ticket. */
.gig-card.is-off { opacity: .78; }
.gig-card.is-off .gig-title { text-decoration: line-through; text-decoration-thickness: 1px; }

.gig-when {
  display: grid;
  place-items: center;
  padding: 6px 0;
  border-radius: var(--radius-small, 4px);
  background: var(--fill-2);
  line-height: 1.1;
}
.gig-when b { font-size: 20px; font-weight: 700; }
.gig-when em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }

.gig-body { display: grid; gap: 3px; min-width: 0; }
.gig-title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gig-sub, .gig-where {
  font-style: normal; font-size: 12.5px; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gig-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.gig-meta i { font-style: normal; font-size: 11.5px; color: var(--dim); }
.gig-why {
  font-size: 11px; color: var(--magenta); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.gig-art { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--fill-2); }
.gig-art img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ badges */

.gig-badge {
  display: inline-block;
  /*
   * A grid item is stretched to its column by default, and `display:
   * inline-block` is blockified inside one — so without this the badge on the
   * event hero rendered as a 640px-wide pill with three words floating at the
   * left of it. Applies harmlessly in the flex contexts it also sits in.
   */
  justify-self: start;
  padding: 2px 8px;
  border-radius: var(--radius-tags, 100px);
  border: 1px solid var(--line-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.gig-badge.is-onsale { border-color: var(--magenta); color: var(--magenta); }
.gig-badge.is-coming_soon { color: var(--text); }
.gig-badge.is-soldout, .gig-badge.is-offsale { color: var(--dim); }
/* The three that mean "this is not happening as planned" are the only ones
   that get a filled treatment — they have to survive being skimmed. */
.gig-badge.is-cancelled, .gig-badge.is-postponed, .gig-badge.is-rescheduled {
  background: var(--text); color: var(--bg); border-color: var(--text);
}

/* Paid placement is labelled wherever it appears. */
.gig-promoted {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--dim); border: 1px dashed var(--line-2);
  border-radius: var(--radius-tags, 100px); padding: 1px 7px;
}

/* Where the information came from. Quiet, but never absent. */
.gig-prov { display: inline-block; justify-self: start; font-size: 11.5px; color: var(--dim); }
.gig-prov.is-verified::before { content: '✓ '; }
.gig-prov.is-unverified::before { content: '· '; }

/* ------------------------------------------------------------------ actions */

.gig-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }

.gig-tix {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 10px 22px;
  border-radius: var(--radius-buttons, 40px);
  background: var(--magenta); color: #fff;
  font-weight: 700; text-decoration: none;
  min-height: var(--tap-min, 44px); justify-content: center;
}
.gig-tix em { font-style: normal; font-size: 11px; font-weight: 400; opacity: .85; }
.gig-tix:hover { filter: brightness(1.08); }
.gig-tix-none { color: var(--dim); font-size: 13.5px; align-self: center; }

.gig-save, .gig-cal {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  min-height: var(--tap-min, 44px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-buttons, 40px);
  background: transparent; color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.gig-save:hover, .gig-cal:hover { border-color: var(--magenta); }
.gig-save.on { border-color: var(--magenta); color: var(--magenta); }
.gig-save .yt-svg, .gig-cal .yt-svg { width: 18px; height: 18px; }
.gig-save.is-compact { padding: 7px 13px; min-height: 0; font-size: 12.5px; }

.gig-price { color: var(--dim); font-size: 13px; }

/* --------------------------------------------------------------- event page */

.gig-hero {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-xl, 12px);
  background: var(--panel-2);
  overflow: hidden;
}
.gig-hero-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .22;
}
.gig-hero-copy { position: relative; display: grid; gap: 6px; }
.gig-hero-copy h1 { margin: 4px 0 0; font-size: clamp(24px, 4vw, 38px); line-height: 1.1; }
.gig-hero-when { font-size: 16px; font-weight: 600; }
.gig-hero-doors, .gig-hero-dist { color: var(--dim); font-size: 13px; }
.gig-hero-where { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--dim); }
.gig-hero-where a { color: var(--text); }

/* A status change is the one thing on the page that must not be missed. */
.gig-alert {
  margin: 14px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--text);
  background: var(--fill-2);
  font-weight: 600;
}

.gig-prose { color: var(--dim); line-height: 1.55; max-width: 68ch; }
.gig-note { color: var(--dim); font-size: 13px; max-width: 68ch; }
.gig-thin { color: var(--dim); font-size: 13px; }
.gig-pref-promise { margin: 8px 0 14px; max-width: 62ch; line-height: 1.5; }
.gig-count { color: var(--dim); font-size: 13px; }

/* ------------------------------------------------------------------ line-up */

.gig-lineup { display: flex; flex-wrap: wrap; gap: 12px; }
.gig-act {
  display: grid; justify-items: center; gap: 5px;
  width: 104px; padding: 10px 6px;
  border-radius: var(--radius-cards, 8px);
  color: inherit; text-decoration: none; text-align: center;
}
.gig-act:hover { background: var(--fill-2); }
.gig-act-art { width: 62px; height: 62px; border-radius: 50%; overflow: hidden; background: var(--fill-2); }
.gig-act-art img { width: 100%; height: 100%; object-fit: cover; }
.gig-act strong { font-size: 13px; }
.gig-act em { font-style: normal; font-size: 11px; color: var(--dim); }

/* --------------------------------------------------- festivals, tours, city */

.gig-fest, .gig-tour, .gig-venue-card {
  display: grid; gap: 4px; padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-cards, 8px);
  background: var(--panel-2);
  color: inherit; text-decoration: none;
}
.gig-fest:hover, .gig-tour:hover, .gig-venue-card:hover { border-color: var(--magenta); }
.gig-fest-art, .gig-tour-art {
  height: 96px; margin: -12px -12px 8px;
  border-radius: var(--radius-cards, 8px) var(--radius-cards, 8px) 0 0;
  overflow: hidden; background: var(--fill-2);
}
.gig-fest-art img, .gig-tour-art img { width: 100%; height: 100%; object-fit: cover; }
.gig-fest strong, .gig-tour strong, .gig-venue-card strong { font-size: 14px; }
.gig-fest em, .gig-tour em, .gig-venue-card em { font-style: normal; font-size: 12px; color: var(--dim); }
.gig-fest i, .gig-tour i, .gig-venue-card i { font-style: normal; font-size: 11.5px; color: var(--magenta); }

.gig-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gig-city {
  display: grid; gap: 2px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-cards, 8px);
  background: var(--panel-2); color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.gig-city:hover { border-color: var(--magenta); }
.gig-city strong { font-size: 14px; }
.gig-city em { font-style: normal; font-size: 12px; color: var(--dim); }
.gig-city i { font-style: normal; font-size: 11.5px; color: var(--magenta); }

.gig-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gig-chips .chip i { font-style: normal; opacity: .6; margin-left: 4px; }

/* ----------------------------------------------------------------- filters */

.gig-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 14px 0 18px;
}
.gig-filters input[type="search"] { flex: 1 1 220px; }
.gig-filters input, .gig-filters select {
  padding: 9px 13px;
  min-height: var(--tap-min, 44px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-full, 100px);
  background: var(--fill); color: var(--text); font: inherit;
}
.gig-filters input:focus-visible, .gig-filters select:focus-visible {
  outline: 2px solid var(--magenta); outline-offset: 1px;
}
.gig-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }

/* ------------------------------------------------------------- preferences */

.gig-pref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.gig-pref {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border: 1px solid var(--line);
  border-radius: var(--radius-cards, 8px); cursor: pointer;
}
.gig-pref:hover { border-color: var(--line-3); }
.gig-pref input { margin-top: 2px; accent-color: var(--magenta); width: 18px; height: 18px; }
.gig-pref strong { display: block; font-size: 13.5px; }
.gig-pref em { font-style: normal; font-size: 12px; color: var(--dim); }

/* ----------------------------------------------------------- empty section */

.gig-empty {
  display: grid; justify-items: center; gap: 10px;
  padding: 46px 22px; margin: 18px 0;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-xl, 12px);
  text-align: center;
}
.gig-empty-ico { width: 40px; height: 40px; color: var(--dim); }
.gig-empty-ico svg { width: 100%; height: 100%; }
.gig-empty h2 { margin: 0; font-size: 20px; }
.gig-empty p { margin: 0; max-width: 56ch; color: var(--dim); line-height: 1.5; }
.gig-empty-admin { font-size: 13px; }
.gig-empty-admin code {
  padding: 2px 6px; border-radius: var(--radius-small, 4px);
  background: var(--fill-2); font-size: 12px;
}

/* ------------------------------------------------- the artist page's section */

.gig-artist-sec .gig-list { max-width: 720px; }

/*
 * The one card on an artist page that is doing the work the brief describes:
 * somebody arrived through the music and this tells them the artist is playing
 * near them. Given the accent border so it reads as an offer rather than as one
 * more row.
 */
.gig-nearby {
  display: grid; gap: 4px;
  padding: 14px 16px; margin-bottom: 12px;
  border: 1px solid var(--magenta);
  border-radius: var(--radius-cards, 8px);
  background: var(--magenta-soft, var(--panel-2));
}
.gig-nearby-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--magenta);
}
.gig-nearby strong { font-size: 16px; }
.gig-nearby em { font-style: normal; color: var(--dim); font-size: 13px; }
.gig-nearby-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }

.gig-past { margin-top: 14px; }
.gig-past summary { cursor: pointer; color: var(--dim); font-size: 13px; padding: 6px 0; }
.gig-past summary:hover { color: var(--text); }

.gig-day { margin-bottom: 18px; }
.gig-day h3 { font-size: 15px; margin: 0 0 8px; }

/* --------------------------------------------------------------- mobile */

@media (max-width: 760px) {
  .gig-card { width: 290px; grid-template-columns: 46px 1fr; }
  /* The artist thumbnail is the first thing to go: at this width the date,
     the name and the venue are what the card is for. */
  .gig-card .gig-art { display: none; }
  .gig-list .gig-card { width: 100%; }
  .gig-rail-wide > * { width: 172px; }
  .gig-actions { flex-direction: column; align-items: stretch; }
  .gig-actions > * { justify-content: center; text-align: center; }
  .gig-place { flex-direction: column; align-items: flex-start; }
  .gig-place-form { width: 100%; }
  .gig-place-form input { flex: 1; min-width: 0; }
  .gig-filters input, .gig-filters select { flex: 1 1 100%; }
  .gig-hero { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .gig-card { transition: none; }
  .gig-card:hover { transform: none; }
}

/* ----------------------------------------------------------- radius slider */

/*
 * How far to look. Only rendered once a location is set, so it always has a
 * centre to measure from.
 */
.gig-radius {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 2px 10px;
  border-left: 1px solid var(--line-2);
}
.gig-radius-val {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
  /* Fixed width so the bar does not jog sideways as the number changes while
     the thumb is being dragged. */
  min-width: 92px;
}
.gig-radius input[type="range"] {
  width: 116px;
  height: 20px;
  accent-color: var(--magenta);
  background: transparent;
  cursor: pointer;
}
.gig-radius input[type="range"]:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 760px) {
  /* On its own row: at this width it was sharing a line with the city field
     and both ended up too narrow to use. */
  .gig-radius {
    flex-basis: 100%;
    padding: 6px 0 0;
    border-left: 0;
    justify-content: space-between;
  }
  .gig-radius input[type="range"] { flex: 1; width: auto; margin-left: 10px; }
}
