/* EventGate component classes (prototype).
   In the .NET build these move into Tailwind's @layer components. */

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: #6E47EC; color: #fff; font-weight: 700; border-radius: .75rem;
  transition: background-color .15s ease, transform .15s ease;
}
.btn-primary:hover { background: #5532D6; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #B9A6F7; cursor: not-allowed; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1.5px solid #10182C; color: #10182C; font-weight: 700; border-radius: .75rem;
  transition: background-color .15s ease;
}
.btn-outline:hover { background: #10182C; color: #fff; }

.nav-link { color: #C9CEE0; transition: color .15s ease; }
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }
.nav-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; text-decoration-color: #17C1DE; text-decoration-thickness: 2px; }

.field { display: flex; flex-direction: column; gap: .5rem; }
.field label:not(.sr-only) { font-size: .875rem; font-weight: 700; color: #10182C; }
.input {
  width: 100%; height: 3.25rem; padding: 0 1rem; border: 1.5px solid #DCD9EA; border-radius: .75rem;
  background: #fff; font-weight: 600; color: #10182C; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #8A90A8; font-weight: 500; }
.input:focus { border-color: #6E47EC; box-shadow: 0 0 0 4px #EFEBFF; }
textarea.input { height: auto; padding: .875rem 1rem; }

.eyebrow { font-size: .8125rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #6E47EC; }

.card { background: #fff; border: 1px solid #E6E3F3; border-radius: 1.25rem; }

/* Ticket perforation */
.perf { position: relative; height: 1.75rem; background: #fff; display: flex; align-items: center; }
.perf::before, .perf::after { content: ""; position: absolute; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--perf-bg, #10182C); }
.perf::before { left: -.875rem; } .perf::after { right: -.875rem; }
.perf > span { margin: 0 1.5rem; flex: 1; border-top: 2px dashed #DCD6F5; }

/* Seat map */
.seat {
  width: 1.5rem; height: 1.5rem; border-radius: .4rem .4rem .3rem .3rem; border: 1.5px solid #A895F2; background: #fff;
  transition: transform .1s ease, background-color .1s ease;
}
.seat:hover:not(:disabled) { transform: translateY(-2px); }
.seat:focus-visible { outline: 2px solid #10182C; outline-offset: 2px; }
.seat.vip { background: #D5F4F9; border-color: #17C1DE; }
.seat.selected { background: #6E47EC; border-color: #6E47EC; }
.seat:disabled { background: #D3D6E0; border-color: #D3D6E0; cursor: not-allowed; }
@media (max-width: 640px) { .seat { width: 13px; height: 13px; border-radius: 4px 4px 3px 3px; border-width: 1.25px; } }

/* Accordion */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .chev { transform: rotate(180deg); }
.chev { transition: transform .2s ease; }

/* OTP */
.otp { width: 3.25rem; height: 3.75rem; text-align: center; font-size: 1.5rem; font-weight: 800; }
@media (max-width: 400px) { .otp { width: 2.75rem; height: 3.25rem; } }

.prose-legal h2 { font-family: Outfit, sans-serif; font-size: 1.375rem; font-weight: 700; margin: 2.25rem 0 .75rem; color: #10182C; scroll-margin-top: 96px; }
.prose-legal p, .prose-legal li { color: #3A4260; line-height: 1.75; }
.prose-legal ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: .375rem; }

/* ---------- App (/app) ---------- */
.tab-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 700; color: #5B6280; }
.tab-link[aria-current="page"] { color: #6E47EC; font-weight: 800; }
.tab-link[aria-current="page"] .tab-ico { background: #EFEBFF; }
.tab-ico { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 30px; border-radius: 999px; transition: background-color .15s; }
.seat.app-seat { width: 16px; height: 16px; border-radius: 5px 5px 3px 3px; border-width: 1.25px; }
@media (max-width: 380px) { .seat.app-seat { width: 13px; height: 13px; } }

/* ---------- Admin (/admin) ---------- */
.side-link { display: flex; align-items: center; gap: .75rem; height: 2.625rem; padding: 0 .875rem; border-radius: .75rem; color: #AEB5CC; transition: background-color .15s, color .15s; }
.side-link:hover { background: #1A2440; color: #fff; }
.side-link[aria-current="page"] { background: #6E47EC; color: #fff; }
.side-group { display: block; padding: 1.1rem .875rem .4rem; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6F7897; }
body.sidebar-open #admin-sidebar { transform: translateX(0); }
.a-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.a-table th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5B6280; padding: .75rem 1rem; border-bottom: 1px solid #E6E3F3; white-space: nowrap; background: #FBFAFE; }
.a-table td { padding: .875rem 1rem; border-bottom: 1px solid #F0EEF8; vertical-align: middle; white-space: nowrap; }
.a-table tbody tr:hover { background: #FBFAFE; }
.a-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: .375rem; font-size: 12px; font-weight: 800; padding: .25rem .625rem; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { background: #E3F5EC; color: #137A4B; }
.pill-amber { background: #FFF1E6; color: #A84B00; }
.pill-red { background: #FDECE8; color: #B3321C; }
.pill-grey { background: #EEF0F5; color: #3A4260; }
.pill-purple { background: #EFEBFF; color: #5532D6; }
.pill-cyan { background: #E4F7FA; color: #0B6E80; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid #E6E3F3; background: #fff; color: #10182C; font-weight: 700; border-radius: .75rem; transition: background-color .15s; }
.btn-ghost:hover { background: #F6F5FB; }
.icon-btn { width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .6rem; color: #5B6280; }
.icon-btn:hover { background: #F6F5FB; color: #10182C; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #D3D6E0; transition: background-color .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: #6E47EC; }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid #10182C; outline-offset: 2px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: #F0EEF8; border-radius: .75rem; }
.seg button { height: 2.25rem; padding: 0 .875rem; border-radius: .55rem; font-size: .8125rem; font-weight: 700; color: #5B6280; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: #10182C; box-shadow: 0 1px 2px rgba(16,24,44,.08); }
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(16,24,44,.5); }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 70; background: #10182C; color: #fff; padding: .875rem 1.25rem; border-radius: .875rem; font-weight: 700; font-size: .875rem; box-shadow: 0 24px 60px rgba(16,24,44,.25); display: flex; gap: .5rem; align-items: center; }
.b-seat { width: 26px; height: 26px; border-radius: 7px 7px 5px 5px; border: 1.5px solid #A895F2; background: #fff; font-size: 9px; font-weight: 800; color: #5B6280; }
.b-seat.vip { background: #D5F4F9; border-color: #17C1DE; color: #0B6E80; }
.b-seat.blocked { background: #D3D6E0; border-color: #D3D6E0; color: transparent; }
.b-seat.wheel { background: #FFF1E6; border-color: #A84B00; color: #A84B00; }
.b-seat.gap { background: transparent; border: 1.5px dashed #E6E3F3; color: transparent; }
.b-seat:hover { outline: 2px solid #6E47EC; outline-offset: 1px; }
.tool[aria-pressed="true"] { border-color: #6E47EC; background: #EFEBFF; color: #5532D6; }
.bar-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; flex: 1; }
.bar-col > span { width: 62%; border-radius: 4px 4px 0 0; background: #B9A6F7; }
.bar-col:last-child > span { background: #6E47EC; }
.bar-col:hover > span { background: #6E47EC; }

/* ---------- Blazor form validation ---------- */
.validation-message { color: #B3321C; font-size: .8125rem; font-weight: 700; }
.input.invalid, .input.modified.invalid { border-color: #B3321C; }
.input.invalid:focus { box-shadow: 0 0 0 4px #FDECE8; }

/* ---------- Live seat map (Phase 3) ---------- */
.seat.wheel { background: #FFF1E6; border-color: #A84B00; }
.seat.selected.wheel, .seat.selected.vip { background: #6E47EC; border-color: #6E47EC; }
/* Taken wheelchair and VIP seats are grey like the rest (the zone colours above would otherwise win). */
.seat.wheel:disabled:not(.busy), .seat.vip:disabled:not(.busy) { background: #D3D6E0; border-color: #D3D6E0; }
.seat.busy { opacity: .55; cursor: progress; }
.seat-gap { display: inline-block; width: 1.25rem; }
@media (max-width: 640px) { .seat-gap { width: .5rem; } }
.qr-svg svg { display: block; width: 100%; height: auto; }
/* Blazor moves focus to the page heading after navigation (for screen readers); no visible ring needed there. */
h1:focus { outline: none; }

/* ---------- Box office seat picker (Phase 4): one checkbox per seat, works without JavaScript ---------- */
.bo-seat { position: relative; display: inline-flex; }
.bo-seat input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.bo-seat input:checked + .b-seat { background: #6E47EC; border-color: #6E47EC; color: #fff; }
.bo-seat input:focus-visible + .b-seat { outline: 2px solid #10182C; outline-offset: 2px; }
.bo-seat input:disabled { cursor: not-allowed; }
.bo-seat input:disabled + .b-seat { background: #D3D6E0; border-color: #D3D6E0; color: transparent; }
.bo-seat .b-seat { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; font-size: 8px; border-radius: 6px 6px 4px 4px; }

/* ---------- Seat plan editor (Phase 4) ---------- */
.b-seat.locked { box-shadow: inset 0 0 0 2px #10182C; }
.b-seat[aria-pressed] { cursor: pointer; }

/* ---------- Gate scanner (Phase 5) ---------- */
.scan-status > span:first-child { background: #3DDC97; }
.scan-status[data-online="0"] { background: #5A2A10; color: #FFD9C2; }
.scan-status[data-online="0"] > span:first-child { background: #FF8A3D; }
.scan-result { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: 1.5rem; text-align: center; color: #fff; cursor: pointer; }
.scan-result[hidden] { display: none; }
.scan-result.scan-ok { background: rgba(19, 122, 75, .96); }
.scan-result.scan-warn { background: rgba(168, 75, 0, .96); }
.scan-result.scan-bad { background: rgba(179, 50, 28, .96); }
.scan-icon { width: 4.5rem; height: 4.5rem; border-radius: 9999px; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; margin-bottom: .5rem; }
.scan-title { font-family: Outfit, sans-serif; font-size: 2rem; font-weight: 800; line-height: 1.1; }
.scan-who { font-size: 1.15rem; font-weight: 800; }
.scan-detail { font-size: .95rem; font-weight: 600; opacity: .9; max-width: 22rem; }
.scan-code { font-size: .75rem; font-weight: 800; letter-spacing: .08em; opacity: .75; margin-top: .25rem; }
#components-reconnect-modal { display: none; }
