/* Wisprof Ticket: customer ticket page. Mobile-first, scoped to .wes-app. */

.wes-app {
	--wes-accent: #4f46e5;
	--wes-accent-dark: #4338ca;
	--wes-ink: #111827;
	--wes-muted: #6b7280;
	--wes-line: #e5e7eb;
	--wes-bg: #ffffff;
	--wes-soft: #f9fafb;
	--wes-ok: #059669;
	--wes-bad: #dc2626;
	--wes-radius: 14px;

	max-width: 560px;
	margin: 0 auto;
	color: var(--wes-ink);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}

.wes-app *,
.wes-app *::before,
.wes-app *::after {
	box-sizing: inherit;
}

/* Event header ---------------------------------------------------------- */
.wes-event {
	background: var(--wes-bg);
	border: 1px solid var(--wes-line);
	border-radius: var(--wes-radius);
	overflow: hidden;
	margin-bottom: 20px;
}

.wes-event__banner {
	aspect-ratio: 16 / 9;
	background: #1f2937;
}

.wes-event__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wes-event__body {
	padding: 18px 20px 20px;
}

.wes-event__title {
	margin: 0 0 8px;
	font-size: 1.5rem;
	line-height: 1.25;
}

.wes-event__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	color: var(--wes-muted);
	font-size: 0.95rem;
}

.wes-event__meta li {
	display: flex;
	gap: 8px;
	align-items: baseline;
	margin: 2px 0;
}

.wes-event__desc {
	margin-top: 12px;
	font-size: 0.95rem;
}

.wes-event__desc p:last-child {
	margin-bottom: 0;
}

/* Form ------------------------------------------------------------------ */
.wes-form {
	background: var(--wes-bg);
	border: 1px solid var(--wes-line);
	border-radius: var(--wes-radius);
	padding: 20px;
}

.wes-step {
	border: 0;
	margin: 0 0 24px;
	padding: 0;
	min-width: 0;
}

.wes-step__title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 1.05rem;
	margin-bottom: 12px;
	padding: 0;
}

.wes-step__title span {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--wes-accent);
	color: #fff;
	font-size: 0.85rem;
}

.wes-types {
	display: grid;
	gap: 10px;
}

.wes-type {
	display: block;
	cursor: pointer;
	margin: 0;
}

.wes-type input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wes-type__card {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 12px;
	padding: 14px 16px;
	border: 2px solid var(--wes-line);
	border-radius: 12px;
	background: var(--wes-bg);
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.wes-type__name {
	font-weight: 700;
}

.wes-type__price {
	font-weight: 700;
	text-align: right;
}

.wes-type__desc {
	grid-column: 1 / -1;
	color: var(--wes-muted);
	font-size: 0.9rem;
}

.wes-type__tag {
	grid-column: 1 / -1;
	justify-self: start;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #b45309;
	background: #fef3c7;
	border-radius: 999px;
	padding: 2px 10px;
	margin-top: 4px;
}

.wes-type__tag--out {
	color: var(--wes-bad);
	background: #fee2e2;
}

.wes-type input:checked + .wes-type__card {
	border-color: var(--wes-accent);
	background: #eef2ff;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.wes-type input:focus-visible + .wes-type__card {
	outline: 3px solid var(--wes-accent);
	outline-offset: 2px;
}

.wes-type.is-soldout {
	cursor: not-allowed;
	opacity: 0.55;
}

.wes-qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
}

.wes-stepper {
	display: inline-flex;
	border: 2px solid var(--wes-line);
	border-radius: 12px;
	overflow: hidden;
}

