/* Wiskin Course Bookings – booking page
 * Fonts are inherited from the theme. The accent colour is set in Courses → Settings.
 */

.wcb {
	--wcb-accent: #0f6e3f;
	--wcb-ink: #1d2622;
	--wcb-muted: #5f6b66;
	--wcb-line: #dde4e0;
	--wcb-pale: #f1f5f2;
	--wcb-sticky: 24px;
	--wcb-accent-soft: color-mix(in srgb, var(--wcb-accent) 10%, #fff);
	color: var(--wcb-ink);
	font-family: inherit;
	line-height: 1.5;
	margin: 0 0 3rem;
	text-align: left;
}

.wcb *,
.wcb *::before,
.wcb *::after {
	box-sizing: border-box;
}

.wcb [hidden] {
	display: none !important;
}

.wcb :focus-visible {
	outline: 3px solid color-mix(in srgb, var(--wcb-accent) 55%, #fff);
	outline-offset: 2px;
}

.wcb__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 32px;
	align-items: start;
}

.wcb .wcb-h {
	font-size: 1.35rem;
	line-height: 1.2;
	margin: 0 0 4px;
	padding: 0;
	text-transform: none;
	letter-spacing: 0;
}

/* ---------- buttons ---------- */

.wcb .wcb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45em;
	min-height: 44px;
	padding: .65em 1.25em;
	border: 2px solid var(--wcb-accent);
	border-radius: 999px;
	background: var(--wcb-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}

.wcb .wcb-btn:hover {
	background: color-mix(in srgb, var(--wcb-accent) 85%, #000);
	color: #fff;
}

.wcb .wcb-btn--ghost {
	background: #fff;
	color: var(--wcb-accent);
}

.wcb .wcb-btn--ghost:hover {
	background: var(--wcb-accent-soft);
	color: var(--wcb-accent);
}

.wcb .wcb-btn--link {
	background: none;
	border-color: transparent;
	color: var(--wcb-muted);
	text-decoration: underline;
}

.wcb .wcb-btn--link:hover {
	background: none;
	color: var(--wcb-ink);
}

.wcb .wcb-btn--block {
	display: flex;
	width: 100%;
}

.wcb .wcb-btn--big {
	font-size: 1.05rem;
	min-height: 52px;
}

.wcb .wcb-btn.is-disabled {
	opacity: .45;
	pointer-events: none;
}

.wcb .wcb-btn.is-busy {
	opacity: .7;
	cursor: progress;
}

/* ---------- the bib: each child's colour, shaped like a sports shirt ---------- */

.wcb-bib {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 1.9em;
	height: 1.9em;
	padding-top: .3em;
	background: var(--kid, var(--wcb-accent));
	color: #fff;
	font-size: .85em;
	font-weight: 800;
	line-height: 1;
	clip-path: polygon(27% 0, 40% 9%, 60% 9%, 73% 0, 100% 17%, 89% 39%, 79% 34%, 79% 100%, 21% 100%, 21% 34%, 11% 39%, 0 17%);
}

/* ---------- children ---------- */

.wcb-children {
	background: var(--wcb-pale);
	border-radius: 14px;
	padding: 22px 24px;
	margin-bottom: 28px;
}

.wcb .wcb-children__hint {
	color: var(--wcb-muted);
	margin: 0 0 14px;
}

.wcb .wcb-kids {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}

.wcb .wcb-kid {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 6px 6px 10px;
	background: #fff;
	border: 2px solid var(--kid);
	border-radius: 999px;
	font-size: 1.15rem;
}

.wcb-kid__name {
	font-weight: 700;
	font-size: .95rem;
}

.wcb-kid__age {
	color: var(--wcb-muted);
	font-size: .85rem;
}

.wcb .wcb-kid__btn {
	min-height: 32px;
	padding: 2px 10px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--wcb-muted);
	font: inherit;
	font-size: .85rem;
	text-decoration: underline;
	cursor: pointer;
}

.wcb .wcb-kid__btn--remove {
	width: 32px;
	padding: 0;
	font-size: 1.25rem;
	line-height: 1;
	text-decoration: none;
}

.wcb .wcb-kid__btn:hover {
	background: var(--wcb-pale);
	color: var(--wcb-ink);
}

/* ---------- child form ---------- */

.wcb-form {
	background: #fff;
	border: 1px solid var(--wcb-line);
	border-radius: 12px;
	padding: 18px;
}

.wcb-form__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
}

.wcb .wcb-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0;
	font-size: .9rem;
	font-weight: 700;
}

