/* Public + account pages: static SSR, no component library. Colours mirror StravixTheme.cs so the
   two halves of the app read as one product; fonts come from the StravixUI stylesheet. */
:root {
  /* Native controls (date pickers, selects, scrollbars) follow the same light/dark choice as the page. */
  color-scheme: light dark;
  --lu-bg: #F3F4F7;
  --lu-surface: #FFFFFF;
  --lu-text: #161A23;
  --lu-muted: #6E7681;
  --lu-line: #D0D5DB;
  --lu-line-soft: #E1E5EA;
  --lu-accent: #3B9EFF;
  --lu-accent-ink: #161A23;
  --lu-success: #1F8A63;
  --lu-warning: #FBBF24;
  --lu-error: #C2503F;
  --lu-radius: var(--stx-radius-panel, 6px);
  --lu-radius-btn: var(--stx-radius-btn, 2px);
  --lu-font: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --lu-font-display: var(--stx-font-display, "Space Grotesk", "Inter", sans-serif);
  --lu-font-mono: var(--stx-font-mono, "JetBrains Mono", Consolas, monospace);
}
@media (prefers-color-scheme: dark) {
  :root {
    --lu-bg: #090B10;
    --lu-surface: #10121A;
    --lu-text: #FFFFFF;
    --lu-muted: #9DA4AF;
    --lu-line: #363D4C;
    --lu-line-soft: #282E3B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--lu-bg);
  color: var(--lu-text);
  font-family: var(--lu-font);
  font-size: 16px;
  line-height: 1.45;
}
a { color: var(--lu-accent); }
h1, h2, h3 { font-family: var(--lu-font-display); letter-spacing: -0.02em; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
/* FocusOnNavigate moves focus to the heading for screen readers; the ring it draws is noise for everyone else. */
h1:focus { outline: none; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
code { font-family: var(--lu-font-mono); }
.lu-muted { color: var(--lu-muted); }

.lu-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.lu-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--lu-line-soft); background: var(--lu-surface); }
.lu-brand-logo { height: 32px; width: auto; max-width: 120px; object-fit: contain; }
/* A page with the big logo in its card doesn't repeat it in the header. */
.lu-shell:has(.lu-logo) .lu-brand-logo { display: none; }
.lu-logo { display: block; width: auto; height: auto; max-width: 300px; max-height: 170px; margin: 0 auto 14px; }
.lu-brand { font-family: var(--lu-font-display); font-weight: 600; font-size: 1.05rem; }
.lu-brand-sub, .lu-admin-sub { color: var(--lu-muted); font-weight: 400; margin-left: .35rem; font-size: .9em; }
.lu-main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 16px; }
.lu-footer { padding: 16px; text-align: center; color: var(--lu-muted); font-size: .85rem; }

.lu-card { background: var(--lu-surface); border: 1px solid var(--lu-line-soft); border-radius: var(--lu-radius); padding: 20px 16px; margin-bottom: 16px; }
.lu-step { color: var(--lu-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.lu-lead { font-size: 1.05rem; }

/* Fields: 16px font stops iOS from zooming; 44px is the comfortable thumb target. */
.lu-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lu-field label { font-weight: 500; font-size: .95rem; }
.lu-field .lu-hint { color: var(--lu-muted); font-size: .85rem; }
.lu-req { color: var(--lu-error); margin-left: 2px; }
/* Any input but a checkbox or radio: InputText renders no type attribute unless given one. */
.lu-field input:not([type="checkbox"]):not([type="radio"]), .lu-field select, .lu-field textarea {
  font: inherit; font-size: 16px; color: inherit; background: var(--lu-surface);
  border: 1px solid var(--lu-line); border-radius: var(--lu-radius-btn);
  padding: 10px 12px; min-height: 44px; width: 100%;
}
.lu-field input:focus-visible, .lu-field select:focus-visible, .lu-field textarea:focus-visible, .lu-btn:focus-visible {
  outline: 2px solid var(--lu-accent); outline-offset: 1px;
}
.lu-field input.invalid, .lu-field select.invalid { border-color: var(--lu-error); }
.validation-message { color: var(--lu-error); font-size: .85rem; }
.validation-errors { color: var(--lu-error); margin: 0 0 1rem; padding-left: 1.2rem; }
.lu-error { color: var(--lu-error); }
.lu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lu-row > .lu-field { justify-content: flex-end; }
/* Two columns only when each gets real room; most phones are narrower than this. */
@media (max-width: 520px) { .lu-row { grid-template-columns: 1fr; } }
fieldset.lu-fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
fieldset.lu-fieldset legend { font-family: var(--lu-font-display); font-weight: 600; margin-bottom: .5rem; padding: 0; }
fieldset.lu-fieldset legend .lu-hint-line { display: block; font-family: var(--lu-font); font-weight: 400; font-size: .85rem; color: var(--lu-muted); }

.lu-choice { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--lu-line); border-radius: var(--lu-radius); margin-bottom: 10px; cursor: pointer; }
.lu-choice input { width: 22px; height: 22px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--lu-accent); }
.lu-choice .lu-choice-text { display: flex; flex-direction: column; }
.lu-choice .lu-choice-sub { color: var(--lu-muted); font-size: .85rem; }
.lu-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.lu-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--lu-accent); flex: 0 0 auto; }

