/* Sparx Event Tickets — front end */
.smt-wrap, .smt-checkin {
	--smt-brand: #1d3c78;
	--smt-ink: #111827;
	--smt-muted: #6b7280;
	--smt-line: #e5e7eb;
	--smt-soft: #f6f7f9;
	--smt-ok: #15803d;
	--smt-warn: #b45309;
	--smt-bad: #b91c1c;
	max-width: 560px;
	margin: 0 auto;
	color: var(--smt-ink);
	font-size: 16px;
	line-height: 1.45;
	box-sizing: border-box;
}
.smt-wrap *, .smt-checkin * { box-sizing: border-box; }

/* Event card */
.smt-event { background: var(--smt-brand); color: #fff; border-radius: 16px 16px 0 0; padding: 22px 22px 18px; }
.smt-event__org { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.smt-event__name { color: #fff !important; font-size: 1.45em; margin: 4px 0 12px !important; line-height: 1.2; }
.smt-event__meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.smt-event__meta li { margin: 0; display: grid; grid-template-columns: 1.5em 1fr; gap: 6px; align-items: baseline; }
.smt-i { text-align: center; }
.smt-left { display: inline-block; margin-left: 4px; font-style: normal; font-size: 12px; background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 99px; }

/* Form */
.smt-form, .smt-status, .smt-notice { background: #fff; border: 1px solid var(--smt-line); border-top: 0; border-radius: 0 0 16px 16px; padding: 22px; }
.smt-notice { border-top: 1px solid var(--smt-line); border-radius: 16px; text-align: center; }
.smt-event + .smt-notice { border-top: 0; border-radius: 0 0 16px 16px; }
.smt-field { margin-bottom: 14px; }
.smt-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.smt-field input, .smt-field select, .smt-status__retry input, .smt-ci-search input {
	width: 100%; font-size: 16px; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: var(--smt-ink);
}
.smt-field input:focus, .smt-field select:focus { outline: 2px solid var(--smt-brand); outline-offset: 1px; border-color: transparent; }
.smt-row { display: grid; grid-template-columns: 1fr 96px; gap: 12px; }
.smt-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.smt-manual { background: var(--smt-soft); border-radius: 12px; padding: 14px 14px 2px; margin-bottom: 14px; font-size: 14px; }
.smt-manual p { margin: 0 0 10px; }
.smt-manual__till strong { font-size: 1.1em; }

.smt-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 100%;
	padding: 14px 18px; border: 0; border-radius: 10px; cursor: pointer;
	background: var(--smt-brand); color: #fff !important; font-size: 16px; font-weight: 700; text-decoration: none !important;
	transition: filter .15s;
}
.smt-btn:hover { filter: brightness(1.1); }
.smt-btn:disabled { opacity: .6; cursor: wait; }
.smt-btn--ghost { background: transparent; color: var(--smt-brand) !important; border: 1.5px solid var(--smt-brand); }
.smt-btn--sm { width: auto; padding: 6px 12px; font-size: 14px; }
.smt-msg { background: #fef2f2; color: var(--smt-bad); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.smt-small { font-size: 12px; color: var(--smt-muted); margin: 10px 0 0; }

/* Payment status */
.smt-status { text-align: center; }
.smt-status__icon {
	width: 64px; height: 64px; margin: 4px auto 12px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: #fff; background: var(--smt-brand);
}
.smt-status--wait .smt-status__icon { background: transparent; }
.smt-status--ok .smt-status__icon { background: var(--smt-ok); }
.smt-status--err .smt-status__icon { background: var(--smt-bad); }
.smt-status__title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.smt-status__text { color: var(--smt-muted); font-size: 14px; }
.smt-status__ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--smt-muted); margin-top: 8px; }
.smt-status__retry { margin-top: 14px; }
.smt-status__actions { display: grid; gap: 10px; margin-top: 16px; }
.smt-spinner { width: 48px; height: 48px; border: 4px solid var(--smt-line); border-top-color: var(--smt-brand); border-radius: 50%; animation: smt-spin .8s linear infinite; }
@keyframes smt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .smt-spinner { animation-duration: 2.4s; } }

/* Check-in */
.smt-checkin { max-width: 520px; }
.smt-ci-head { display: flex; justify-content: space-between; align-items: center; background: var(--smt-brand); color: #fff; padding: 14px 16px; border-radius: 14px 14px 0 0; }
.smt-ci-event { font-weight: 700; }
.smt-ci-user { font-size: 12px; opacity: .8; }
.smt-ci-count { text-align: right; font-size: 14px; }
.smt-ci-count strong { font-size: 24px; }
.smt-ci-count small { display: block; font-size: 11px; opacity: .8; white-space: nowrap; }
.smt-ci-camera { position: relative; min-height: 280px; background: #0b0f19; overflow: hidden; }
#smt-reader { width: 100%; }
#smt-reader video { width: 100% !important; display: block; }
.smt-ci-result {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; padding: 20px; color: #fff; gap: 4px;
}
.smt-ci-result[hidden] { display: none; }
.smt-ci-result--ok { background: var(--smt-ok); }
.smt-ci-result--warn { background: var(--smt-warn); }
.smt-ci-result--bad { background: var(--smt-bad); }
.smt-ci-result__icon { font-size: 56px; line-height: 1; font-weight: 800; }
.smt-ci-result__title { font-size: 24px; font-weight: 800; letter-spacing: .04em; }
.smt-ci-result__name { font-size: 20px; font-weight: 600; }
.smt-ci-result__detail { font-size: 14px; opacity: .95; max-width: 34ch; }
.smt-ci-result .smt-btn { margin-top: 14px; width: auto; background: rgba(0,0,0,.25); }
.smt-ci-start { border-radius: 0 0 14px 14px; }
.smt-ci-search { margin-top: 20px; }
.smt-ci-search label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 6px; }
.smt-ci-search__row { display: flex; gap: 8px; }
.smt-ci-search__row .smt-btn { width: auto; }
.smt-ci-order { border: 1px solid var(--smt-line); border-radius: 12px; padding: 12px; margin-top: 10px; background: #fff; }
.smt-ci-order__head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.smt-ci-order__head span { color: var(--smt-muted); font-size: 13px; }
.smt-ci-ticket { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--smt-line); }
.smt-ci-ticket code { font-weight: 700; }
.smt-ci-ticket span { color: var(--smt-muted); font-size: 13px; flex: 1; }
.smt-ci-ticket em { color: var(--smt-warn); font-style: normal; font-size: 13px; font-weight: 600; }

@media (max-width: 420px) {
	.smt-row { grid-template-columns: 1fr 80px; }
	.smt-form, .smt-status { padding: 18px 16px; }
}
