/* v3 event page + create wizard parts (reference §8, §9; admin redesign Phase 6).
   Ledger 2 (decisions 303, 309, 330): one column; each tab is ONE form sheet
   (form-sheet.css) whose sections are split by 1px lines; the "Ready to go
   live" banner sits under the header until the event is live. Rich text
   fields: rich.css (Tiptap, decision 281). */

.lg-evpage .lg-tabpanel__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lg-evpage .lg-tabpanel:focus-visible { outline: var(--focus-ring) solid var(--focus); outline-offset: 2px; border-radius: var(--radius-card); }

/* A <fieldset> that only switches a tab's boxes off for read-only access. */
.lg-fieldset-plain { margin: 0; padding: 0; border: 0; min-width: 0; }

/* The tab sheets hold sections inside fieldsets and editor roots, so "first
   section has no top line" can't be :first-child: every section draws its
   line 1px up and the sheet clips whatever reaches its top edge (overflow:
   clip keeps sticky parts working; it is not a scroll container). */
.lg-evpage .lg-fsheet { overflow: clip; }
.lg-evpage .lg-fsheet .lg-fsec,
.lg-evpage .lg-fsheet .lg-fsec:first-child { border-block-start: 1px solid var(--border); margin-block-start: -1px; }
.lg-evpage__more { margin: 0; }

/* Editors inside a sheet section are not cards (no card in a card): the
   list and the editor sit side by side with one dividing line. */
.lg-evpage .lg-fsec .lg-tk { gap: var(--space-4); }
.lg-evpage .lg-tk--sheet { display: block; }
.lg-evpage .lg-fsec .lg-card { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
@container (min-width: 56rem) {
  .lg-evpage .lg-fsec .lg-tk__split { gap: 0; }
  .lg-evpage .lg-fsec .lg-tk__list { padding-inline-end: var(--space-5); }
  .lg-evpage .lg-fsec .lg-tk__editor { padding-inline-start: var(--space-6); border-inline-start: 1px solid var(--border); }
}
@container (max-width: 55.99rem) {
  .lg-evpage .lg-fsec .lg-tk__editor { padding-block-start: var(--space-2); }
}

/* "Ready to go live" (decisions 309, 330): progress, the next thing to do
   (a link that opens its tab), "Show all". The bar is SVG rects, never a width style. */
.lg-golive { flex-wrap: wrap; align-items: flex-start; gap: var(--space-2) var(--space-5); margin: 0; padding: var(--space-4) var(--space-5); }
.lg-golive__main { flex: 1 1 18rem; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.lg-golive__lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin: 0; }
.lg-golive__count { color: var(--text-muted); font-size: var(--size-label); font-variant-numeric: tabular-nums; }
.lg-golive__bar { display: block; inline-size: 100%; max-inline-size: 24rem; block-size: 0.375rem; border-radius: var(--radius-pill); }
.lg-golive__track { fill: var(--surface); }
.lg-golive__fill { fill: var(--success); }
.lg-golive__next { margin: 0; color: var(--text); }
.lg-golive__next a, .lg-golive__why { color: var(--primary); font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; }
.lg-golive__all { flex: 1 1 100%; }
@media (min-width: 40em) { .lg-golive__all { flex: 0 1 auto; } .lg-golive__all[open] { flex-basis: 100%; } }
.lg-golive__all > summary { list-style: none; inline-size: fit-content; color: var(--primary); }
.lg-golive__all > summary::-webkit-details-marker { display: none; }
.lg-golive__all[open] > summary { display: none; }
.lg-golive__list { margin: 0; padding: 0; list-style: none; }
.lg-golive__row { display: flex; gap: var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.lg-golive__row:first-child { border-top: 0; }
.lg-golive__mark {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; margin-top: 0.0625rem; border-radius: 50%;
  border: 1px solid var(--border-control); background: var(--surface); color: var(--on-primary);
}
.lg-golive__row--done .lg-golive__mark { border-color: var(--success); background: var(--success); }
.lg-golive__text { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.lg-golive__label { font-weight: 500; }
.lg-golive__why { font-size: var(--size-label); line-height: var(--leading-label); }

/* Standard fields: ONE table for both forms (decision 309, "shown once"). */
.lg-base { overflow-x: auto; }
.lg-base__table { border-collapse: collapse; min-inline-size: 100%; }
@container (min-width: 40rem) { .lg-base__table { min-inline-size: 0; } }
.lg-base__table th, .lg-base__table td { padding: 0 var(--space-2); text-align: center; vertical-align: middle; }
.lg-base__form { padding-block-end: var(--space-1); font-size: var(--size-label); font-weight: 600; }
.lg-base__sub, .lg-base__namehead { padding-block-end: var(--space-2); color: var(--text-muted); font-size: var(--size-caption); font-weight: 500; border-bottom: 1px solid var(--border-strong); }
.lg-base__namehead, .lg-base__name { padding-inline-start: 0; text-align: start; }
.lg-base__name { padding-block: 0; font-weight: 500; }
.lg-base__table tbody tr + tr > * { border-top: 1px solid var(--border); }
.lg-base__table td.lg-base__cell { inline-size: 5.5rem; padding: 0; }
.lg-base__hit { display: grid; place-items: center; min-block-size: var(--touch-target); min-inline-size: var(--touch-target); cursor: pointer; }
.lg-base__hit:has(:disabled) { cursor: not-allowed; }
@media (max-width: 39.99em) { .lg-base__table td.lg-base__cell { inline-size: 3.25rem; } }

/* Someone else saved first (40930, decision 270). */
.lg-evchanged__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0 0; }

/* "One list / By category" option cards (reference §10: segmented only to switch what the page shows). */
.lg-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-3); }
.lg-seg__opt {
  display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-control); border-radius: var(--radius-control); background: var(--surface);
  color: var(--text); text-align: start; font: inherit; cursor: pointer; touch-action: manipulation;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.lg-seg__opt[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--primary-tint); color: var(--primary-ink); }
