/*
 * The embeddable timetable (embed.html, js/embed.js): one event's set times
 * inside an iframe on another site. Built on the tokens of css/app.css and the
 * parts of css/ui.css; the only other colours are the stage colours, which are
 * data. One column of stages on a phone, as many as fit on a wide frame.
 */
.embed { padding: 14px 14px 22px; }

/* ---------- the event and the link to the full timetable ---------- */
.embed-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
}
.embed-title { flex: 1 1 14rem; min-width: 0; }
.embed-title h1 {
  margin: 0;
  font-family: var(--display); font-weight: 800; font-size: clamp(24px, 4.2vw, 34px); line-height: .95;
  text-transform: uppercase; overflow-wrap: anywhere; text-wrap: balance;
}
.embed-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.embed-head .button { flex: none; max-width: 100%; white-space: normal; text-align: center; }
.embed-head .button svg {
  width: 15px; height: 15px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- the days and "now", kept in view while the sets scroll ---------- */
/* Without day buttons (a one-day event that is not on now) the sets follow the header. */
.embed-bar[hidden] + #embedContent { margin-top: 14px; }
.embed-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 12px -14px 12px; padding: 8px 14px;
  background: var(--app); box-shadow: 0 1px 0 var(--line-strong);
}
/* Room around the buttons, so their focus ring is not cut off by the scroll box. */
.embed-days {
  display: flex; gap: 6px; flex: 1 1 auto; min-width: 0;
  margin: -3px; padding: 3px; overflow-x: auto; scrollbar-width: none;
}
.embed-days::-webkit-scrollbar { display: none; }
.embed-day {
  position: relative; flex: none; min-width: 54px; min-height: 44px; padding: 4px 10px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line-strong); line-height: 1.15;
}
.embed-day:hover { background: var(--chip); }
.embed-day b { font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.embed-day small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.embed-day[aria-pressed="true"] { background: var(--ink); color: var(--app); box-shadow: none; }
.embed-day[aria-pressed="true"] small { color: inherit; }
.embed-now { margin-left: auto; font-variant-numeric: tabular-nums; }
.embed-now i, .embed-live { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.embed-live { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; }

/* ---------- stages and sets ---------- */
.embed-stages {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 10px; align-items: start;
}
.embed-stage {
  min-width: 0; border-radius: 14px; overflow: hidden;
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.embed-stage h2 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; padding: 12px 14px 8px;
  font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1.05; text-transform: uppercase;
}
.embed-stage h2 i { align-self: center; width: 10px; height: 10px; border-radius: 3px; background: var(--stage); flex: none; }
.embed-stage h2 span { min-width: 0; overflow-wrap: anywhere; }
.embed-stage h2 small { font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--muted); text-transform: none; }
.embed-sets { margin: 0; padding: 0 0 4px; list-style: none; }
.embed-set {
  display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 7px 14px; font-size: 13.5px; line-height: 1.35;
}
.embed-set { border-top: 1px solid var(--line); }
/* A lineup (no times yet) is only names: on a wide stage they sit side by side. */
.embed-sets.no-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.embed-sets.no-times .embed-set { grid-template-columns: minmax(0, 1fr); }
.embed-set .t { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.embed-set.is-tba .t { white-space: normal; }
.embed-set .n { font-weight: 600; overflow-wrap: anywhere; }
.embed-set .pill { margin-left: 6px; }
.embed-set.is-now { background: var(--chip); box-shadow: inset 3px 0 0 var(--accent); }
.embed-set.is-now .t { color: var(--ink); font-weight: 700; }
.embed-set.is-past .n { color: var(--muted); font-weight: 500; }
.embed-set.is-off .n { color: var(--muted); text-decoration: line-through; }

/* ---------- notes and messages ---------- */
.embed-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--chip); font-size: 13.5px; font-weight: 600; }
.embed-about { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.embed-about summary { width: fit-content; cursor: pointer; color: var(--ink); font-weight: 600; }
.embed-about p { max-width: 75ch; margin: 6px 0 0; }
.embed-about b { color: var(--ink); }
.embed-loading { margin: 0; padding: 32px 0; color: var(--muted); text-align: center; }
.embed-message { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.embed-message b { color: var(--ink); font-size: 15px; }
.embed-message p { max-width: 46ch; margin: 0; overflow-wrap: anywhere; }
.embed-message .button { margin-top: 4px; white-space: normal; }

@media (min-width: 701px) {
  .embed { padding: 18px 20px 24px; }
  .embed-bar { margin-inline: -20px; padding-inline: 20px; }
}
