/* GAFF Comp Tickets — public styles (claim form, support popup, shared UI) */

.gaff-ct {
	--gaff-primary: #c8102e;
	--gaff-dark: #0b1f3a;
	--gaff-accent: #f2a900;
	--gaff-bg: #ffffff;
	--gaff-soft: #fff8ec;
	--gaff-line: #e3dccf;
	--gaff-muted: #6b6f76;
	--gaff-ok: #1a7f4b;
	--gaff-err: #c8102e;
	--gaff-radius: 12px;
	--gaff-field-bg: #ffffff;
	--gaff-btn-radius: 999px;
	color: var(--gaff-dark);
	box-sizing: border-box;
	line-height: 1.5;
}
.gaff-ct *,
.gaff-ct *::before,
.gaff-ct *::after {
	box-sizing: inherit;
}
.gaff-ct[hidden],
.gaff-ct [hidden] {
	display: none !important;
}
.gaff-noscroll {
	overflow: hidden;
}

/* ---------- Fields ---------- */
.gaff-fieldset {
	border: 0;
	margin: 0 0 22px;
	padding: 0;
	min-width: 0;
}
.gaff-legend {
	display: block;
	width: 100%;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gaff-primary);
	padding: 0 0 10px;
	margin: 0 0 14px;
	border-bottom: 2px dashed var(--gaff-line);
}
.gaff-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0 16px;
}
.gaff-field {
	margin: 0 0 14px;
	min-width: 0;
}
.gaff-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 6px;
	color: var(--gaff-dark);
}
.gaff-req {
	color: var(--gaff-primary);
}
.gaff-opt {
	font-weight: 400;
	color: var(--gaff-muted);
	font-size: 12px;
}
.gaff-ct input[type="text"],
.gaff-ct input[type="email"],
.gaff-ct input[type="tel"],
.gaff-ct input[type="password"],
.gaff-ct input[type="search"],
.gaff-ct input[type="number"],
.gaff-ct select,
.gaff-ct textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	font: inherit;
	font-size: 16px;
	color: var(--gaff-dark);
	background: var(--gaff-field-bg);
	border: 1.5px solid var(--gaff-line);
	border-radius: 10px;
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}
.gaff-ct select {
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 36px;
}
.gaff-ct textarea {
	min-height: 110px;
	resize: vertical;
}
.gaff-ct input:focus,
.gaff-ct select:focus,
.gaff-ct textarea:focus {
	outline: none;
	border-color: var(--gaff-dark);
	box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.35);
}
.gaff-ct .is-invalid {
	border-color: var(--gaff-err) !important;
}
.gaff-err {
	display: block;
	min-height: 0;
	margin-top: 4px;
	font-size: 13px;
	color: var(--gaff-err);
}
.gaff-err:empty {
	display: none;
}
.gaff-help {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--gaff-muted);
}
.gaff-check label,
.gaff-check--inline {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400;
	font-size: 14px;
	cursor: pointer;
}
.gaff-check input {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	accent-color: var(--gaff-primary);
	flex: 0 0 auto;
}
.gaff-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Buttons ---------- */
.gaff-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	padding: 12px 28px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-decoration: none;
	border: 2px solid transparent;
	border-radius: var(--gaff-btn-radius);
	cursor: pointer;
	transition: transform 0.12s, background-color 0.15s, color 0.15s, box-shadow 0.15s;
	position: relative;
}
.gaff-btn:active {
	transform: translateY(1px);
}
.gaff-btn:focus-visible {
	outline: 3px solid var(--gaff-accent);
	outline-offset: 2px;
}
.gaff-btn--primary {
	background: var(--gaff-primary);
	color: #fff;
	box-shadow: 0 4px 0 rgba(11, 31, 58, 0.9);
}
.gaff-btn--primary:hover {
	background: var(--gaff-dark);
	color: #fff;
}
.gaff-btn--ghost {
	background: transparent;
	color: var(--gaff-dark);
	border-color: var(--gaff-dark);
}
.gaff-btn--ghost:hover {
	background: var(--gaff-dark);
	color: #fff;
}
.gaff-btn--support {
	background: var(--gaff-dark);
	color: #fff;
}
.gaff-btn--support:hover {
	background: var(--gaff-primary);
	color: #fff;
}
.gaff-btn--block {
	width: 100%;
}
.gaff-btn--sm {
	min-height: 38px;
	padding: 7px 16px;
	font-size: 14px;
}
.gaff-btn__icon {
	flex: 0 0 auto;
}
.gaff-btn.is-busy {
	color: transparent !important;
	pointer-events: none;
}
.gaff-btn.is-busy::after {
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	border: 2.5px solid #fff;
	border-right-color: transparent;
	border-radius: 50%;
	animation: gaff-spin 0.7s linear infinite;
}
.gaff-btn--ghost.is-busy::after {
	border-color: var(--gaff-dark);
	border-right-color: transparent;
}
.gaff-btn[disabled] {
	opacity: 0.75;
	cursor: not-allowed;
}
.gaff-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--gaff-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.gaff-link:hover {
	color: var(--gaff-dark);
}
@keyframes gaff-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Messages ---------- */
.gaff-form-msg {
	margin: 4px 0 16px;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 14px;
	background: var(--gaff-soft);
	border-left: 4px solid var(--gaff-dark);
}
.gaff-form-msg--error {
	background: #fdecee;
	border-left-color: var(--gaff-err);
	color: #7a0b1c;
}
.gaff-form-msg--success {
	background: #e8f6ee;
	border-left-color: var(--gaff-ok);
	color: #0f4d2e;
}
.gaff-form-msg .gaff-resend {
	margin-top: 10px;
}
.gaff-notice {
	padding: 16px 18px;
	border-radius: var(--gaff-radius);
	background: var(--gaff-soft);
	border: 1px solid var(--gaff-line);
	font-weight: 600;
}
.gaff-notice--warn {
	background: #fff4d6;
	border-color: #f2d58a;
}

