/*
 * Acties (tijdelijke aanbiedingen). Hoort bij includes/acties.php; de acties
 * zelf staan in includes/acties-config.php.
 * Los bestand (geen Vite-build): gewone CSS, geen nesting.
 *
 * Dit bestand: .actie-mbalk (mobiele balk, vast onderaan), .actie-blok (foto +
 * product) en .actie-regel (onder de prijs). De basis, de desktopbalk en de
 * strook staan in acties-kritiek.css; dat bestand zet includes/acties.php in de
 * <head>, omdat die onderdelen boven de vouw staan en WP Rocket stylesheets op
 * een deel van de pagina's pas later laadt.
 *
 * Alles heeft de klasse .actie. De kritieke CSS verbergt .actie tot dit bestand
 * er is; daarom krijgt elk onderdeel hier uitdrukkelijk een display.
 */

/* Knop */

.actie-knop {
	display: inline-block;
	background: var(--actie-groen);
	color: var(--actie-groen-tekst);
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	padding: 15px 30px;
	border-radius: 999px;
	text-align: center;
	text-decoration: none;
	transition: filter 0.2s ease;
}

.actie-knop:hover,
.actie-knop:focus-visible {
	color: var(--actie-groen-tekst);
	filter: brightness(1.08);
}

.actie-knop:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 2px;
}

/* Balken liggen op een lichte pagina: de focusrand valt binnen het donkere vlak. */
.actie-balk:focus-visible,
.actie-mbalk__link:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: -4px;
}

.actie-mbalk__sluit:focus-visible {
	outline: 3px solid var(--actie-nacht);
	outline-offset: -6px;
}

/*
 * In een tekstveld (shortcode [actie]) gelden de linkregels van .rich-text;
 * die mogen de knop en de marges van het blok niet overnemen.
 */
.rich-text .actie a.actie-knop,
.rich-text .actie a.actie-knop:hover {
	color: var(--actie-groen-tekst);
	text-decoration: none;
}

/* .actie.actie-blok: één klasse zwaarder dan .rich-text p:not(:last-child) uit de themabundel, die later laadt. */
.rich-text .actie.actie-blok p,
.rich-text .actie.actie-blok ul,
.rich-text .actie.actie-blok li {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* -------------------------------------------------------------------------
 * Mobiele balk (tot 1024px), vast onderaan het scherm
 * ---------------------------------------------------------------------- */

.actie-mbalk {
	display: block;
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	z-index: 90;
	max-width: 480px;
	margin: 0 auto;
}

body.active-overlay .actie-mbalk {
	display: none;
}

/* Ruimte onder de footer, zodat de balk aan het einde van de pagina niets bedekt. */
@media (max-width: 1023.98px) {
	html:not(.actie-voorbij):not(.actie-balk-dicht) body.actie-actief .footer {
		padding-bottom: 96px;
	}
}

@media (min-width: 1024px) {
	.actie-mbalk {
		display: none;
	}
}

.actie-mbalk__link {
	display: flex;
	align-items: center;
	gap: 4px;
	min-height: 68px;
	padding: 7px 10px 7px 4px;
	border-radius: 18px;
	/* Lichtblauw: valt op boven zowel witte inhoud als de donkerblauwe footer. */
	background: var(--color-tint, #EDF6FF);
	color: var(--actie-nacht);
	text-decoration: none;
	border: 1px solid var(--color-primary-light, #B4DAFF);
	box-shadow: 0 8px 24px rgba(7, 13, 71, 0.28);
}

.actie-mbalk__link:hover {
	color: var(--actie-nacht);
}

.actie-mbalk__link:focus-visible {
	outline-color: var(--actie-nacht);
}

/* Op lichtblauw staat de lamp in een donkerblauw vlakje; de witte panelen vallen anders weg. */
.actie-mbalk .actie-product--mbalk {
	margin: 0 6px 0 6px;
	border-radius: 10px;
	background: var(--actie-nacht);
}

.actie-mbalk__tekst {
	display: flex;
	flex-direction: column;
	gap: 1px;
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.25;
}

.actie-mbalk__tekst strong {
	font-size: 15px;
	font-weight: 800;
}

.actie-mbalk__tekst span {
	font-size: 12px;
	font-weight: 500;
	color: #4a4f78;
}

.actie-mbalk__tekst .actie-mbalk__waarde {
	font-size: 13px;
	font-weight: 800;
	color: var(--actie-nacht);
}

.actie-mbalk__cta {
	flex-shrink: 0;
	background: var(--actie-groen);
	color: var(--actie-groen-tekst);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	padding: 11px 14px;
	border-radius: 999px;
	white-space: nowrap;
}

/* Sluitknop: klein rondje op de hoek, met een raakvlak van 44px. */
.actie-mbalk__sluit {
	position: absolute;
	top: -30px;
	right: -10px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--actie-nacht);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.actie-mbalk__sluit::before {
	content: "";
	position: absolute;
	width: 26px;
	height: 26px;
	border-radius: 999px;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(7, 13, 71, 0.3);
}

.actie-mbalk__sluit svg {
	position: relative;
}

/* Smalle telefoons: alles een maat kleiner, zodat kop en knop naast elkaar blijven passen. */
@media (max-width: 379.98px) {
	.actie-mbalk .actie-product--mbalk { width: 52px; padding: 5px; margin: 0 4px; }
	.actie-mbalk__tekst strong { font-size: 14px; }
	.actie-mbalk__cta { padding: 10px 11px; font-size: 13px; }
}

/* -------------------------------------------------------------------------
 * Blok: foto + product op donkerblauw
 * ---------------------------------------------------------------------- */

.block.actie-sectie,
.block--actie.actie {
	display: block;
}

.block.actie-sectie {
	padding-top: 24px;
	padding-bottom: 0;
}

@media (min-width: 768px) {
	.block.actie-sectie {
		padding-top: 40px;
	}

	/* 'blok_desktop' => false: het automatische blok staat alleen op mobiel. */
	.block.actie-sectie.actie-sectie--mobiel {
		display: none;
	}
}

.actie-blok {
	display: flex;
	flex-direction: column;
	border-radius: 18px;
	overflow: hidden;
	background: var(--actie-nacht);
	color: #ffffff;
}

.actie-blok__foto {
	position: relative;
	height: 200px;
	flex-shrink: 0;
}

.actie-blok__foto > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 55%;
}

.actie-blok__foto::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 90px;
	background: linear-gradient(180deg, rgba(7, 13, 71, 0) 0%, var(--actie-nacht) 100%);
}

/* Het product klein in een rondje, rechtsonder op de foto. */
.actie-blok__rondje {
	position: absolute;
	right: 18px;
	bottom: 6px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.9);
	background: radial-gradient(closest-side, rgba(200, 222, 255, 0.5) 0%, rgba(200, 222, 255, 0) 100%), var(--actie-nacht);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.actie-blok__rondje img {
	display: block;
	width: 68%;
	height: auto;
	max-height: 60%;
	object-fit: contain;
}

.actie-blok__tekst {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	padding: 4px 22px 24px;
}

.actie-blok .actie-blok__label {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--actie-groen);
}

