/* Ticket types editor, door check-in and payment settings. Uses the variables from index.html. */
.modal.wide { width: min(640px, 100%); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Ticket types */
.tt { display: grid; gap: 10px; }
.tt-head, .tt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr) 36px; gap: 8px; align-items: center; }
.tt-head span { color: var(--muted); font-size: 13px; }
.tt-row input { height: 46px; border-radius: 14px; background: var(--card2); border: 2px solid #2e2e2e; padding: 0 14px; outline: 0; width: 100%; color: inherit; font: inherit; }
.tt-row input:focus { border-color: var(--yellow); }
.tt-sold { grid-column: 1 / -1; color: var(--muted); font-size: 12px; margin: -4px 0 2px 4px; }
.tt-del { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card2); color: var(--soft); font-size: 20px; cursor: pointer; }
.tt-del:hover:not(:disabled) { background: #3a1f1f; color: #ff8a80; }
.tt-del:disabled { opacity: .3; cursor: not-allowed; }
.tt-add { justify-self: start; background: none; border: 0; color: var(--yellow); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 0; }
.tt-hint { color: var(--muted); font-size: 13px; margin-top: 2px; }
@media (max-width: 560px) { .tt-head { display: none; } .tt-row { grid-template-columns: 1fr 1fr 36px; } .tt-row input[data-k=name] { grid-column: 1 / -1; } }

/* Door */
.door { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1000px) { .door { grid-template-columns: 1fr; } }
.door-main { display: grid; gap: 16px; }
.door-main .field { margin: 0; }
.cam { position: relative; border-radius: 20px; overflow: hidden; background: #0b0b0b; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.cam.on video { opacity: 1; }
.cam-frame { position: absolute; width: 56%; aspect-ratio: 1; border: 3px solid rgba(242, 248, 98, .85); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); display: none; }
.cam.on .cam-frame { display: block; }
.cam .btn { position: relative; z-index: 1; }
.cam.on .btn { position: absolute; bottom: 14px; }
.door-form { display: flex; gap: 10px; }
.door-form input { flex: 1; min-width: 0; height: 52px; border-radius: 999px; background: var(--card2); border: 2px solid #2e2e2e; padding: 0 20px; outline: 0; color: inherit; font: inherit; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }
.door-form input:focus { border-color: var(--yellow); }
.door-result { display: none; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px; }
.door-result.ok, .door-result.warn, .door-result.bad { display: flex; }
.door-result.ok { background: rgba(91, 212, 122, .14); }
.door-result.warn { background: rgba(255, 176, 32, .14); }
.door-result.bad { background: rgba(255, 107, 107, .14); }
.door-result b { display: block; font-size: 20px; }
.door-result small { color: var(--soft); font-size: 14px; }
.door-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: #000; flex-shrink: 0; }
.ok .door-icon { background: var(--good); } .warn .door-icon { background: var(--warn); } .bad .door-icon { background: #FF7A6B; }
.door-count { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.door-count b { font-size: 44px; font-weight: 900; color: var(--yellow); }
.door-count span { color: var(--soft); }
.door-recent { display: grid; gap: 2px; margin-top: 10px; }
.door-r { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.door-r b { display: block; font-weight: 600; }
.door-r small, .door-r span { color: var(--muted); font-size: 13px; }

/* Payments */
.pay-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.pay-totals .card small { color: var(--muted); display: block; margin-bottom: 6px; }
.pay-totals .card b { font-size: 26px; font-weight: 800; }
.pay-providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) { .pay-totals, .pay-providers { grid-template-columns: 1fr; } }
.pay-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.pay-top h2 { font-size: 20px; }
.pay-top small { color: var(--muted); }
.pay-rows { display: grid; gap: 10px; margin-bottom: 12px; }
.pay-rows > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.pay-rows span { color: var(--muted); width: 120px; flex-shrink: 0; }
.pay-rows b.ok { color: var(--good); } .pay-rows b.bad { color: #FF7A6B; font-weight: 600; }
.pay-rows code, .p-table code { font-size: 12px; background: var(--card2); padding: 4px 8px; border-radius: 8px; word-break: break-all; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--card2); border-radius: 999px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 4px; top: 4px; border-radius: 50%; background: #777; transition: .2s; }
.switch input:checked + span { background: var(--yellow-dim); }
.switch input:checked + span::before { transform: translateX(22px); background: var(--yellow); }
.switch input:disabled + span { opacity: .4; cursor: not-allowed; }
.switch input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }
.pill.pay-paid::before { background: var(--good); } .pill.pay-pending::before { background: var(--yellow); }
.pill.pay-failed::before { background: #FF7A6B; } .pill.pay-expired::before, .pill.pay-cancelled::before { background: var(--neutral); }
