/* BoxOfficeCloud public website — BRAND.md option F (accessible arts venue).
   Tokens mirror BRAND §3.1. Tenants may override --bo-brand / --bo-brand-dark only. */
:root {
  --bo-brand: #0B3C5D;
  --bo-brand-dark: #082B43;
  --bo-action: #00703C;
  --bo-action-hover: #005A30;
  --bo-action-shadow: #002D18;
  --bo-focus: #FFD23F;
  --bo-link: #1D70B8;
  --bo-link-visited: #4C2C92;
  --bo-text: #0B0B0B;
  --bo-text-secondary: #505A5F;
  --bo-border: #B1B4B6;
  --bo-surface: #FFFFFF;
  --bo-surface-alt: #F3F2F1;
  --bo-warning: #F47738;
  --bo-danger: #D4351C;
  --bo-info-bg: #E8F1F8;
  --bo-font: "Atkinson Hyperlegible Next", Arial, "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  font-family: var(--bo-font);
  font-size: 1.1875rem; /* 19px */
  line-height: 1.5;
  color: var(--bo-text);
  background: var(--bo-surface);
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
}

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1.25rem; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 2rem 0 1rem; }

a { color: var(--bo-link); text-decoration: underline; text-underline-offset: 0.15em; }
a:visited { color: var(--bo-link-visited); }
a:hover { text-decoration-thickness: 3px; }

