/* An office's printers and its ticket stock (TicketingPrintSetupComponent, packs/ticketing/app/components/ticketing_print_setup_component.rb): one card
   each, its name and badge on the first line, its facts under it, and a printer's last answer at the foot. A printer that is off and a retired stock sit
   on the quieter surface. The printer's and the stock's own pages are the shared form fields and data table.

   Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so it reads on the light shell
   and the console, in light and in dark, and mirrors in a right-to-left language. Nothing pinned to an edge, no height in vh, and everything that holds
   words may shrink and wrap, so a language 40% longer never widens the page (WCAG 1.4.10). */

.ticketing-print-setup {
  display: grid;
  gap: var(--density-gap);
  min-inline-size: 0;
}

.ticketing-print-setup__title {
  margin-block: 0;
}

.ticketing-print-setup__lede {
  margin-block: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.ticketing-print-setup__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticketing-print-setup__item {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  min-inline-size: 0;
  padding: var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.ticketing-print-setup__item[data-dim="true"] {
  background: var(--surface-2);
}

.ticketing-print-setup__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  min-inline-size: 0;
}

.ticketing-print-setup__name {
  margin-block: 0;
  font-size: var(--text-lg);
  overflow-wrap: anywhere;
}

.ticketing-print-setup__facts {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
}

.ticketing-print-setup__facts li {
  overflow-wrap: anywhere;
}

.ticketing-print-setup__answer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  margin: 0;
  padding-block-start: var(--space-2);
  border-block-start: 1px solid var(--rule);
  font-size: var(--text-sm);
}

.ticketing-print-setup__answer-label,
.ticketing-print-setup__when {
  color: var(--fg2);
  overflow-wrap: anywhere;
}

/* A link on from a card: a stock's designs. */
.ticketing-print-setup__link {
  margin: 0;
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.ticketing-print-setup__link a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target-min);
}

/* The printer's own page: the two sample prints side by side where they fit, each with the sentence that says what it is for. */
.ticketing-print-samples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticketing-print-samples__item {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  min-inline-size: 0;
}

.ticketing-print-samples__item p {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

/* The stock form's four margins and the code window's four numbers sit in a row where they fit. */
.ticketing-print-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
  gap: var(--space-2) var(--space-3);
  min-inline-size: 0;
}

/* Add stock: BOCA's sizes as plain choices, a link each; the chosen one has a heavier edge in the accent, its shape changed as well as its color (1.4.1). */
.ticketing-stock-sizes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticketing-stock-sizes__choice {
  display: grid;
  gap: var(--space-1);
  min-block-size: var(--target-min);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--fg1);
  text-decoration: none;
}

.ticketing-stock-sizes__choice:hover {
  border-color: var(--accent-line);
}

.ticketing-stock-sizes__choice:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.ticketing-stock-sizes__choice[aria-current="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.ticketing-stock-sizes__label {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ticketing-stock-sizes__dots {
  color: var(--fg2);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* Compact inline SVG visuals on ticket design cards (mini-ticket thumbnail) and BOCA stock cards / forms (thermal stock ruler diagram). */
.ticketing-print-thumb {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  min-inline-size: 0;
}

.ticketing-print-thumb__svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
  max-block-size: 9.5rem;
}

.ticketing-print-thumb__meta {
  color: var(--fg3);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.ticketing-print-thumb__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--fg2);
  font-size: var(--text-xs);
}

.ticketing-print-thumb__legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.tpt-swatch {
  display: inline-block;
  flex: none;
  inline-size: 0.75rem;
  block-size: 0.5rem;
  border-radius: 2px;
}

.tpt-swatch--feed {
  border-block-start: 2px solid var(--accent-text);
  block-size: 0;
}

.tpt-swatch--perf {
  border-inline-start: 2px dashed var(--tone-warn-fg);
  inline-size: 0.25rem;
  block-size: 0.75rem;
}

.tpt-swatch--code {
  border: 1px solid var(--tone-info-fg);
  background: var(--tone-info-bg);
}

.tpt-paper {
  fill: var(--surface-raised);
  stroke: var(--rule-strong);
  stroke-width: 1.2;
}

.tpt-band { fill: var(--accent); }
.tpt-band-ink { fill: var(--accent-fg); opacity: 0.9; }
.tpt-accent-rule { fill: var(--gold); }
.tpt-eyebrow { fill: var(--accent-text); opacity: 0.85; }
.tpt-title { fill: var(--fg1); opacity: 0.88; }
.tpt-meta { fill: var(--fg2); opacity: 0.7; }
.tpt-meta-soft { fill: var(--fg3); opacity: 0.55; }
.tpt-seat-pill { fill: var(--surface-tint); stroke: var(--accent-line); stroke-width: 0.8; }

.ticketing-print-thumb--design[data-state="draft"] .tpt-band { fill: var(--tone-warn-fg); }
.ticketing-print-thumb--design[data-state="draft"] .tpt-paper { stroke-dasharray: 4 3; }
.ticketing-print-thumb--design[data-state="published"] .tpt-band { fill: var(--tone-info-fg); }
.ticketing-print-thumb--design[data-state="retired"] .tpt-band,
.ticketing-print-thumb--design[data-state="retired"] .tpt-accent-rule,
.ticketing-print-thumb--design[data-state="retired"] .tpt-eyebrow { fill: var(--fg3); }

.tpt-safe {
  fill: none;
  stroke: var(--control-line);
  stroke-width: 0.85;
  stroke-dasharray: 3 2.5;
}

.tpt-perf {
  fill: none;
  stroke: var(--tone-warn-fg);
  stroke-width: 1.25;
  stroke-dasharray: 3 2.5;
}

.tpt-notch {
  fill: var(--surface-sunken);
  stroke: var(--rule-strong);
  stroke-width: 1;
}

.tpt-code-zone {
  fill: var(--tone-info-bg);
  stroke: var(--tone-info-fg);
  stroke-width: 1;
}

.tpt-code-bar { fill: var(--tone-info-fg); opacity: 0.75; }
.tpt-code-line { stroke: var(--tone-info-fg); stroke-width: 1.6; stroke-linecap: round; opacity: 0.75; }

.tpt-ruler-axis,
.tpt-ruler-tick {
  fill: none;
  stroke: var(--fg3);
  stroke-width: 0.9;
}

.tpt-ruler-num {
  fill: var(--fg2);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 600;
}

.tpt-ruler-caption {
  fill: var(--fg2);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 600;
}

.tpt-feed {
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ticketing-stock-ruler {
  max-inline-size: 36rem;
}

.ticketing-stock-ruler .ticketing-print-thumb__svg {
  max-block-size: 13rem;
}