.wcb .wcb-field em {
	color: var(--wcb-muted);
	font-style: normal;
	font-weight: 400;
}

.wcb .wcb-field--wide {
	grid-column: 1 / -1;
}

.wcb .wcb-input {
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: .55em .75em;
	border: 1.5px solid #c5d0ca;
	border-radius: 8px;
	background: #fff;
	color: var(--wcb-ink);
	font: inherit;
	font-weight: 400;
	box-shadow: none;
}

.wcb textarea.wcb-input {
	min-height: 64px;
	resize: vertical;
}

.wcb .wcb-input:focus {
	border-color: var(--wcb-accent);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wcb-accent) 22%, transparent);
}

.wcb .wcb-form__error {
	color: #b42318;
	font-weight: 700;
	margin: 10px 0 0;
}

.wcb .wcb-form__error:empty {
	display: none;
}

.wcb-form__actions {
	display: flex;
	gap: 8px;
	margin-top: 14px;
}

/* ---------- filters ---------- */

.wcb-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}

.wcb .wcb-filter {
	min-height: 40px;
	padding: .4em 1em;
	border: 1.5px solid var(--wcb-line);
	border-radius: 999px;
	background: #fff;
	color: var(--wcb-ink);
	font: inherit;
	font-weight: 600;
	text-transform: none;
	cursor: pointer;
}

.wcb .wcb-filter:hover {
	border-color: var(--wcb-accent);
}

.wcb .wcb-filter.is-active {
	background: var(--wcb-ink);
	border-color: var(--wcb-ink);
	color: #fff;
}

/* ---------- course cards ---------- */

.wcb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
	gap: 20px;
}

.wcb-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--wcb-line);
	border-radius: 14px;
	transition: border-color .15s, box-shadow .15s;
}

.wcb-card.is-selected {
	border-color: var(--wcb-accent);
	box-shadow: 0 0 0 2px var(--wcb-accent);
}

.wcb-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--wcb-pale);
}

/* No picture: mown-pitch stripes in the accent colour. */
.wcb-card__media--empty {
	background: repeating-linear-gradient(90deg, var(--wcb-accent) 0 34px, color-mix(in srgb, var(--wcb-accent) 82%, #fff) 34px 68px);
}

.wcb .wcb-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
}

.wcb-card__type,
.wcb-card__badge {
	position: absolute;
	top: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: .8rem;
	font-weight: 700;
	line-height: 1.3;
}

.wcb-card__type {
	left: 12px;
	background: #fff;
	color: var(--wcb-ink);
}

.wcb-card__badge {
	right: 12px;
	background: var(--wcb-ink);
	color: #fff;
}

.wcb-card.is-unavailable .wcb-card__media {
	filter: grayscale(.8);
}

.wcb-card__body {
	flex: 1;
	padding: 16px 18px 6px;
}

.wcb .wcb-card__title {
	font-size: 1.15rem;
	line-height: 1.25;
	margin: 0 0 6px;
	padding: 0;
	text-transform: none;
	letter-spacing: 0;
}

.wcb .wcb-card__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 6px;
	margin: 0 0 12px;
	color: var(--wcb-muted);
	font-size: .9rem;
}

.wcb .wcb-card__price strong {
	color: var(--wcb-ink);
	font-size: 1.4rem;
	line-height: 1;
}

.wcb-card__places {
	margin-left: auto;
	font-weight: 600;
}

.wcb-card__places.is-low {
	color: #b54708;
}

.wcb .wcb-card__facts {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
	font-size: .92rem;
}

.wcb .wcb-card__facts li {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 0 0 5px;
	padding: 0;
}

