/**
 * Gift card form styles (extends booking form look).
 */

.wwb-giftcard {
	--wwb-border: color-mix(in srgb, currentColor 18%, transparent);
	--wwb-error: #b42318;
	--wwb-error-bg: #fef3f2;
	--wwb-ok: #027a48;
	--wwb-ok-bg: #ecfdf3;
	--wwb-radius: 0.4rem;
	--wwb-gap: 1rem;
	--wwb-gc-pill-bg: #fff;
	--wwb-gc-pill-fg: #0f172a;
	--wwb-gc-pill-active-bg: #0f172a;
	--wwb-gc-pill-active-fg: #fff;
	max-width: 42rem;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

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

.wwb-gc-step {
	margin-bottom: 1.5rem;
}

.wwb-gc-step__title {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
}

/* The display rules below would otherwise override the hidden attribute. */
.wwb-giftcard [hidden] {
	display: none !important;
}

/* Keep the title clear of a sticky site header when a step scrolls into view. */
.wwb-gc-step__title {
	scroll-margin-top: 9rem;
}

.wwb-gc-step__title:focus {
	outline: none;
}

/* Amount pills: white, the chosen one dark. */
.wwb-gc-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.wwb-gc-preset {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 1.4rem;
	border: 1px solid var(--wwb-border, #cfcfcf);
	border-radius: 999px;
	background: var(--wwb-gc-pill-bg);
	color: var(--wwb-gc-pill-fg);
	cursor: pointer;
	font-weight: 600;
	font-size: 1.1em;
	line-height: 1.2;
	min-height: 3rem;
	transition: background-color 0.15s ease, color 0.15s ease;
}

/* Radio stays in the tab order, only out of sight. */
.wwb-gc-preset input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.wwb-gc-preset:has(input:checked) {
	border-color: var(--wwb-gc-pill-active-bg);
	background: var(--wwb-gc-pill-active-bg);
	color: var(--wwb-gc-pill-active-fg);
}

.wwb-gc-preset:has(input:focus-visible) {
	outline: 2px solid var(--wwb-gc-pill-active-bg);
	outline-offset: 2px;
}

.wwb-gc-custom {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-weight: 600;
	margin-top: 0.75rem;
	max-width: 14rem;
}

.wwb-giftcard .wwb-gc-custom input {
	width: 100%;
	min-height: 3rem;
	padding: 0.6rem 1rem;
	border: 1px solid var(--wwb-border, #cfcfcf);
	border-radius: 999px;
	background: var(--wwb-gc-pill-bg);
	color: var(--wwb-gc-pill-fg);
	font: inherit;
}

/* The amount field only shows with "Eigen bedrag" chosen. */
@supports selector(:has(*)) {
	.wwb-gc-amount-field:not(:has(input[value="custom"]:checked)) .wwb-gc-custom {
		display: none;
	}
}

/* Quantity: label with a − 1 + stepper next to it. */
.wwb-giftcard .wwb-gc-qty-field {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin-top: 0.5rem;
}

.wwb-giftcard .wwb-gc-qty-field .wwb-field__error {
	flex-basis: 100%;
	margin: 0;
}

.wwb-gc-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--wwb-border, #cfcfcf);
	border-radius: 999px;
	background: var(--wwb-gc-pill-bg);
	color: var(--wwb-gc-pill-fg);
	padding: 0 0.35rem;
}

.wwb-giftcard .wwb-gc-qty input {
	width: 3.5rem;
	min-height: 3rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: center;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.wwb-gc-qty input::-webkit-outer-spin-button,
.wwb-gc-qty input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wwb-giftcard .wwb-gc-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}

.wwb-giftcard .wwb-gc-qty__btn:hover:not(:disabled),
.wwb-giftcard .wwb-gc-qty__btn:focus-visible {
	background: color-mix(in srgb, currentColor 10%, transparent);
	color: inherit;
}

.wwb-giftcard .wwb-gc-qty__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

/* Total on the left, "Volgende" on the right. */
.wwb-gc-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.25rem;
}

.wwb-gc-total {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.5rem;
	margin: 0;
	font-size: 1.6em;
	line-height: 1.2;
}

.wwb-gc-total__amount {
	font-weight: 700;
}

.wwb-gc-total__vat {
	font-size: 0.5em;
	opacity: 0.7;
	white-space: nowrap;
}

.wwb-giftcard .wwb-gc-next {
	width: auto;
	padding-left: 2.5rem;
	padding-right: 2.5rem;
}

.wwb-giftcard .wwb-gc-actions {
	flex-direction: row;
	align-items: center;
	gap: 1rem;
}

.wwb-giftcard .wwb-gc-actions .wwb-submit {
	flex: 1 1 auto;
	width: auto;
}

.wwb-giftcard .wwb-gc-back {
	min-height: 3rem;
	padding: 0 0.5rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none;
}

.wwb-giftcard .wwb-gc-back:hover,
.wwb-giftcard .wwb-gc-back:focus-visible {
	background: transparent;
	color: inherit;
	text-decoration: none;
}

.wwb-gc-status__table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.wwb-gc-status__table th,
.wwb-gc-status__table td {
	text-align: left;
	padding: 0.45rem 0.35rem;
	border-bottom: 1px solid var(--wwb-border, #eee);
	vertical-align: top;
}

.wwb-gc-status__table th {
	width: 35%;
	font-weight: 600;
}

.wwb-giftcard .wwb-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wwb-gap);
}

.wwb-giftcard .wwb-field--full,
.wwb-giftcard .wwb-gc-step,
.wwb-giftcard .wwb-actions {
	grid-column: 1 / -1;
}

.wwb-giftcard .wwb-gc-step {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wwb-gap);
}

.wwb-giftcard .wwb-gc-step__title,
.wwb-giftcard .wwb-field--full,
.wwb-giftcard .wwb-gc-summary {
	grid-column: 1 / -1;
}

@media (max-width: 640px) {
	.wwb-giftcard .wwb-form,
	.wwb-giftcard .wwb-gc-step {
		grid-template-columns: 1fr;
	}

	.wwb-giftcard .wwb-gc-next {
		width: 100%;
	}

	.wwb-giftcard .wwb-gc-actions {
		flex-direction: column-reverse;
		align-items: stretch;
	}
}
