/* Rampage Tickets: front end. Colours follow --rt-brand (set in Settings). */
.rt-box, .rt-scanner {
	--rt-ink: #1d1d1f;
	--rt-muted: #6e6a66;
	--rt-line: #e5e1dc;
	--rt-soft: #f7f5f2;
	--rt-ok: #1a7f37;
	--rt-warn: #9a6700;
	--rt-bad: #b42318;
	box-sizing: border-box;
	color: var(--rt-ink);
	font-size: 16px;
	line-height: 1.5;
}
.rt-box *, .rt-scanner * { box-sizing: border-box; }
.rt-box { max-width: 640px; margin: 32px auto; padding: 24px; background: #fff; border: 1px solid var(--rt-line); border-radius: 14px; }
.rt-title { margin: 0 0 16px; font-size: 24px; line-height: 1.2; }
.rt-muted { color: var(--rt-muted); }
.rt-small { font-size: 13px; color: var(--rt-muted); margin: 12px 0 0; }
.rt-hint { font-weight: 400; color: var(--rt-muted); font-size: 13px; }

.rt-types { list-style: none; margin: 0 0 16px; padding: 0; }
.rt-type { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rt-line); margin: 0; }
.rt-type:first-child { border-top: 1px solid var(--rt-line); }
.rt-type-info { display: flex; flex-direction: column; min-width: 0; }
.rt-type-name { font-weight: 700; }
.rt-type-price { font-weight: 600; }
.rt-type-desc { font-size: 14px; color: var(--rt-muted); }
.rt-type-left { font-size: 13px; color: var(--rt-warn); font-weight: 600; }
.rt-type-out { color: var(--rt-bad); }
.rt-unavailable .rt-type-name, .rt-unavailable .rt-type-price { opacity: .55; }

.rt-qty { display: flex; align-items: center; flex-shrink: 0; border: 1px solid var(--rt-line); border-radius: 999px; overflow: hidden; }
.rt-qty-btn { width: 40px; height: 40px; border: 0; background: var(--rt-soft); color: var(--rt-ink); font-size: 20px; line-height: 1; cursor: pointer; padding: 0; border-radius: 0; }
.rt-qty-btn:disabled { opacity: .35; cursor: default; }
.rt-qty-btn:not(:disabled):hover { background: #ece8e3; }
.rt-qty-input { width: 44px; height: 40px; border: 0 !important; text-align: center; font-size: 17px !important; font-weight: 700; color: var(--rt-ink) !important; background: #fff !important; padding: 0 !important; margin: 0; line-height: 40px !important; opacity: 1 !important; -webkit-text-fill-color: var(--rt-ink); -moz-appearance: textfield; appearance: textfield; box-shadow: none !important; }
.rt-qty-input::-webkit-outer-spin-button, .rt-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.rt-buyer { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 4px 0 16px; }
.rt-buyer[hidden] { display: none; }
.rt-field { display: flex; flex-direction: column; gap: 4px; }
.rt-field label { font-size: 14px; font-weight: 600; }
.rt-field input { width: 100%; padding: 10px 12px; border: 1px solid #cfc9c2; border-radius: 8px; font-size: 16px; background: #fff; color: var(--rt-ink); }
.rt-field input:focus { outline: 2px solid var(--rt-brand); outline-offset: 0; border-color: var(--rt-brand); }
.rt-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

.rt-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #fde8e7; color: var(--rt-bad); font-weight: 600; font-size: 15px; }
.rt-error[hidden] { display: none; }

.rt-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rt-total span { color: var(--rt-muted); margin-right: 6px; }
.rt-total strong { font-size: 22px; }
.rt-submit, .rt-button {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 12px 26px; border: 0; border-radius: 999px;
	background: var(--rt-brand, #c8102e); color: #fff !important; text-decoration: none !important;
	font-size: 16px; font-weight: 700; cursor: pointer; transition: filter .15s;
}
.rt-submit:hover:not(:disabled), .rt-button:hover { filter: brightness(1.08); }
.rt-submit:disabled { background: #bdb7b0; cursor: default; }
.rt-submit.rt-loading { opacity: .8; cursor: progress; }
.rt-closed-msg { color: var(--rt-muted); }

@media (max-width: 560px) {
	.rt-box { padding: 18px 16px; margin: 20px 0; border-radius: 12px; }
	.rt-buyer { grid-template-columns: 1fr; }
	.rt-footer { flex-direction: column; align-items: stretch; }
	.rt-total { display: flex; justify-content: space-between; }
	.rt-submit { width: 100%; }
}

/* Confirmation page */
.rt-confirm { text-align: center; }
.rt-confirm-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; color: #fff; }
.rt-ok { background: var(--rt-ok); }
.rt-wait { background: #8a8580; }
.rt-bad { background: var(--rt-bad); }
.rt-ticket-links { list-style: none; padding: 0; margin: 20px 0 0; text-align: left; }
.rt-ticket-links li { margin: 0 0 8px; }
.rt-ticket-links a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--rt-line); border-radius: 10px; text-decoration: none; color: var(--rt-ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.rt-ticket-links a:hover { border-color: var(--rt-brand); }
.rt-arrow { color: var(--rt-brand); font-family: inherit; font-weight: 700; white-space: nowrap; }

/* Door scanner */
.rt-scanner { max-width: 520px; margin: 0 auto; padding: 8px 0 32px; }
.rt-scan-top { display: grid; gap: 6px; margin-bottom: 12px; }
.rt-scan-label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rt-muted); margin: 16px 0 6px; }
.rt-scan-top .rt-scan-label { margin-top: 0; }
#rt-scan-event, .rt-manual input { width: 100%; padding: 12px; font-size: 16px; border: 1px solid #cfc9c2; border-radius: 10px; background: #fff; color: var(--rt-ink); }
.rt-scan-stats { font-size: 15px; color: var(--rt-muted); }
.rt-scan-stats span { font-weight: 700; color: var(--rt-ink); }
.rt-scan-result { border-radius: 14px; padding: 20px 18px; text-align: center; color: #fff; margin: 8px 0 14px; min-height: 112px; display: flex; flex-direction: column; justify-content: center; transition: background .15s; }
.rt-scan-headline { font-size: 28px; font-weight: 800; line-height: 1.15; }
.rt-scan-detail { font-size: 16px; margin-top: 6px; opacity: .95; }
.rt-scan-idle { background: #4a4743; }
.rt-scan-ok { background: var(--rt-ok); }
.rt-scan-already { background: #b7791f; }
.rt-scan-bad { background: var(--rt-bad); }
.rt-scan-busy { background: #6b6762; }
.rt-scan-undo { margin-top: 10px; background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; align-self: center; }
.rt-reader { border-radius: 14px; overflow: hidden; background: #000; }
.rt-reader:empty { display: none; }
.rt-reader video { display: block; width: 100% !important; }
.rt-scan-controls { margin-top: 10px; }
.rt-scan-controls .rt-button { width: 100%; }
.rt-manual-row { display: flex; gap: 8px; }
.rt-manual-row input { text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .05em; }
.rt-manual-row .rt-button { flex-shrink: 0; padding: 12px 18px; }
.rt-recent { list-style: none; margin: 0; padding: 0; }
.rt-recent li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rt-line); font-size: 15px; margin: 0; }
.rt-recent .rt-r-ok { color: var(--rt-ok); font-weight: 700; }
.rt-recent .rt-r-bad { color: var(--rt-bad); font-weight: 700; }
.rt-recent .rt-r-warn { color: var(--rt-warn); font-weight: 700; }
.rt-recent time { color: var(--rt-muted); white-space: nowrap; }