.wcb-card__facts svg {
	flex: none;
	width: 17px;
	height: 17px;
	margin-top: 2px;
	fill: none;
	stroke: var(--wcb-accent);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wcb .wcb-card__note {
	margin: 0 0 10px;
	padding: 6px 10px;
	background: #fff6e0;
	border-radius: 6px;
	font-size: .88rem;
}

.wcb .wcb-card__teaser {
	color: var(--wcb-muted);
	font-size: .92rem;
	margin: 0 0 8px;
}

.wcb-card__more summary {
	color: var(--wcb-accent);
	font-weight: 700;
	font-size: .92rem;
	cursor: pointer;
	padding: 2px 0 8px;
}

.wcb-card__desc {
	font-size: .92rem;
}

.wcb-card__desc > *:last-child {
	margin-bottom: 8px;
}

.wcb-card__book {
	padding: 12px 18px 18px;
	border-top: 1px dashed var(--wcb-line);
	margin-top: 8px;
}

.wcb-card__book:empty {
	display: none;
}

.wcb .wcb-card__bookfor {
	margin: 0 0 8px;
	color: var(--wcb-muted);
	font-size: .85rem;
	font-weight: 600;
}

.wcb-picks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wcb .wcb-pick {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 5px 14px 5px 7px;
	border: 2px solid var(--wcb-line);
	border-radius: 999px;
	background: #fff;
	color: var(--wcb-ink);
	font: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	text-transform: none;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}

.wcb .wcb-pick span:last-child {
	font-size: .95rem;
}

.wcb .wcb-pick .wcb-bib {
	background: color-mix(in srgb, var(--kid) 35%, #fff);
}

.wcb .wcb-pick:hover {
	border-color: var(--kid);
}

.wcb .wcb-pick[aria-pressed="true"] {
	border-color: var(--kid);
	background: color-mix(in srgb, var(--kid) 12%, #fff);
}

.wcb .wcb-pick[aria-pressed="true"] .wcb-bib {
	background: var(--kid);
}

.wcb .wcb-pick:disabled {
	opacity: .4;
	cursor: not-allowed;
	border-color: var(--wcb-line);
}

.wcb .wcb-card__age-note {
	margin: 8px 0 0;
	color: var(--wcb-muted);
	font-size: .82rem;
}

/* ---------- basket ---------- */

.wcb-basket {
	position: sticky;
	top: var(--wcb-sticky);
	background: #fff;
	border: 1px solid var(--wcb-line);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 12px 32px -18px rgba(20, 40, 30, .45);
}

.wcb .wcb-basket__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 16px 18px;
	border: 0;
	border-radius: 0;
	background: var(--wcb-accent);
	color: #fff;
	font: inherit;
	text-align: left;
	text-transform: none;
	cursor: default;
}

.wcb-basket__title {
	font-size: 1.1rem;
	font-weight: 800;
}

.wcb-basket__summary {
	font-size: .88rem;
	opacity: .9;
}

.wcb-basket__body {
	max-height: calc(100vh - var(--wcb-sticky) - 260px);
	min-height: 80px;
	overflow-y: auto;
	padding: 14px 18px 4px;
}

.wcb .wcb-basket__empty {
	color: var(--wcb-muted);
	font-size: .92rem;
	margin: 6px 0 12px;
}

.wcb .wcb-basket__other {
	color: var(--wcb-muted);
	font-size: .82rem;
	margin: 0 0 10px;
}

.wcb-group {
	margin-bottom: 14px;
	padding-left: 12px;
	border-left: 4px solid var(--kid);
}

.wcb .wcb-group__name {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 4px;
	font-weight: 800;
	font-size: .95rem;
}

.wcb .wcb-lines {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcb .wcb-line {
	display: grid;
	grid-template-columns: 1fr auto 32px;
	gap: 8px;
	align-items: start;
	margin: 0;
	padding: 6px 0;
	border-bottom: 1px solid var(--wcb-pale);
	font-size: .9rem;
}

.wcb-line__title small {
	display: block;
	color: var(--wcb-muted);
	font-size: .8rem;
}

.wcb-line__price {
	font-weight: 700;
	white-space: nowrap;
}

.wcb .wcb-line__remove {
	width: 32px;
	height: 32px;
	margin: -4px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wcb-muted);
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
}

.wcb .wcb-line__remove:hover {
	background: var(--wcb-pale);
	color: #b42318;
}

.wcb-basket__notices p {
	margin: 0 18px 8px;
	padding: 8px 10px;
	background: #fef3f2;
	border-radius: 6px;
	color: #b42318;
	font-size: .85rem;
}

.wcb-basket__foot {
	padding: 12px 18px 16px;
	border-top: 1px solid var(--wcb-line);
}

.wcb .wcb-basket__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 0 0 12px;
	font-weight: 700;
}

.wcb .wcb-basket__total strong {
	font-size: 1.5rem;
}

.wcb .wcb-basket__status {
	min-height: 1.2em;
	margin: 8px 0 0;
	color: var(--wcb-muted);
	font-size: .8rem;
	text-align: center;
}

.wcb .wcb-basket__status.is-error {
	color: #b42318;
	font-weight: 700;
}

.wcb-none {
	padding: 24px;
	background: #f1f5f2;
	border-radius: 12px;
}

/* ---------- small screens: basket becomes a drawer pinned to the bottom ---------- */

@media (max-width: 959px) {
	.wcb {
		padding-bottom: 96px;
	}

	.wcb__layout {
		grid-template-columns: 1fr;
	}

	.wcb-children {
		padding: 18px;
	}

	.wcb-basket {
		position: fixed;
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		border-radius: 16px 16px 0 0;
		border-bottom: 0;
		box-shadow: 0 -8px 30px rgba(20, 40, 30, .25);
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	.wcb .wcb-basket__head {
		cursor: pointer;
		align-items: center;
	}

	.wcb-basket__head::after {
		content: "";
		width: 10px;
		height: 10px;
		border-right: 2px solid #fff;
		border-bottom: 2px solid #fff;
		transform: rotate(-135deg) translate(-2px, -2px);
		transition: transform .2s;
	}

	.wcb--basket-open .wcb-basket__head::after {
		transform: rotate(45deg);
	}

	.wcb-basket__summary {
		margin-left: auto;
	}

	.wcb-basket__panel {
		display: none;
	}

	.wcb--basket-open .wcb-basket__panel {
		display: block;
	}

	/* Checkout button stays reachable even with the drawer closed. */
	.wcb--has-bookings:not(.wcb--basket-open) .wcb-basket__panel {
		display: block;
	}

	.wcb--has-bookings:not(.wcb--basket-open) .wcb-basket__body,
	.wcb--has-bookings:not(.wcb--basket-open) .wcb-basket__total {
		display: none;
	}

	.wcb--has-bookings:not(.wcb--basket-open) .wcb-basket__foot {
		border-top: 0;
		padding-top: 10px;
	}

	.wcb-basket__body {
		max-height: 45vh;
	}

	.wcb-basket.is-nudged .wcb-basket__head {
		animation: wcb-nudge .5s ease-out;
	}
}

@keyframes wcb-nudge {
	0% { background: color-mix(in srgb, var(--wcb-accent) 70%, #fff); }
	100% { background: var(--wcb-accent); }
}

@media (prefers-reduced-motion: reduce) {
	.wcb *,
	.wcb *::before,
	.wcb *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* ---------- date picking ---------- */

.wcb .wcb-card__alt {
	margin: -6px 0 12px;
	color: var(--wcb-muted);
	font-size: .88rem;
}

.wcb-dates {
	margin-top: 12px;
	padding: 12px;
	background: color-mix(in srgb, var(--kid) 6%, #fff);
	border: 1.5px solid color-mix(in srgb, var(--kid) 40%, #fff);
	border-radius: 10px;
}

.wcb-dates__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.wcb-dates__who {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-weight: 800;
	font-size: .92rem;
}

.wcb .wcb-dates__all {
	min-height: 32px;
	padding: 2px 12px;
	border: 1.5px solid var(--kid);
	border-radius: 999px;
	background: #fff;
	color: var(--wcb-ink);
	font: inherit;
	font-size: .82rem;
	font-weight: 700;
	text-transform: none;
	cursor: pointer;
}

.wcb .wcb-dates__all:hover {
	background: color-mix(in srgb, var(--kid) 12%, #fff);
}

.wcb-dates__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 6px;
}

.wcb .wcb-date {
	position: relative;
	display: flex;
	margin: 0;
	cursor: pointer;
}

.wcb .wcb-date input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.wcb .wcb-date span {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	min-height: 40px;
	padding: 6px 8px;
	border: 1.5px solid var(--wcb-line);
	border-radius: 8px;
	background: #fff;
	font-size: .86rem;
	font-weight: 600;
	line-height: 1.2;
}

/* The tick box. */
.wcb .wcb-date span::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid #9aa8a1;
	border-radius: 4px;
	background: #fff center / 11px no-repeat;
}

.wcb .wcb-date input:checked + span {
	border-color: var(--kid);
	background: color-mix(in srgb, var(--kid) 10%, #fff);
}

.wcb .wcb-date input:checked + span::before {
	border-color: var(--kid);
	background-color: var(--kid);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.wcb .wcb-date input:focus-visible + span {
	outline: 3px solid color-mix(in srgb, var(--wcb-accent) 55%, #fff);
	outline-offset: 1px;
}

.wcb .wcb-date.is-full {
	cursor: not-allowed;
}

.wcb .wcb-date.is-full span {
	color: var(--wcb-muted);
	text-decoration: line-through;
	opacity: .6;
}

.wcb .wcb-date.is-full em {
	font-style: normal;
	text-decoration: none;
	margin-left: auto;
}

.wcb .wcb-dates__sum {
	margin: 10px 0 0;
	font-size: .88rem;
	color: var(--wcb-muted);
}

.wcb .wcb-dates__sum strong {
	color: var(--wcb-ink);
	font-size: 1rem;
}