.lg-seg__label { font-weight: 500; }
.lg-seg__hint { color: var(--text-muted); font-size: var(--size-caption); }
.lg-seg__opt[aria-pressed="true"] .lg-seg__hint { color: var(--primary-ink); }
.lg-seg__opt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.lg-chip-btn {
  min-height: 2rem; padding: 0 var(--space-3); border: 1px solid var(--border-control); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); font: inherit; font-size: var(--size-label); cursor: pointer;
}
.lg-chip-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-tint); color: var(--primary-ink); }
.lg-chip-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Tickets tab: list of ticket types + one editor (board TierEditor). */
.lg-tk { display: flex; flex-direction: column; gap: var(--space-4); }
.lg-tk__cats { display: flex; flex-direction: column; gap: var(--space-3); }
.lg-tk__catlist { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.lg-tk__cat { display: flex; align-items: center; gap: var(--space-1); }
.lg-tk__catname { flex: 1; min-width: 0; }
.lg-tk__split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
/* Side by side only when the TAB is wide enough for the editor to keep two
   boxes a row (a container query: the sidebar and the checklist take room too). */
.lg-tk { container-type: inline-size; }
@container (min-width: 56rem) { .lg-tk__split { grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr); } }
.lg-tk__editor .lg-form__row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.lg-tk__editor .lg-form__row > .lg-field { flex: 1 1 10rem; min-width: 0; }
/* Sale starts / ends: one per row on phones (a date and time needs the width). */
@media (max-width: 39.99em) {
  .lg-tk__editor .lg-form__row > .lg-field:has(input[type="datetime-local"]) { flex-basis: 100%; }
}
.lg-tk__listhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.lg-tk__total { margin: 0; color: var(--text-muted); font-size: var(--size-caption); }
.lg-tk__total--over { color: var(--danger); }
.lg-tk__filters { display: flex; gap: var(--space-2); margin: var(--space-3) 0 0; overflow-x: auto; }
.lg-tk__rows { margin: var(--space-3) 0; padding: 0; list-style: none; }
.lg-tk__row {
  display: flex; width: 100%; gap: var(--space-3); justify-content: space-between; padding: var(--space-3);
  border: 1px solid transparent; border-radius: var(--radius-control); background: none; color: var(--text);
  font: inherit; text-align: start; cursor: pointer; touch-action: manipulation;
}
.lg-tk__row:hover { background: var(--row-hover); }
.lg-tk__row[aria-current="true"] { border-color: var(--primary); background: var(--primary-tint); }
.lg-tk__row:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lg-tk__rowmain, .lg-tk__rowside { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.lg-tk__rowside { align-items: flex-end; flex: none; }
.lg-tk__name { font-weight: 500; overflow-wrap: anywhere; }
.lg-tk__meta { color: var(--text-muted); font-size: var(--size-caption); }
.lg-tk__state { font-size: var(--size-caption); }
.lg-tk__state--on { color: var(--success); }
.lg-tk__state--soon { color: var(--warning); }
.lg-tk__state--ended, .lg-tk__state--off { color: var(--text-muted); }
.lg-tk__edhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.lg-tk__edtools { display: flex; gap: var(--space-2); }
.lg-tk__danger { padding-top: var(--space-3); border-top: 1px solid var(--border); }
.lg-tk__back { display: none; }
/* Narrower: the list, then one ticket type full width with "All ticket types". */
@container (max-width: 55.99rem) {
  .lg-tk__back { display: inline-flex; align-self: flex-start; }
  .lg-tk--editing .lg-tk__list { display: none; }
  .lg-tk:not(.lg-tk--editing) .lg-tk__editor { display: none; }
}

/* Form builder (Interest + Checkout form tabs, reference §11): the ticket-type
   list + editor layout above, plus sections, chips and the standard fields. */
.lg-fb__tools { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.lg-fb__search { flex: 1 1 10rem; min-width: 0; }
.lg-fb__undo { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-3); }
.lg-fb__sec + .lg-fb__sec { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.lg-fb__sechead { display: flex; align-items: center; gap: var(--space-1); margin-top: var(--space-3); }
.lg-fb__secname { flex: 1; min-width: 0; font-weight: 600; }
.lg-fb__secn { flex: none; white-space: nowrap; }
.lg-fb__req { color: var(--danger); }
.lg-fb__chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.lg-fb__chips:not(:has(> :not([hidden]))) { display: none; }
.lg-fb__foot { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.lg-fb__paste > summary { cursor: pointer; color: var(--primary); width: fit-content; }
.lg-fb__paste[open] { display: flex; flex-direction: column; gap: var(--space-3); }
.lg-fb__preview { display: flex; flex-direction: column; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.lg-fb__preview p { margin: 0; }
.lg-fb__preview .lg-fb__pvsec { font-weight: 600; padding-bottom: var(--space-1); border-bottom: 1px solid var(--border); margin-bottom: var(--space-2); }
.lg-fb__pvq { font-weight: 500; }
.lg-fb__pvback { align-self: flex-start; }
@media (max-width: 39.99em) {
  .lg-fb__sechead .lg-btn--icon { min-width: 2.75rem; min-height: 2.75rem; }
}
