/* admin/css/pages/overview.css — Overview (spec §5). Loaded by
   pages/event/overview.js through ensureStylesheet. Colours, radii and type
   come from tokens.css; nothing here repeats a token value. */

/* Two columns 1fr / 320px on wide screens (base.css collapses below 1200px). */
@media (min-width: 1200px) {
  .ov-page .admin-two-col {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* Below 1200px the side cards drop under the main column (spec §6). From
   900px they sit side by side: Kiosk link & QR takes the room, with its QR
   beside the link (the container query below), and Event status matches
   its height, so neither card leaves a hole under the other. Narrower, they
   stack full width and the Kiosk card still puts its QR beside the link. */
@media (min-width: 900px) and (max-width: 1199px) {
  .ov-page .settings-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    align-items: stretch;
  }
}

/* The one line under the stat tiles (what Captures counts; quota reached). */
.ov-stats-note {
  margin-top: 8px;
}

/* ── Readiness ──────────────────────────────────────────────────────────── */
.ov-ready-summary {
  margin: -4px 0 0;
}

.ov-ready-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ov-ready-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: background var(--dur) var(--ease-ui);
}

.ov-ready-item:hover {
  background: var(--surface-hi);
}

.ov-ready-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.ov-ready-mark {
  flex: 0 0 16px;
  font-weight: 700;
  text-align: center;
}

.ov-ready-mark--ok { color: var(--success); }
.ov-ready-mark--todo { color: var(--warning); }
.ov-ready-mark--optional { color: var(--text-faint); }

.ov-ready-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  min-width: 0;
}

.ov-ready-label {
  font-size: 14px;
  font-weight: 600;
}

.ov-ready-optional {
  font-weight: 400;
  color: var(--text-faint);
}

.ov-ready-hint {
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--text-faint);
}

/* Each row opens its page: a chevron at rest, pushed to the row's end. */
.ov-ready-text {
  flex: 1 1 auto;
}

.ov-ready-cue {
  flex: none;
  align-self: center;
  display: flex;
  color: var(--text-faint);
}

.ov-ready-cue .icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.6px;
  transform: rotate(-90deg);
}

/* ── Kiosk link & QR ────────────────────────────────────────────────────── */
/* Two groups (overview.js kioskCard): the link with Copy / Open, and the QR
   with Download. Stacked in the 320px desktop aside and on a phone; side by
   side once the card itself is wide enough. */
#ov-kiosk {
  container-type: inline-size;
}

.ov-kiosk-body,
.ov-kiosk-link,
.ov-kiosk-scan {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

@container (min-width: 500px) {
  .ov-kiosk-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 24px;
    align-items: start;
  }

  .ov-kiosk-scan .ov-qr {
    margin: 0;
  }
}

.ov-code {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  background: var(--field-bg);
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  user-select: all;
}

/* One path segment of the URL (overview.js breakableUrl): an inline-block,
   so the line breaks between segments (at a "/") and never at the hyphen
   inside the event code. A segment wider than the box wraps inside itself. */
.ov-code-seg {
  display: inline-block;
  max-width: 100%;
}

.ov-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  margin: 0 auto;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  background: var(--surface-hi);
  overflow: hidden;
}

/* The loaded code sits on a white plate with an 8px margin (legacy kiosk-QR
   dialog), so it keeps a scannable quiet zone in the dark theme too. The 8px
   inset keeps the code clear of the 12px corner radius. */
.ov-qr[data-ov-qr-state="ready"] {
  padding: 8px;
  background: #fff; /* functional: QR scanners need a light quiet zone, not a theme token */
}

.ov-qr img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.ov-qr-placeholder {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

.ov-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.ov-note--error {
  color: var(--danger);
}

/* ── Event status ───────────────────────────────────────────────────────── */
.ov-status-word {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.ov-status-word.badge--active { color: var(--success); }
.ov-status-word.badge--inactive { color: var(--text-dim); }
.ov-status-word.badge--deleted { color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  .ov-ready-item { transition: none; }
}