/* ---------- Claim form ---------- */
.gaff-claim {
	width: 100%;
}
.gaff-claim__submit {
	width: 100%;
	margin-top: 4px;
}
.gaff-fine {
	margin: 16px 0 0;
	font-size: 13px;
	color: var(--gaff-muted);
	text-align: center;
}

/* Sponsor combobox */
.gaff-sponsor__box {
	position: relative;
}
.gaff-ct .gaff-sponsor__box input.gaff-sponsor__input {
	padding-left: 46px !important;
}
.gaff-sponsor__icon {
	position: absolute;
	z-index: 1;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gaff-muted);
	pointer-events: none;
	display: flex;
}
.gaff-sponsor__list {
	position: absolute;
	z-index: 50;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1.5px solid var(--gaff-dark);
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(11, 31, 58, 0.18);
	max-height: 280px;
	overflow-y: auto;
}
.gaff-sponsor__list li {
	margin: 0;
	padding: 10px 12px;
	border-radius: 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	cursor: pointer;
}
.gaff-sponsor__list li.is-active,
.gaff-sponsor__list li:hover {
	background: var(--gaff-soft);
}
.gaff-sponsor__list li.gaff-sponsor__msg {
	cursor: default;
	color: var(--gaff-muted);
	font-size: 14px;
	background: none;
}
.gaff-sponsor__list li.is-full {
	cursor: not-allowed;
	opacity: 0.6;
}
.gaff-sponsor__name {
	font-weight: 700;
}
.gaff-sponsor__co {
	font-size: 13px;
	color: var(--gaff-muted);
}
.gaff-sponsor__full {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gaff-err);
	margin-left: auto;
}
.gaff-sponsor__chosen {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--gaff-soft);
	border: 1.5px solid var(--gaff-accent);
	font-weight: 700;
}
.gaff-sponsor__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--gaff-ok);
	color: #fff;
	font-size: 13px;
	flex: 0 0 auto;
}
.gaff-sponsor__chosen-name {
	flex: 1 1 auto;
	min-width: 0;
}
.gaff-sponsor__change {
	font-weight: 600;
	font-size: 14px;
}

/* Success */
.gaff-claim__success {
	text-align: center;
	padding: 36px 20px 28px;
	background: var(--gaff-soft);
	border: 2px dashed var(--gaff-primary);
	border-radius: 18px;
	outline: none;
	position: relative;
}
.gaff-ticket-stub {
	display: inline-block;
	margin: 0 auto 16px;
	padding: 8px 20px;
	background: var(--gaff-dark);
	color: var(--gaff-accent);
	font-weight: 800;
	letter-spacing: 0.2em;
	font-size: 13px;
	border-radius: 6px;
	position: relative;
}
.gaff-ticket-stub::before,
.gaff-ticket-stub::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 12px;
	height: 12px;
	margin-top: -6px;
	border-radius: 50%;
	background: var(--gaff-soft);
}
.gaff-ticket-stub::before {
	left: -6px;
}
.gaff-ticket-stub::after {
	right: -6px;
}
.gaff-claim__success-title {
	margin: 0 0 10px;
	font-size: 30px;
	line-height: 1.15;
	color: var(--gaff-dark);
}
.gaff-claim__success-msg {
	margin: 0 auto 14px;
	max-width: 460px;
}
.gaff-claim__success-meta {
	margin: 0 0 22px;
	font-size: 14px;
	color: var(--gaff-muted);
}
.gaff-claim__success-meta strong {
	color: var(--gaff-dark);
}