/* Focus: yellow background + black text on every interactive element (BRAND §10). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid transparent;
  background-color: var(--bo-focus);
  box-shadow: 0 -2px var(--bo-focus), 0 4px var(--bo-text);
  color: var(--bo-text);
  text-decoration: none;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  background-color: var(--bo-surface);
  outline: 3px solid var(--bo-focus);
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--bo-text);
}

.bo-container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.bo-section { padding: 1.5rem 1.25rem 3rem; }

.bo-skip-link {
  position: absolute; left: -9999px; top: 0; padding: 0.5rem 1rem; background: var(--bo-focus); color: var(--bo-text);
}
.bo-skip-link:focus { left: 0; z-index: 10; }

/* Header */
.bo-header { background: var(--bo-brand); color: #fff; }
.bo-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; flex-wrap: wrap; }
.bo-header__brand { color: #fff; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.bo-header__brand:visited { color: #fff; }
.bo-header__nav { display: flex; gap: 1.25rem; margin-left: auto; flex-wrap: wrap; }
.bo-header__nav a, .bo-header__nav a:visited, .bo-header__basket, .bo-header__basket:visited { color: #fff; font-size: 1rem; }
.bo-header__actions { display: flex; align-items: center; gap: 1rem; }
.bo-badge { display: inline-block; min-width: 1.5em; padding: 0 0.35em; background: #fff; color: var(--bo-brand); font-weight: 700; text-align: center; }

/* Search band with yellow stripe */
.bo-search-band { background: var(--bo-surface); border-bottom: 4px solid var(--bo-focus); padding: 2rem 0 1.25rem; }
.bo-search { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.bo-search__query { flex: 1 1 320px; }
.bo-field { display: flex; flex-direction: column; gap: 0.25rem; }
.bo-label { font-weight: 700; font-size: 1rem; }
.bo-input { font: inherit; font-size: 1rem; min-height: 44px; padding: 0.4rem 0.6rem; border: 2px solid var(--bo-text); border-radius: 0; background: #fff; }

.bo-access-filters { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1rem; font-size: 1rem; }

/* Buttons: square, 44px min, darker bottom bar (BRAND §5) */
.bo-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.5rem 1.25rem;
  font: inherit; font-size: 1rem; font-weight: 700;
  color: #fff; background: var(--bo-action); border: 0; border-radius: 0;
  box-shadow: 0 2px 0 var(--bo-action-shadow); cursor: pointer; text-decoration: none;
}
.bo-button:visited { color: #fff; }
.bo-button:hover { background: var(--bo-action-hover); }
.bo-button--focus { background: var(--bo-focus); color: var(--bo-text); box-shadow: 0 2px 0 #b38f00; }
.bo-button--focus:visited { color: var(--bo-text); }
.bo-button--focus:hover { background: #f5c400; }

/* Notices */
.bo-notice { background: var(--bo-info-bg); border-left: 5px solid var(--bo-link); padding: 0.75rem 1rem; font-size: 1rem; }

/* Listing rows */
.bo-listing { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bo-border); }
.bo-listing__row {
  display: grid; grid-template-columns: minmax(0, 1fr) 160px 200px; gap: 1rem; align-items: center;
  padding: 1rem 0; border-bottom: 1px solid var(--bo-border);
}
.bo-listing__row p { margin: 0; }
.bo-listing__title { font-weight: 700; font-size: 1.1875rem; }
.bo-listing__meta { color: var(--bo-text-secondary); font-size: 1rem; }
.bo-listing__price { text-align: right; font-size: 1rem; }
.bo-listing__price span { color: var(--bo-text-secondary); }
.bo-availability--available { color: var(--bo-action); font-weight: 700; }
.bo-availability--fewleft { color: var(--bo-text); background: var(--bo-warning); padding: 0 0.4rem; justify-self: start; font-weight: 700; }
.bo-availability--lastplaces { color: var(--bo-danger); font-weight: 700; }
.bo-availability--soldout { color: var(--bo-text-secondary); }

@media (max-width: 640px) {
  .bo-listing__row { grid-template-columns: 1fr; gap: 0.25rem; }
  .bo-listing__price { text-align: left; }
}

.bo-listing__category { font-size: 1rem; color: var(--bo-text-secondary); }
.bo-listing__price { font-weight: 700; }
.bo-listing__price span { font-weight: 400; }
.bo-empty, .bo-result-count { font-size: 1rem; }
.bo-more { margin-top: 1rem; font-weight: 700; }

/* Category links */
.bo-categories { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 1.25rem 0; font-size: 1rem; }
.bo-categories a[aria-current="page"] { color: var(--bo-text); font-weight: 700; text-decoration: none; border-bottom: 4px solid var(--bo-brand); }

/* Reading pages (event page) */
.bo-reading { max-width: 1020px; }
.bo-hint { color: var(--bo-text-secondary); font-size: 1rem; }

.bo-breadcrumbs ol { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; font-size: 1rem; }
.bo-breadcrumbs li + li::before { content: "›"; margin: 0 0.5rem; color: var(--bo-text-secondary); }
.bo-breadcrumbs [aria-current="page"] { color: var(--bo-text-secondary); }

.bo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem 2rem; margin: 0 0 1.5rem; padding: 1rem 0; border-top: 1px solid var(--bo-border); border-bottom: 1px solid var(--bo-border); }
.bo-facts dt { font-weight: 700; font-size: 1rem; }
.bo-facts dd { margin: 0; }

.bo-info-panel { background: var(--bo-info-bg); border-left: 5px solid var(--bo-link); padding: 0.25rem 1.25rem; margin: 1.5rem 0; }
.bo-info-panel h2 { font-size: 1.1875rem; margin: 0.75rem 0 0.25rem; }

.bo-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.bo-table th, .bo-table td { text-align: left; padding: 0.75rem 0.5rem 0.75rem 0; border-bottom: 1px solid var(--bo-border); vertical-align: top; }
.bo-table th { font-weight: 700; }
.bo-table__status { color: var(--bo-text-secondary); }
.bo-notice { border-left: 5px solid var(--bo-brand); background: var(--bo-surface-alt); padding: 0.75rem 1rem; font-weight: 700; }
.bo-sale--onsale { color: var(--bo-action); font-weight: 700; }
/* Availability wording in the performances table (SPEC SS-07); words carry the meaning, colour supports it. */
.bo-table__status.bo-availability--available { color: var(--bo-action); font-weight: 700; }
.bo-table__status.bo-availability--fewleft { color: var(--bo-text); font-weight: 700; }
.bo-table__status.bo-availability--fewleft::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; margin-right: 0.4em; background: var(--bo-warning); }
.bo-table__status.bo-availability--lastplaces { color: var(--bo-danger); font-weight: 700; }
.bo-table__status.bo-availability--soldout { color: var(--bo-text-secondary); font-weight: 700; }
.bo-sale--presale { color: var(--bo-text); font-weight: 700; }
.bo-listing__onsale { color: var(--bo-text); font-weight: 700; }

.bo-address { font-style: normal; margin-bottom: 1rem; }

/* Booking: seat picker and basket (SPEC BK-01, BRAND §3.2 numbered square seats). */
.bo-lede { font-size: 1.1875rem; }
.bo-panel { border-top: 1px solid var(--bo-border); padding-top: 0.5rem; margin-top: 1.5rem; }
.bo-panel h2 { margin-top: 0.75rem; }
.bo-form-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.bo-error-summary { border: 5px solid var(--bo-danger); padding: 0.75rem 1rem; font-weight: 700; margin: 1rem 0; }
.bo-error-summary:focus { outline: 3px solid var(--bo-focus); }
.bo-notice p { margin: 0; }
.bo-button--secondary { background: var(--bo-surface-alt); color: var(--bo-text); box-shadow: 0 2px 0 #929191; }
.bo-button--secondary:hover { background: #DBDAD9; }
.bo-link-button { font: inherit; font-size: 1rem; color: var(--bo-link); background: none; border: 0; padding: 0.5rem 0; min-height: 44px; text-decoration: underline; cursor: pointer; }
.bo-link-button:focus-visible { background: var(--bo-focus); color: var(--bo-text); outline: 3px solid transparent; }
.bo-table__book { margin-top: 0.4rem; min-height: 40px; padding: 0.35rem 0.9rem; }

.bo-pick-key { list-style: none; margin: 0.5rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 1rem; }
.bo-pick-key li { display: inline-flex; align-items: center; gap: 0.4rem; }
.bo-pick-swatch { display: inline-block; width: 1.1rem; height: 1.1rem; border: 3px solid var(--zone, var(--bo-text)); background: #fff; }
.bo-pick-swatch--chosen { --zone: var(--bo-text); background: var(--bo-focus); }
.bo-pick-swatch--taken { --zone: var(--bo-border); background: var(--bo-surface-alt); }
.bo-pick-scroll { overflow-x: auto; padding: 0.5rem 0 1rem; --seat: 2.25rem; }
.bo-pick-stage { width: max-content; min-width: 60%; margin: 0.5rem auto; padding: 0.3rem 2rem; text-align: center; background: var(--bo-brand); color: #fff; font-size: 0.875rem; letter-spacing: 0.2em; text-transform: uppercase; }
.bo-pick-plan { display: grid; gap: 4px; width: max-content; margin: 0 auto; }
.bo-pick-line { display: contents; }
.bo-pick-row { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.875rem; color: var(--bo-text-secondary); }
.bo-pick { position: relative; display: block; width: var(--seat); height: var(--seat); }
.bo-pick__input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bo-pick__seat { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 0.875rem; font-weight: 700; background: #fff; border: 3px solid var(--zone); color: var(--bo-text); }
.bo-pick__input:checked + .bo-pick__seat { background: var(--bo-focus); border-color: var(--bo-text); }
.bo-pick__input:checked + .bo-pick__seat::after { content: "✓"; position: absolute; top: -0.45rem; right: -0.35rem; font-size: 0.75rem; background: var(--bo-text); color: #fff; width: 1rem; height: 1rem; line-height: 1rem; text-align: center; }
.bo-pick__input:focus-visible + .bo-pick__seat { outline: 3px solid var(--bo-focus); outline-offset: 2px; box-shadow: 0 0 0 5px var(--bo-text); }
.bo-pick__input:hover:not(:checked) + .bo-pick__seat { background: var(--bo-info-bg); }
.bo-pick__seat--taken { background: var(--bo-surface-alt); border: 3px solid var(--bo-border); color: var(--bo-text-secondary); }
.bo-pick-submit { margin-top: 0.5rem; }
@media (max-width: 640px) { .bo-pick-scroll { --seat: 2.75rem; } }

.bo-basket { border-top: 4px solid var(--bo-brand); margin-top: 1.5rem; }
.bo-basket h2 { margin: 1rem 0 0.25rem; }
.bo-basket__when { margin: 0 0 0.75rem; color: var(--bo-text-secondary); }
.bo-basket__timer { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; background: var(--bo-info-bg); padding: 0.5rem 1rem; }
.bo-basket__timer p { margin: 0; }
.bo-basket__money { text-align: right; white-space: nowrap; }
.bo-inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.bo-basket__total { border-top: 4px solid var(--bo-text); margin-top: 1.5rem; padding-top: 0.75rem; }
.bo-basket__total p { margin: 0.25rem 0; }
.bo-basket__amount { font-size: 2rem; font-weight: 700; }

/* Checkout and confirmation (GOV.UK-style error summary and messages). */
.bo-error-summary__title { font-size: 1.1875rem; margin: 0 0 0.5rem; }
.bo-error-summary ul { margin: 0; padding-left: 1.25rem; }
.bo-error-summary a { color: var(--bo-danger); font-weight: 700; }
.bo-field { margin-bottom: 1.25rem; }
.bo-field--error { border-left: 5px solid var(--bo-danger); padding-left: 0.75rem; }
.bo-field--error .bo-input { border-color: var(--bo-danger); }
.bo-field__error { color: var(--bo-danger); font-weight: 700; margin: 0; font-size: 1rem; }
.bo-field .bo-hint { margin: 0; }
.bo-input--wide { width: 100%; max-width: 30rem; }
.bo-checkbox { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 1rem; }
.bo-checkbox input { width: 1.75rem; height: 1.75rem; flex: none; margin: 0; accent-color: var(--bo-text); }
.bo-checkout-summary { list-style: none; margin: 0; padding: 0; }
.bo-checkout-summary li { padding: 0.5rem 0; border-bottom: 1px solid var(--bo-border); }
.bo-panel-confirm { background: var(--bo-action); color: #fff; text-align: center; padding: 1.5rem; margin-bottom: 1.5rem; }
.bo-panel-confirm h1 { margin: 0 0 0.75rem; }
.bo-panel-confirm p { margin: 0; font-size: 1.25rem; }
.bo-order-number { display: inline-block; margin-top: 0.25rem; font-size: 2rem; letter-spacing: 0.1em; }
/* E-tickets (BRAND §8): one card each; printed one per page with a cut line, QR at least 40 mm. */
.bo-tickets { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.bo-ticket { border: 2px solid var(--bo-text); background: #fff; }
.bo-ticket__brand { background: var(--bo-brand); color: #fff; font-weight: 700; padding: 0.5rem 1rem; }
.bo-ticket__body { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 1rem; align-items: flex-start; justify-content: space-between; }
.bo-ticket__details { flex: 1 1 18rem; }
.bo-ticket__details p { margin: 0.25rem 0; }
.bo-ticket__title { margin: 0 0 0.25rem; font-size: 1.5rem; }
.bo-ticket__when { font-weight: 700; font-size: 1.1875rem; }
.bo-ticket__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.5rem 1.5rem; margin: 1rem 0 0; }
.bo-ticket__facts dt { font-size: 0.875rem; color: var(--bo-text-secondary); }
.bo-ticket__facts dd { margin: 0; font-weight: 700; }
.bo-ticket__number { font-family: Consolas, "Courier New", monospace; letter-spacing: 0.05em; }
.bo-ticket__access { margin-top: 0.75rem !important; padding: 0.25rem 0.5rem; background: var(--bo-info-bg); display: inline-block; }
.bo-ticket__qr { flex: 0 0 auto; width: 12rem; max-width: 100%; }
.bo-ticket__qr svg { display: block; width: 100%; height: auto; }
.bo-ticket__qr--void { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 3px dashed var(--bo-danger); color: var(--bo-danger); font-weight: 700; font-size: 1.25rem; }
.bo-ticket__void { color: var(--bo-danger); }

@media print {
  .bo-header, .bo-footer, .bo-skip-link, .bo-no-print, #blazor-error-ui { display: none !important; }
  .bo-section { padding: 0; }
  .bo-tickets { display: block; margin: 0; }
  .bo-ticket { break-inside: avoid; break-after: page; margin: 0 0 8mm; border-style: dashed; }
  .bo-ticket:last-child { break-after: auto; }
  .bo-ticket__brand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bo-ticket__qr { width: 45mm; }
}

.bo-test-banner { background: var(--bo-warning); color: var(--bo-text); padding: 0.75rem 1rem; margin-bottom: 1rem; }

.bo-visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important;
}

.bo-prices__area { font-size: 1.1875rem; margin: 1.25rem 0 0.25rem; }
.bo-prices { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid var(--bo-border); }
.bo-prices li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--bo-border); }
.bo-prices__amount { font-weight: 700; text-align: right; }
.bo-prices__parts { display: block; font-weight: 400; font-size: 1rem; color: var(--bo-text-secondary); }
.bo-table__price { font-weight: 700; white-space: nowrap; }

@media (max-width: 640px) {
  .bo-table thead { display: none; }
  .bo-table tr { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--bo-border); }
  .bo-table td { display: block; border: 0; padding: 0.1rem 0; }
}

/* Footer */
.bo-footer { background: var(--bo-surface-alt); border-top: 1px solid var(--bo-border); padding: 2rem 0; font-size: 1rem; }
.bo-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.bo-footer__heading { font-size: 1.1875rem; margin: 0 0 0.5rem; }
.bo-footer ul { margin: 0; padding-left: 1.1rem; }
.bo-footer__small { color: var(--bo-text-secondary); }

/* Blazor error UI */
#blazor-error-ui {
  display: none; position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1000;
  padding: 0.75rem 1.25rem; background: var(--bo-danger); color: #fff;
}
#blazor-error-ui a, #blazor-error-ui .dismiss { color: #fff; cursor: pointer; margin-left: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Platform and marketplace homes (docs/HOSTING.md §2-3) */
.bo-market-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.bo-market-venue { padding: 1rem 0; border-bottom: 1px solid var(--bo-border); font-size: 1.25rem; font-weight: 700; }

.bo-lead { font-size: 1.25rem; color: var(--bo-text-secondary); margin: 0; }