.lu-btn {
  font: inherit; font-size: 1rem; font-weight: 600; min-height: 46px; padding: 10px 18px; width: 100%;
  border-radius: var(--lu-radius-btn); border: 1px solid var(--lu-line); background: var(--lu-surface); color: var(--lu-text); cursor: pointer;
}
a.lu-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.lu-btn.primary { background: var(--lu-accent); border-color: var(--lu-accent); color: var(--lu-accent-ink); }
.lu-btn.quiet { background: transparent; }
.lu-btn.small { min-height: 36px; width: auto; padding: 6px 12px; font-size: .9rem; font-weight: 500; }
.lu-btn + .lu-btn { margin-top: 10px; }
.lu-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 1rem; }
.lu-actions .lu-btn + .lu-btn { margin-top: 0; }
.lu-inline-form { display: inline; }

/* Sign-in providers: a stacked list of "Continue with X" buttons, each led by the vendor's mark. */
.lu-or { display: flex; align-items: center; gap: 12px; color: var(--lu-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.lu-or::before, .lu-or::after { content: ""; flex: 1; border-top: 1px solid var(--lu-line-soft); }
.lu-oauth { display: flex; flex-direction: column; gap: 10px; }
.lu-oauth .lu-btn + .lu-btn { margin-top: 0; }
.lu-oauth-btn { display: flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none; font-weight: 500; }
.lu-oauth-btn:hover { border-color: var(--lu-muted); }
.lu-oauth-mark { display: inline-flex; width: 22px; height: 22px; flex: 0 0 auto; }
.lu-oauth-mark svg { width: 100%; height: 100%; }

.lu-summary { margin: 0 0 1rem; padding: 0; list-style: none; }
.lu-summary li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--lu-line-soft); }
/* The label never wraps; the value takes the rest and wraps at word boundaries, right-aligned. */
.lu-summary li span:first-child { color: var(--lu-muted); flex: 0 0 auto; white-space: nowrap; }
.lu-summary li span:last-child { text-align: right; min-width: 0; }
.lu-summary li span:nth-child(2):not(:last-child) { flex: 1 1 auto; text-align: left; }
.lu-nowrap { white-space: nowrap; }
.lu-code { font-family: var(--lu-font-mono); font-size: 1.6rem; letter-spacing: .3em; text-align: center; }
.lu-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; border: 1px solid var(--lu-line); }
.lu-pill.warn { border-color: var(--lu-warning); }

