/* AndFinity Booking — 3-step, mobile-first */

.afb {
	--afb-border: rgba(15, 23, 42, 0.12);
	--afb-soft: #f4f7fb;
	--afb-ok: var(--c-accent, #1aa260);
	--afb-bad: #b91c1c;
	--afb-muted: #64748b;
	--afb-navy: var(--c-navy, #0a2540);
	--afb-primary: var(--c-primary, #ef5a1f);
	--afb-primary-2: var(--c-primary-2, #e11d2a);
	max-width: 560px;
	margin: 0 auto;
	font-family: inherit;
	padding-bottom: 24px;
}

.afb__head { margin-bottom: 18px; text-align: center; }
.afb__eyebrow {
	margin: 0 0 6px;
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--afb-primary);
}
.afb__title { margin: 0 0 8px; font-size: clamp(1.55rem, 5vw, 2rem); color: var(--afb-navy); line-height: 1.15; }
.afb__lead { margin: 0; color: var(--afb-muted); font-size: .98rem; line-height: 1.45; }
.afb__hint { margin: 0 0 14px; font-size: .9rem; color: var(--afb-muted); }

.afb__steps {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.afb__step {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 8px;
	border-radius: 999px;
	background: var(--afb-soft);
	color: var(--afb-muted);
	font-size: .82rem;
	font-weight: 700;
}
.afb__step span {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--afb-border);
	font-size: .75rem;
}
.afb__step.is-active {
	background: var(--afb-navy);
	color: #fff;
}
.afb__step.is-active span {
	background: var(--afb-primary);
	border-color: var(--afb-primary);
	color: #fff;
}
.afb__step.is-done {
	background: rgba(26, 162, 96, .12);
	color: var(--afb-ok);
}
.afb__step.is-done span {
	background: var(--afb-ok);
	border-color: var(--afb-ok);
	color: #fff;
}

.afb__alert {
	padding: 12px 14px;
	border-radius: 14px;
	margin-bottom: 14px;
	font-weight: 700;
}
.afb__alert--error {
	background: #fef2f2;
	color: var(--afb-bad);
	border: 1px solid #fecaca;
}

.afb__panel {
	animation: afbIn .25s ease;
}
@keyframes afbIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.afb__back {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--afb-muted);
	font: inherit;
	font-weight: 700;
	padding: 0;
	margin: 0 0 12px;
	cursor: pointer;
}
.afb__subtitle { margin: 0 0 12px; font-size: 1.15rem; color: var(--afb-navy); }

.afb__sports {
	display: grid;
	gap: 10px;
	margin-bottom: 18px;
}
.afb__sport-tab {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border: 1.5px solid var(--afb-border);
	background: #fff;
	color: var(--afb-navy);
	font: inherit;
	font-weight: 700;
	padding: 16px 18px;
	border-radius: 16px;
	cursor: pointer;
	text-align: left;
	min-height: 56px;
	transition: .15s ease;
}
.afb__sport-name { font-size: 1.05rem; }
.afb__sport-price { color: var(--afb-muted); font-size: .9rem; font-weight: 700; }
.afb__sport-tab.is-active,
.afb__sport-tab:hover {
	border-color: var(--afb-navy);
	background: var(--afb-navy);
	color: #fff;
}
.afb__sport-tab.is-active .afb__sport-price,
.afb__sport-tab:hover .afb__sport-price { color: rgba(255,255,255,.8); }

.afb__date-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
	margin-bottom: 12px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.afb__date-chips::-webkit-scrollbar { display: none; }
.afb__chip {
	flex: 0 0 auto;
	border: 1px solid var(--afb-border);
	background: #fff;
	border-radius: 14px;
	padding: 10px 14px;
	font: inherit;
	font-weight: 700;
	color: var(--afb-navy);
	cursor: pointer;
	min-height: 44px;
}
.afb__chip.is-active {
	background: var(--afb-navy);
	border-color: var(--afb-navy);
	color: #fff;
}
.afb__chip small {
	display: block;
	font-size: .72rem;
	font-weight: 600;
	opacity: .75;
	margin-top: 2px;
}

.afb__date-row { margin-bottom: 18px; }
.afb__label {
	display: block;
	font-weight: 700;
	font-size: .85rem;
	margin-bottom: 8px;
	color: var(--afb-navy);
}
.afb__required { color: var(--afb-bad); }
.afb__input {
	width: 100%;
	border: 1.5px solid var(--afb-border);
	border-radius: 14px;
	padding: 14px 16px;
	font: inherit;
	background: #fff;
	min-height: 52px;
}
.afb__input--date { font-weight: 700; font-size: 1.05rem; }

.afb__slots-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 12px;
}
.afb__price-note { font-size: .8rem; color: var(--afb-muted); }
.afb__loading { color: var(--afb-muted); margin: 0 0 12px; }
.afb__empty { color: var(--afb-muted); padding: 18px 0; }

.afb__slot-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 100px;
}
.afb__slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 16px 10px;
	min-height: 72px;
	border-radius: 16px;
	border: 1.5px solid var(--afb-border);
	background: #fff;
	cursor: pointer;
	transition: .15s ease;
	font: inherit;
}
.afb__slot-time { font-weight: 800; color: var(--afb-navy); font-size: 1.05rem; }
.afb__slot-meta { font-size: .82rem; color: var(--afb-muted); font-weight: 700; }
.afb__slot--available:hover { border-color: var(--afb-primary); }
.afb__slot.is-selected {
	border-color: var(--afb-ok);
	background: rgba(26, 162, 96, .12);
	box-shadow: 0 0 0 2px rgba(26, 162, 96, .2);
}
.afb__slot.is-selected .afb__slot-meta { color: var(--afb-ok); }
.afb__slot--booked,
.afb__slot--blocked,
.afb__slot--past {
	opacity: .5;
	cursor: not-allowed;
	background: var(--afb-soft);
}
.afb__slot--booked .afb__slot-meta,
.afb__slot--blocked .afb__slot-meta { color: var(--afb-bad); }