.actie-blok .actie-blok__kop {
	margin: 0;
	font-size: 36px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: #ffffff;
}

.actie-blok .actie-blok__sub {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: #ffffff;
}

.actie-blok__aanbod {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.actie-blok .actie-product--groot {
	width: 280px;
	max-width: 100%;
	padding: 18px 20px;
}

.actie-blok .actie-blok__punten {
	display: flex;
	flex-direction: column;
	gap: 7px;
	align-self: stretch;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
}

.actie-blok .actie-blok__punten li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.actie-blok .actie-blok__punten li::before {
	content: "";
	width: 9px;
	height: 9px;
	flex-shrink: 0;
	border-radius: 999px;
	background: var(--actie-groen);
}

.actie-blok .actie-knop {
	margin-top: 10px;
}

@media (min-width: 768px) {

	.actie-blok {
		flex-direction: row;
		border-radius: 20px;
		min-height: 440px;
	}

	.actie-blok__foto {
		width: 40%;
		height: auto;
	}

	.actie-blok__foto > img {
		position: absolute;
		inset: 0;
		object-position: 50% 50%;
	}

	.actie-blok__foto::after {
		left: auto;
		top: 0;
		width: 45%;
		height: auto;
		background: linear-gradient(90deg, rgba(7, 13, 71, 0) 0%, var(--actie-nacht) 100%);
	}

	/* Naast de tekst: het rondje linksonder, vrij van de overgang naar donkerblauw. */
	.actie-blok__rondje {
		left: 24px;
		right: auto;
		bottom: 24px;
		width: 108px;
		height: 108px;
	}

	.actie-blok__tekst {
		flex: 1 1 auto;
		min-width: 0;
		align-items: flex-start;
		justify-content: center;
		gap: 10px;
		padding: 36px 32px 36px 16px;
	}

	.actie-blok .actie-blok__label {
		font-size: 14px;
	}

	.actie-blok .actie-blok__kop {
		font-size: 44px;
	}

	.actie-blok .actie-blok__sub {
		font-size: 21px;
	}

	.actie-blok__aanbod {
		flex-direction: row;
		align-items: center;
		gap: 16px;
		margin-top: 6px;
	}

	.actie-blok .actie-product--groot {
		width: 220px;
		padding: 18px 16px;
	}

	.actie-blok .actie-blok__punten {
		align-self: center;
		gap: 9px;
		font-size: 17px;
	}

	.actie-blok .actie-knop {
		margin-top: 6px;
		font-size: 19px;
	}

}

/* Actie zonder foto: de tekst vult het blok. */
.actie-blok--zonder-foto .actie-blok__tekst {
	padding-top: 24px;
}

@media (min-width: 768px) {
	.actie-blok--zonder-foto .actie-blok__tekst {
		padding-top: 36px;
		padding-left: 48px;
	}
}

@media (min-width: 1024px) {

	.actie-blok__tekst {
		padding: 36px 48px 36px 20px;
	}

	.actie-blok .actie-blok__kop {
		font-size: 56px;
	}

	.actie-blok .actie-blok__sub {
		font-size: 24px;
	}

	.actie-blok__aanbod {
		gap: 28px;
	}

	.actie-blok .actie-product--groot {
		width: 300px;
		padding: 22px 20px;
	}

	.actie-blok .actie-blok__punten {
		font-size: 18px;
	}

}

/* -------------------------------------------------------------------------
 * Regel: onder de prijs
 * ---------------------------------------------------------------------- */

.actie-regel {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 560px;
	margin: 16px 0 20px;
	padding: 12px 16px 12px 14px;
	border-radius: 12px;
	background: var(--actie-nacht);
	color: #ffffff;
	text-align: left;
}

.actie-regel__vink {
	flex-shrink: 0;
	color: var(--actie-groen);
}

.actie-regel__tekst {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.3;
}

.actie-regel__tekst strong {
	font-size: 17px;
	font-weight: 700;
	color: #ffffff;
}

.actie-regel__tekst > span {
	font-size: 14px;
	font-weight: 600;
	color: var(--actie-zacht);
}

@media print {
	.actie-balk,
	.actie-mbalk {
		display: none !important;
	}
}
