/**
 * SPAV Event Registration — frontend styles.
 * All selectors are namespaced with .spav-cer- to avoid theme/plugin conflicts.
 */

.spav-cer-wrapper {
	--spav-cer-primary: #5b2ee6;
	--spav-cer-primary-dark: #4a25bd;
	--spav-cer-ink: #1f2430;
	--spav-cer-muted: #6b7280;
	--spav-cer-line: #e6e8ee;
	--spav-cer-bg: #f6f7fb;
	--spav-cer-card: #ffffff;
	--spav-cer-ok: #0f9d58;
	--spav-cer-danger: #d23f3f;
	color: var(--spav-cer-ink);
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}

.spav-cer-wrapper *,
.spav-cer-wrapper *::before,
.spav-cer-wrapper *::after {
	box-sizing: border-box;
}

.spav-cer-layout {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 24px;
	align-items: start;
}

.spav-cer-section {
	margin-bottom: 28px;
}

.spav-cer-section-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 4px;
}

.spav-cer-section-sub {
	color: var(--spav-cer-muted);
	margin: 0 0 14px;
	font-size: 14px;
}

.spav-cer-cards {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* Cards */
.spav-cer-ticket-card,
.spav-cer-addon-card {
	background: var(--spav-cer-card);
	border: 1px solid var(--spav-cer-line);
	border-radius: 14px;
	padding: 16px 18px;
	position: relative;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.spav-cer-ticket-card.is-selected,
.spav-cer-addon-card.is-selected {
	border-color: var(--spav-cer-primary);
	box-shadow: 0 0 0 3px rgba(91, 46, 230, .12);
}

.spav-cer-is-unavailable {
	opacity: .6;
	background: #fafafa;
}

.spav-cer-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.spav-cer-price {
	font-size: 22px;
	font-weight: 800;
	color: var(--spav-cer-primary);
}

.spav-cer-badge {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 3px 8px;
	border-radius: 999px;
	background: #eee;
	color: #555;
}

.spav-cer-badge-expired,
.spav-cer-badge-sold_out {
	background: #fdecec;
	color: var(--spav-cer-danger);
}

.spav-cer-item-name {
	font-size: 16px;
	font-weight: 700;
	margin: 8px 0 2px;
}

.spav-cer-gst-note {
	color: var(--spav-cer-danger);
	font-size: 12.5px;
	margin-bottom: 2px;
}

.spav-cer-deadline {
	color: var(--spav-cer-muted);
	font-size: 12.5px;
}

.spav-cer-item-desc {
	color: #4b5160;
	font-size: 13.5px;
	margin-top: 8px;
}

.spav-cer-card-foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 14px;
}

.spav-cer-remaining {
	font-size: 12px;
	color: var(--spav-cer-danger);
	font-weight: 600;
	margin-right: auto;
}

.spav-cer-eligibility-note {
	font-size: 12px;
	color: var(--spav-cer-muted);
	margin-right: auto;
}

/* Quantity control */
.spav-cer-quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--spav-cer-line);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.spav-cer-quantity button {
	width: 38px;
	height: 38px;
	border: 0;
	background: #f4f2fe;
	color: var(--spav-cer-primary);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	font-weight: 700;
}

.spav-cer-quantity button:hover:not(:disabled) {
	background: #e9e4fd;
}

.spav-cer-quantity button:disabled {
	color: #c3c6cf;
	cursor: not-allowed;
	background: #f7f7f9;
}

.spav-cer-quantity button:focus-visible {
	outline: 2px solid var(--spav-cer-primary);
	outline-offset: -2px;
}

.spav-cer-qty-input {
	width: 44px;
	height: 38px;
	text-align: center;
	border: 0;
	font-size: 15px;
	font-weight: 700;
	background: #fff;
	color: var(--spav-cer-ink);
	pointer-events: none;
}

/* Order summary */
.spav-cer-summary.spav-cer-sticky .spav-cer-summary-card {
	position: sticky;
	top: 24px;
}

.spav-cer-summary-card {
	background: var(--spav-cer-card);
	border: 1px solid var(--spav-cer-line);
	border-radius: 16px;
	padding: 20px;
}

.spav-cer-summary-title {
	font-size: 16px;
	font-weight: 800;
	margin: 0 0 12px;
}

.spav-cer-event-meta {
	border-bottom: 1px dashed var(--spav-cer-line);
	padding-bottom: 12px;
	margin-bottom: 12px;
}

.spav-cer-event-name {
	font-weight: 700;
}

.spav-cer-event-date,
.spav-cer-event-venue {
	color: var(--spav-cer-muted);
	font-size: 13px;
}