.afb__stickybar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 80;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	background: rgba(255,255,255,.96);
	backdrop-filter: blur(10px);
	border-top: 1px solid var(--afb-border);
	box-shadow: 0 -12px 30px -20px rgba(15,23,42,.35);
}
.afb__stickybar-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.afb__stickybar-text strong { color: var(--afb-navy); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afb__stickybar-text span { color: var(--afb-ok); font-weight: 800; }
.afb__stickybar .afb__btn { flex: 0 0 auto; min-width: 120px; padding: 14px 18px; }

.afb__checkout {
	background: #fff;
	border: 1px solid var(--afb-border);
	border-radius: 20px;
	padding: 18px;
}
.afb__summary { margin-bottom: 14px; }
.afb__summary-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--afb-border);
	color: var(--afb-muted);
	font-size: .95rem;
}
.afb__summary-row strong { color: var(--afb-navy); }
.afb__form .afb__label { margin-top: 12px; }
.afb__pay { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--afb-border); }
.afb__pay-note { color: var(--afb-muted); margin: 0 0 10px; font-size: .92rem; line-height: 1.45; }
.afb__qr-wrap { display: flex; justify-content: center; margin: 14px 0; }
.afb__qr {
	width: min(240px, 78vw);
	height: auto;
	border-radius: 16px;
	border: 1px solid var(--afb-border);
	background: #fff;
	padding: 10px;
}
.afb__policy-note {
	margin: 14px 0 0;
	font-size: .82rem;
	color: var(--afb-muted);
	line-height: 1.4;
	text-align: center;
}
.afb__policy-note a { color: var(--afb-navy); font-weight: 700; }

.afb__btn {
	border: none;
	border-radius: 14px;
	padding: 15px 18px;
	font-weight: 800;
	cursor: pointer;
	font: inherit;
	min-height: 52px;
}
.afb__btn--primary {
	background: linear-gradient(120deg, var(--afb-primary), var(--afb-primary-2));
	color: #fff;
	box-shadow: 0 14px 28px -14px rgba(225, 29, 42, .55);
}
.afb__btn--block { width: 100%; }
.afb__btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.afb__success {
	text-align: center;
	padding: 28px 18px;
	background: #fff;
	border-radius: 20px;
	border: 1px solid var(--afb-border);
}
.afb__success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: rgba(26, 162, 96, .12);
	color: var(--afb-ok);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	font-weight: 800;
}
.afb__booking-code {
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: .04em;
	color: var(--afb-ok);
	margin: 8px 0 16px;
	word-break: break-all;
}
.afb__success-note { color: var(--afb-muted); margin: 0 0 10px; line-height: 1.45; }

@media (min-width: 560px) {
	.afb__slot-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; }
	.afb__stickybar {
		position: static;
		margin-top: 8px;
		border: 1px solid var(--afb-border);
		border-radius: 16px;
		box-shadow: none;
		padding: 12px;
	}
}

/* Hide theme sticky Book FAB on booking page so it doesn't cover CTAs */
body.page-template-template-book .sticky-book,
body.page-book-a-slot .sticky-book {
	display: none !important;
}
body.page-template-template-book {
	padding-bottom: 0;
}
.section--book { padding-top: 28px; padding-bottom: 40px; }