.wes-stepper__btn {
	width: 48px;
	height: 48px;
	border: 0;
	background: var(--wes-soft);
	color: var(--wes-ink);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.wes-stepper__btn:active {
	background: var(--wes-line);
}

.wes-stepper input {
	width: 56px;
	height: 48px;
	border: 0;
	text-align: center;
	font-size: 1.1rem;
	font-weight: 700;
	-moz-appearance: textfield;
	appearance: textfield;
	background: var(--wes-bg);
	color: var(--wes-ink);
	padding: 0;
}

.wes-stepper input::-webkit-outer-spin-button,
.wes-stepper input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wes-field {
	margin-bottom: 14px;
}

.wes-label {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 6px;
}

.wes-field input {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 2px solid var(--wes-line);
	border-radius: 10px;
	font-size: 16px; /* Prevents iOS zoom on focus. */
	background: var(--wes-bg);
	color: var(--wes-ink);
}

.wes-field input:focus {
	outline: none;
	border-color: var(--wes-accent);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.wes-hint {
	display: block;
	color: var(--wes-muted);
	font-size: 0.85rem;
	margin-top: 4px;
}

.wes-summary {
	background: var(--wes-soft);
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 16px;
}

.wes-summary__row,
.wes-summary__total {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.wes-summary__row {
	color: var(--wes-muted);
	font-size: 0.95rem;
}

.wes-summary__total {
	border-top: 1px dashed var(--wes-line);
	margin-top: 8px;
	padding-top: 8px;
	font-size: 1.15rem;
}

.wes-error {
	background: #fee2e2;
	color: #991b1b;
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 14px;
	font-size: 0.95rem;
}

.wes-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 54px;
	padding: 12px 20px;
	border: 0;
	border-radius: 12px;
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, transform 0.05s;
}

.wes-btn--primary {
	background: var(--wes-accent);
	color: #fff;
}

.wes-btn--primary:hover {
	background: var(--wes-accent-dark);
	color: #fff;
}

.wes-btn:active {
	transform: translateY(1px);
}

.wes-btn--block {
	width: 100%;
}

.wes-btn:disabled {
	opacity: 0.7;
	cursor: progress;
}

.wes-secure {
	text-align: center;
	color: var(--wes-muted);
	font-size: 0.85rem;
	margin: 10px 0 0;
}

.wes-notice {
	background: var(--wes-soft);
	border-radius: var(--wes-radius);
	padding: 20px;
	text-align: center;
}

/* Order status + tickets ------------------------------------------------ */
.wes-status {
	border-radius: var(--wes-radius);
	padding: 24px 20px;
	text-align: center;
	margin-bottom: 20px;
}

.wes-status h3 {
	margin: 0 0 6px;
	font-size: 1.3rem;
}

.wes-status p {
	margin: 0 0 6px;
}

.wes-status--pending {
	background: #eef2ff;
}

.wes-status--success {
	background: #d1fae5;
	color: #065f46;
}

.wes-status--error {
	background: #fee2e2;
	color: #991b1b;
}

.wes-spinner {
	width: 40px;
	height: 40px;
	margin: 0 auto 12px;
	border: 4px solid #c7d2fe;
	border-top-color: var(--wes-accent);
	border-radius: 50%;
	animation: wes-spin 0.8s linear infinite;
}

@keyframes wes-spin {
	to {
		transform: rotate(360deg);
	}
}

.wes-tickets {
	display: grid;
	gap: 16px;
}

.wes-ticket {
	background: var(--wes-bg);
	border: 2px dashed #d1d5db;
	border-radius: var(--wes-radius);
	padding: 20px;
	text-align: center;
}

.wes-ticket__event {
	font-weight: 700;
	font-size: 1.05rem;
}

.wes-ticket__type {
	display: inline-block;
	margin: 6px 0 10px;
	background: #eef2ff;
	color: #3730a3;
	border-radius: 999px;
	padding: 3px 12px;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.wes-ticket__qr {
	display: block;
	width: 240px;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	image-rendering: pixelated;
}

.wes-ticket__void {
	display: grid;
	place-items: center;
	width: 240px;
	max-width: 100%;
	aspect-ratio: 1;
	margin: 0 auto;
	background: var(--wes-soft);
	color: var(--wes-muted);
	font-size: 1.6rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	border-radius: 10px;
}

.wes-ticket__number {
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin-top: 10px;
}

.wes-ticket__holder {
	color: var(--wes-muted);
}

.wes-ticket__state {
	margin-top: 8px;
	padding: 6px 10px;
	border-radius: 8px;
	background: #ede9fe;
	color: #5b21b6;
	font-size: 0.85rem;
	font-weight: 600;
}

.wes-ticket__position {
	color: var(--wes-muted);
	font-size: 0.85rem;
	margin: -4px 0 8px;
}

.wes-save-ticket {
	margin-top: 16px;
}

@media (min-width: 640px) {
	.wes-form {
		padding: 28px;
	}

	.wes-types {
		grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	}

	.wes-type__card {
		grid-template-columns: 1fr;
		height: 100%;
	}

	.wes-type__price {
		text-align: left;
		font-size: 1.2rem;
	}
}

/* Staff portal [wisprof_staff_account] ---------------------------------- */
.wes-portal {
	max-width: 440px;
}

.wes-portal__card {
	margin-bottom: 16px;
}

.wes-portal__title {
	margin: 0 0 14px;
	font-size: 1.3rem;
	line-height: 1.3;
}

.wes-portal__hello {
	margin: 0 0 14px;
	font-size: 1.2rem;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.wes-portal__actions {
	display: grid;
	gap: 12px;
}

.wes-portal__launch {
	min-height: 64px;
	font-size: 1.2rem;
}

.wes-btn--secondary {
	background: var(--wes-soft);
	color: var(--wes-ink);
	border: 2px solid var(--wes-line);
}

.wes-btn--secondary:hover {
	border-color: var(--wes-accent);
	color: var(--wes-ink);
}

.wes-portal__check {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	font-size: 0.95rem;
}

.wes-portal__alt {
	text-align: center;
	margin: 14px 0 0;
}

.wes-portal__alt a {
	color: var(--wes-accent);
}

.wes-portal__ok {
	background: #d1fae5;
	color: #065f46;
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 14px;
	font-size: 0.95rem;
}

/* Door Dashboard [wisprof_door_dashboard] ------------------------------- */
.wes-app--wide {
	max-width: 960px;
}

.wes-portal__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.wes-portal__nav a:not(.wes-btn) {
	color: var(--wes-accent);
	font-weight: 600;
}

.wes-portal__nav .wes-btn {
	min-height: 46px;
}

.wes-door__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.wes-door__title {
	margin: 0;
	font-size: 1.4rem;
	line-height: 1.25;
}

.wes-door__event {
	color: var(--wes-muted);
	overflow-wrap: anywhere;
}

.wes-door__live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--wes-ok);
}

.wes-door__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: currentColor;
	animation: wes-door-pulse 2s infinite;
}

.wes-door.is-stale .wes-door__live {
	color: var(--wes-muted);
}

.wes-door.is-stale .wes-door__dot {
	animation: none;
}

@keyframes wes-door-pulse {
	50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
	.wes-door__dot { animation: none; }
}

.wes-door__alert {
	background: #fef3c7;
	color: #92400e;
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 14px;
	font-size: 0.95rem;
}

.wes-door__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	margin-bottom: 22px;
}