.spav-cer-summary-lines .spav-cer-line {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 14px;
	color: #3a4050;
}

.spav-cer-summary-total {
	display: flex;
	justify-content: space-between;
	border-top: 1px solid var(--spav-cer-line);
	margin-top: 10px;
	padding-top: 12px;
	font-size: 18px;
	font-weight: 800;
}

.spav-cer-continue,
.spav-cer-pay,
.spav-cer-print {
	width: 100%;
	margin-top: 16px;
	padding: 13px 16px;
	background: var(--spav-cer-primary);
	color: #fff;
	border: 0;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease;
}

.spav-cer-continue:hover:not(:disabled),
.spav-cer-pay:hover,
.spav-cer-print:hover {
	background: var(--spav-cer-primary-dark);
}

.spav-cer-continue:disabled {
	background: #c3c6cf;
	cursor: not-allowed;
}

.spav-cer-continue:focus-visible,
.spav-cer-pay:focus-visible {
	outline: 3px solid rgba(91, 46, 230, .4);
	outline-offset: 2px;
}

.spav-cer-summary-hint {
	font-size: 11.5px;
	color: var(--spav-cer-muted);
	text-align: center;
	margin: 10px 0 0;
}

/* Notes & errors */
.spav-cer-note {
	background: #fff8e6;
	border: 1px solid #f2e2b6;
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 20px;
}

.spav-cer-note h4 {
	margin: 0 0 6px;
	font-size: 14px;
}

.spav-cer-note p {
	margin: 0;
	font-size: 13.5px;
	color: #6a5a2a;
}

.spav-cer-errors {
	background: #fdecec;
	border: 1px solid #f4caca;
	color: var(--spav-cer-danger);
	border-radius: 10px;
	padding: 12px 14px;
	margin-top: 14px;
	font-size: 13.5px;
}

.spav-cer-errors ul {
	margin: 0;
	padding-left: 18px;
}

.spav-cer-inline-notice {
	background: #eef1f8;
	border: 1px solid #d6dbe8;
	border-radius: 10px;
	padding: 14px 16px;
	color: #43506b;
	font-size: 14px;
}

/* Details step */
.spav-cer-details-inner,
.spav-cer-confirmation-inner {
	max-width: 640px;
	margin: 0 auto;
	background: var(--spav-cer-card);
	border: 1px solid var(--spav-cer-line);
	border-radius: 16px;
	padding: 24px;
}

.spav-cer-back {
	background: none;
	border: 0;
	color: var(--spav-cer-primary);
	cursor: pointer;
	font-size: 14px;
	padding: 0 0 12px;
	font-weight: 600;
}

.spav-cer-field {
	margin-bottom: 14px;
}

.spav-cer-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.spav-cer-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 5px;
}

.spav-cer-field label span[aria-hidden] {
	color: var(--spav-cer-danger);
}

.spav-cer-field input,
.spav-cer-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--spav-cer-line);
	border-radius: 9px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	color: var(--spav-cer-ink);
}

.spav-cer-field input:focus,
.spav-cer-field textarea:focus {
	outline: none;
	border-color: var(--spav-cer-primary);
	box-shadow: 0 0 0 3px rgba(91, 46, 230, .12);
}

/* Confirmation */
.spav-cer-confirmation-inner {
	text-align: center;
}

.spav-cer-confirm-icon {
	width: 56px;
	height: 56px;
	line-height: 56px;
	border-radius: 50%;
	background: var(--spav-cer-ok);
	color: #fff;
	font-size: 30px;
	margin: 0 auto 12px;
}

.spav-cer-confirm-lines {
	text-align: left;
	margin: 16px 0;
}

.spav-cer-confirm-line {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px dashed var(--spav-cer-line);
	font-size: 14px;
}

.spav-cer-confirm-totals > div {
	display: flex;
	justify-content: space-between;
	padding: 4px 0;
	font-size: 14px;
}

.spav-cer-confirm-grand {
	font-weight: 800;
	font-size: 17px;
	border-top: 1px solid var(--spav-cer-line);
	margin-top: 6px;
	padding-top: 8px;
}

.spav-cer-is-busy {
	opacity: .7;
	pointer-events: none;
}

/* Responsive */
@media (max-width: 860px) {
	.spav-cer-layout {
		grid-template-columns: 1fr;
	}
	.spav-cer-summary.spav-cer-sticky .spav-cer-summary-card {
		position: static;
	}
	.spav-cer-field-row {
		grid-template-columns: 1fr;
	}
}