/* ---------- Support trigger ---------- */
.gaff-support-trigger {
	display: inline-block;
}

/* ---------- Modal ---------- */
.gaff-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.gaff-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(11, 31, 58, 0.62);
	backdrop-filter: blur(2px);
	animation: gaff-fade 0.18s ease-out;
}
.gaff-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #fff;
	border-radius: 18px;
	padding: 28px 28px 24px;
	border-top: 6px solid var(--gaff-primary);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	animation: gaff-pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.gaff-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	color: var(--gaff-dark);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	padding: 0;
}
.gaff-modal__close:hover {
	background: var(--gaff-soft);
}
.gaff-modal__head h3 {
	margin: 0 40px 6px 0;
	font-size: 24px;
	line-height: 1.2;
	color: var(--gaff-dark);
}
.gaff-modal__head p {
	margin: 0 0 20px;
	color: var(--gaff-muted);
	font-size: 15px;
}
.gaff-support__done {
	text-align: center;
	padding: 20px 0 6px;
}
.gaff-done-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--gaff-ok);
	color: #fff;
	font-size: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
}
@keyframes gaff-fade {
	from {
		opacity: 0;
	}
}
@keyframes gaff-pop {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.98);
	}
}
@media (prefers-reduced-motion: reduce) {
	.gaff-modal__backdrop,
	.gaff-modal__dialog,
	.gaff-btn.is-busy::after {
		animation: none;
	}
}
@media (max-width: 600px) {
	.gaff-modal {
		align-items: flex-end;
		padding: 0;
	}
	.gaff-modal__dialog {
		max-height: 92vh;
		border-radius: 18px 18px 0 0;
		padding: 24px 18px 20px;
	}
}
.gaff-ct .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* ---------- Voucher ---------- */
.gaff-ct input.gaff-voucher__input {
	max-width: 220px;
	font-size: 20px !important;
	font-weight: 700;
	letter-spacing: 0.3em;
	font-variant-numeric: tabular-nums;
}

/* ---------- Family members ---------- */
.gaff-family__body {
	margin-top: 4px;
}
.gaff-family__help {
	margin: 0 0 14px;
}
.gaff-family__row {
	position: relative;
	padding: 14px 16px 2px;
	margin: 0 0 12px;
	background: var(--gaff-soft);
	border: 1.5px solid var(--gaff-line);
	border-left: 4px solid var(--gaff-accent);
	border-radius: 12px;
}
.gaff-family__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 10px;
}
.gaff-family__title {
	font-size: 14px;
	color: var(--gaff-dark);
}
.gaff-family__remove {
	font-size: 13px;
	font-weight: 600;
}
.gaff-family__add {
	margin: 2px 0 6px;
}
.gaff-family .gaff-err {
	margin-top: 8px;
}

/* ---------- Consent + call us ---------- */
.gaff-consent {
	padding: 14px 16px;
	background: var(--gaff-soft);
	border-radius: 12px;
	border: 1.5px solid var(--gaff-line);
}
.gaff-consent label {
	font-weight: 600;
}
.gaff-callus {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 12px 0 0;
	font-size: 14px;
	color: var(--gaff-dark);
	text-align: center;
}
.gaff-callus__icon {
	flex: 0 0 auto;
	color: var(--gaff-primary);
}
.gaff-callus__tel {
	font-weight: 700;
	white-space: nowrap;
}

/* ---------- Success list ---------- */
.gaff-success-list {
	list-style: none;
	margin: 14px auto 0;
	padding: 0;
	max-width: 420px;
	text-align: left;
}
.gaff-success-list li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 12px;
	padding: 9px 12px;
	background: #fff;
	border: 1px solid var(--gaff-line);
	border-radius: 10px;
	margin-bottom: 6px;
}
.gaff-success-list__name {
	font-weight: 700;
	color: var(--gaff-dark);
}
.gaff-success-list__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
}

.gaff-resend--inline {
	display: inline-block;
	margin-left: 6px;
	font-size: 13px;
	font-weight: 700;
}

/* Safety net: ignore stray auto-paragraph tags if the markup was run through wpautop. */
.gaff-vote__grid > br,
.gaff-vote__grid > p,
.gaff-vcard br,
.gaff-row > br,
.gaff-row > p:empty,
.gaff-ct p:empty {
	display: none !important;
}

/* Editable note between the email and cell phone fields (Form Text → "Note above cell phone"). */
.gaff-ct .gaff-claim__note {
	margin: 0 0 18px;
	padding: 10px 14px;
	border-left: 4px solid var(--gaff-accent);
	border-radius: 6px;
	background: var(--gaff-soft);
	color: var(--gaff-dark);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	max-width: none;
	text-wrap: wrap;
}