.wes-door__card {
	min-width: 0;
	background: var(--wes-bg);
	border: 1px solid var(--wes-line);
	border-radius: var(--wes-radius);
	padding: 16px 18px;
}

.wes-door__card--accent {
	border-color: var(--wes-accent);
	box-shadow: inset 4px 0 0 var(--wes-accent);
}

.wes-door__label {
	color: var(--wes-muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.wes-door__value {
	font-size: clamp(2rem, 8vw, 2.75rem);
	font-weight: 800;
	line-height: 1.15;
	margin-top: 4px;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.wes-door__sub {
	color: var(--wes-muted);
	font-size: 0.85rem;
	margin-top: 4px;
}

.wes-door__bar {
	height: 6px;
	border-radius: 999px;
	background: var(--wes-line);
	overflow: hidden;
	margin-top: 10px;
}

.wes-door__bar span {
	display: block;
	height: 100%;
	background: var(--wes-accent);
	transition: width 0.4s;
}

.wes-door__subtitle {
	margin: 0 0 10px;
	font-size: 1.1rem;
}

.wes-door__feed {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--wes-bg);
	border: 1px solid var(--wes-line);
	border-radius: var(--wes-radius);
	overflow: hidden;
}

.wes-door__feed li {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 2px 12px;
	padding: 10px 14px;
	border-top: 1px solid var(--wes-line);
	min-width: 0;
}

.wes-door__feed li:first-child {
	border-top: 0;
}

.wes-door__time {
	color: var(--wes-muted);
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wes-door__who {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.wes-door__meta {
	grid-column: 2;
	color: var(--wes-muted);
	font-size: 0.85rem;
	overflow-wrap: anywhere;
}

.wes-door__empty {
	color: var(--wes-muted);
	display: block !important;
}

.wes-door__move {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	border-radius: 6px;
	padding: 2px 7px;
	margin-right: 4px;
	vertical-align: 1px;
	background: #d1fae5;
	color: #065f46;
}

.wes-door__move--out {
	background: #fef3c7;
	color: #92400e;
}

.wes-door__move--reentry {
	background: #dbeafe;
	color: #1e3a8a;
}
