/**
 * Atelier Stralend – cadeaubon: productpagina (velden en voorbeeld) en de
 * gebruikte cadeaubon in winkelmand en afrekenen.
 */

/* ---------------------------------------------------------------------------
 * Velden
 * ------------------------------------------------------------------------ */

.as-cb__eigen {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 8px 12px;
	max-width: 280px;
	margin-top: 4px;
}

.as-cb__eigen .aso-hulp {
	grid-column: 1 / -1;
}

.as-cb__euro {
	font-size: 22px;
	font-weight: 800;
}

.as-cb__eigen input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
	font-weight: 700;
	font-size: 18px;
}

.as-cb__eigen input::-webkit-outer-spin-button,
.as-cb__eigen input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.as-cb__aan {
	gap: 12px;
}

.as-cb__ontvanger {
	gap: 18px;
	padding: 18px;
	border-radius: 20px;
	background: var(--as-lila, #f7f3ff);
}

.as-cb__ontvanger > .aso-rij__veld {
	flex: none;
}

.as-cb__ontvanger label,
.as-cb__wanneer > legend {
	font-size: 15px;
}

.as-cb__wanneer {
	gap: 10px;
}

.as-cb__datum {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 280px;
	margin-top: 4px;
}

/* ---------------------------------------------------------------------------
 * Voorbeeld van de bon (links)
 * ------------------------------------------------------------------------ */

.as-cb-voorbeeld {
	--as-cb-inkt: var(--wp--preset--color--inkt, #2a1633);
	--as-cb-papaver: var(--wp--preset--color--papaver, #d4381e);
	--as-cb-zon: var(--wp--preset--color--zon, #ffc23a);
	--as-cb-roze: var(--wp--preset--color--roze, #ffe3ec);
	--as-cb-zacht: var(--wp--preset--color--tekst-zacht, #4a3a4f);
	--as-cb-gedempt: var(--wp--preset--color--tekst-gedempt, #5e4d63);
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 22px;
	margin: 0;
	color: var(--as-cb-inkt);
}

.as-cb-voorbeeld__vlak {
	position: relative;
	display: grid;
	place-items: center;
	min-height: clamp(380px, 44vw, 580px);
	padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 56px);
	overflow: hidden;
	border-radius: 32px;
	background: var(--as-cb-roze);
}

/* Een zon die achter de bon opkomt */
.as-cb-voorbeeld__vlak::before,
.as-cb-voorbeeld__vlak::after {
	position: absolute;
	top: -70px;
	right: -70px;
	border-radius: 50%;
	content: "";
	pointer-events: none;
}

.as-cb-voorbeeld__vlak::before {
	width: 220px;
	height: 220px;
	background: var(--as-cb-zon);
}

.as-cb-voorbeeld__vlak::after {
	top: -110px;
	right: -110px;
	width: 300px;
	height: 300px;
	border: 3px dashed var(--as-cb-papaver);
	opacity: 0.45;
}

.as-cb-kaart {
	position: relative;
	z-index: 1;
	width: min(100%, 470px);
	filter: drop-shadow(0 22px 34px rgba(42, 22, 51, 0.16));
	transform: rotate(-3deg);
	transition: transform 0.3s ease;
}

.as-cb-voorbeeld__vlak:hover .as-cb-kaart {
	transform: rotate(-1.5deg) translateY(-2px);
}

.as-cb-kaart__binnen {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 28px clamp(24px, 4vw, 40px) 24px;
	border-radius: 24px;
	background: #fff;
	text-align: center;
	/* Twee halve rondjes aan de zijkant, zoals bij een kaartje */
	-webkit-mask: radial-gradient(circle 15px at 0 58%, transparent 97%, #000 100%) left / 51% 100% no-repeat, radial-gradient(circle 15px at 100% 58%, transparent 97%, #000 100%) right / 51% 100% no-repeat;
	mask: radial-gradient(circle 15px at 0 58%, transparent 97%, #000 100%) left / 51% 100% no-repeat, radial-gradient(circle 15px at 100% 58%, transparent 97%, #000 100%) right / 51% 100% no-repeat;
}

.as-cb-kaart__binnen::before {
	position: absolute;
	inset: 10px;
	border: 2px dashed #f2a7bd;
	border-radius: 17px;
	content: "";
	pointer-events: none;
}

.as-cb-kaart__kop {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	align-self: stretch;
	margin-bottom: 14px;
}

.as-cb-kaart__logo {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-align: left;
}

.as-cb-kaart__logo svg {
	flex: none;
	width: 32px;
	height: 32px;
}

.as-cb-kaart__logo > span {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

.as-cb-kaart__atelier {
	margin-bottom: -2px;
	font-family: var(--wp--preset--font-family--hand, cursive);
	font-size: 15px;
	font-weight: 700;
}

.as-cb-kaart__naam {
	font-family: var(--wp--preset--font-family--kop, inherit);
	font-size: 19px;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.as-cb-kaart__label {
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--as-cb-roze);
	color: var(--as-cb-papaver);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.as-cb-voorbeeld p {
	margin: 0;
}

.as-cb-kaart__bedrag {
	font-family: var(--wp--preset--font-family--kop, inherit);
	font-size: clamp(64px, 8.5vw, 104px);
	font-weight: 800;
	line-height: 0.95;
	letter-spacing: -0.045em;
	white-space: nowrap;
}

.as-cb-kaart__voor {
	max-width: 100%;
	color: var(--as-cb-papaver);
	font-family: var(--wp--preset--font-family--hand, cursive);
	font-size: clamp(28px, 3.2vw, 38px);
	font-weight: 700;
	line-height: 1.05;
	overflow-wrap: anywhere;
}

.as-cb-voorbeeld .as-cb-kaart__boodschap {
	max-width: 32ch;
	margin-top: 8px;
	color: var(--as-cb-zacht);
	font-size: 16px;
	font-style: italic;
	line-height: 1.5;
	overflow-wrap: anywhere;
	white-space: pre-line;
}

.as-cb-kaart__boodschap::before {
	content: "“";
}

.as-cb-kaart__boodschap::after {
	content: "”";
}

.as-cb-kaart__van {
	color: var(--as-cb-gedempt);
	font-size: 14px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.as-cb-kaart__voet {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	align-self: stretch;
	margin-top: 20px;
	padding-top: 14px;
	border-top: 2px dashed var(--wp--preset--color--rand, #f0dde7);
	color: var(--as-cb-gedempt);
	font-size: 13px;
}

.as-cb-kaart__code {
	color: var(--as-cb-inkt);
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	font-weight: 700;
	letter-spacing: 0.06em;
}

.as-cb-voorbeeld__punten {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
	gap: 10px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--as-cb-zacht);
	font-size: 15px;
	line-height: 1.45;
}

.as-cb-voorbeeld__punten li {
	position: relative;
	padding-left: 28px;
}

.as-cb-voorbeeld__punten li::before {
	position: absolute;
	top: 2px;
	left: 0;
	width: 18px;
	height: 18px;
	background: var(--as-cb-papaver);
	content: "";
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 781px) {
	.as-cb-voorbeeld {
		position: static;
	}

	.as-cb-voorbeeld__vlak {
		min-height: 0;
		padding: 40px 18px;
		border-radius: 26px;
	}

	.as-cb-kaart {
		transform: rotate(-2deg);
	}

	.as-cb-voorbeeld__vlak::before {
		width: 160px;
		height: 160px;
	}

	.as-cb-voorbeeld__vlak::after {
		top: -90px;
		right: -90px;
		width: 220px;
		height: 220px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.as-cb-kaart {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
 * Winkelmand en afrekenen: de gebruikte cadeaubon
 * ------------------------------------------------------------------------ */

.as-cb-bonnen {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 12px 0 4px;
	padding: 14px 16px;
	border-radius: 16px;
	background: var(--wp--preset--color--geel, #fff0c2);
	color: var(--wp--preset--color--inkt, #2a1633);
	font-size: 14px;
	line-height: 1.45;
}

.as-cb-bonnen__lijst {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.as-cb-bonnen__bon {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
}

.as-cb-bonnen__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.as-cb-bonnen__info strong {
	letter-spacing: 0.02em;
	overflow-wrap: anywhere;
}

.as-cb-bonnen__weg,
.as-cb-bonnen__open {
	flex: none;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.as-cb-bonnen__open {
	align-self: flex-start;
}

.as-cb-bonnen__weg:disabled {
	opacity: 0.5;
	cursor: default;
}

.as-cb-bonnen__melding,
.as-cb-bonnen__fout {
	margin: 0;
}

.as-cb-bonnen__fout {
	color: #8a2412;
	font-weight: 600;
}

.as-cb-bonnen__form {
	display: flex;
	gap: 8px;
}

.as-cb-bonnen__form input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 12px;
	border: 2px solid #e8dce6;
	border-radius: 12px;
	background: #fff;
	font: inherit;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.as-cb-bonnen__form button {
	flex: none;
	height: 44px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--inkt, #2a1633);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