/* Honeypot: off-screen, not display:none (some bots skip hidden fields, few skip offscreen). */
.lu-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Voice part only matters to singers. No JS on the public side, so the form itself decides. */
.lu-voice { display: none; }
form:has(#role-singer:checked) .lu-voice { display: block; }

.lu-conduct { max-height: 320px; overflow: auto; padding: 12px 16px; border: 1px solid var(--lu-line); border-radius: var(--lu-radius); margin-bottom: 1rem; font-size: .95rem; }
.lu-conduct > :first-child { margin-top: 0; }
.lu-conduct > :last-child { margin-bottom: 0; }
.lu-conduct h1, .lu-conduct h2, .lu-conduct h3 { font-size: 1.1rem; margin: 1rem 0 .4rem; }
.lu-conduct ul, .lu-conduct ol { padding-left: 1.4rem; margin: .5rem 0; }
.lu-conduct li { margin: .25rem 0; }

.lu-run-list { display: grid; gap: 12px; margin-top: 1rem; }
.lu-run-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--lu-line); border-radius: var(--lu-radius); color: inherit; text-decoration: none; }
.lu-run-card:hover, .lu-run-card:focus-visible { border-color: var(--lu-accent); }
.lu-run-card span { color: var(--lu-muted); font-size: .9rem; }
.lu-person h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.2rem; margin: 0 0 .5rem; }
.lu-schedule { width: 100%; border-collapse: collapse; font-size: .95rem; margin: .5rem 0 1rem; }
.lu-schedule th, .lu-schedule td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--lu-line-soft); vertical-align: top; }
.lu-schedule th { color: var(--lu-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.lu-schedule tr.lu-past td { color: var(--lu-muted); }
.lu-done { text-align: center; padding: 28px 20px; }
.lu-done .lu-summary li { padding: 10px 4px; }
.lu-done .lu-check-big { font-size: 3rem; color: var(--lu-success); animation: lu-pop .55s cubic-bezier(.2, .9, .3, 1.4) both; }
.lu-done .lu-logo { animation: lu-rise .6s ease-out both; }
.lu-done h1 { animation: lu-rise .6s ease-out .15s both; }
.lu-curtain { margin: 1.25rem 0 0; font-family: var(--lu-font-display); font-style: italic; color: var(--lu-muted); }
@keyframes lu-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes lu-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lu-done .lu-check-big, .lu-done .lu-logo, .lu-done h1 { animation: none; } }

/* Account page */
.lu-success { color: var(--lu-success); font-weight: 600; }
.lu-fieldset .lu-check { margin-bottom: 6px; }
.lu-field input:disabled { opacity: .7; }

/* Participant schedule as month grids. Kind colours are fixed (not themed) so they read the same in light and dark. */
.lu-pcal { margin: 0 0 14px; }
.lu-pcal-title { font-family: var(--lu-font-display); font-size: 1rem; margin: 0 0 6px; }
.lu-pcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.lu-pcal-dow { text-align: center; font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--lu-muted); padding-bottom: 2px; }
.lu-pcal-cell { min-height: 58px; border: 1px solid var(--lu-line-soft); border-radius: 4px; padding: 3px; display: flex; flex-direction: column; gap: 2px; background: var(--lu-surface); min-width: 0; }
.lu-pcal-cell.empty { border-color: transparent; background: transparent; }
.lu-pcal-cell.past { opacity: .55; }
.lu-pcal-cell.today { border-color: var(--lu-accent); }
.lu-pcal-cell.away { box-shadow: inset 0 0 0 2px var(--lu-error); }
.lu-pcal-day { font-size: .68rem; color: var(--lu-muted); }
.lu-pcal-chip { display: block; border-radius: 3px; padding: 2px 3px; font-size: .6rem; line-height: 1.2; color: #161A23; min-width: 0; }
/* The time may break after its dash; the note stays on one line and trims (the title and the list below carry it whole). */
.lu-pcal-chip b { display: block; font-weight: 700; overflow-wrap: break-word; }
.lu-pcal-chip i { display: block; font-style: normal; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lu-pcal-away { font-size: .58rem; line-height: 1.2; font-weight: 600; color: var(--lu-error); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lu-pcal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; color: var(--lu-muted); margin: 0 0 12px; }
.lu-pcal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lu-pcal-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }
.kind-rehearsal { background: #BFDBFE; }
.kind-intheater { background: #DDD6FE; }
.kind-tech { background: #FDE68A; }
.kind-dress { background: #FBCFE8; }
.kind-performance { background: #BBF7D0; }
.kind-infomeeting { background: #E5E7EB; }
.kind-auditions { background: #FED7AA; }
.kind-callbacks { background: #A5F3FC; }
.kind-loadin { background: #D9F99D; }
.kind-loadout { background: #FECACA; }
.lu-details summary { cursor: pointer; color: var(--lu-muted); font-size: .9rem; margin-bottom: 6px; }
@media (min-width: 480px) { .lu-pcal-cell { min-height: 70px; } .lu-pcal-chip { font-size: .7rem; } .lu-pcal-away { font-size: .66rem; } .lu-pcal-dow { font-size: .7rem; } }
