/*
 * Vaste toevoegbalk onderin op telefoon en tablet. Kleuren en letters van de site
 * (groen #02922b, Poppins); de knop zoals Toevoegen op de productkaarten.
 */
.hrw-tb {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	/* Rechts wat meer ruimte: de hoeken van een telefoonscherm zijn afgerond. */
	padding: 12px calc(24px + env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
	background: #fff;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
	transform: translateY(100%);
	transition: transform 0.2s ease-out;
}

.hrw-tb[hidden] {
	display: none;
}

.hrw-tb.is-zichtbaar {
	transform: translateY(0);
}

.hrw-tb__binnen {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 64rem;
	margin: 0 auto;
}

.hrw-tb__foto {
	flex: none;
	width: 64px;
	height: 64px;
	object-fit: contain;
	border-radius: 4px;
	background: radial-gradient(circle, #fff 0%, #e3e3e3 100%);
}

.hrw-tb__tekst {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

/* De titel op één regel; te lang = afgebroken met …. */
.hrw-tb__naam {
	display: block;
	overflow: hidden;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.hrw-tb__prijs {
	display: block;
	margin-top: 2px;
	overflow: hidden;
	color: #000;
	font-size: 0.875rem;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Het thema zet de prijs incl. btw in .text-sm, achter die excl. btw. Naast de knop past
   één bedrag: alleen excl. btw (Wouter, 28 oktober 2026). */
.hrw-tb__prijs .text-sm {
	display: none;
}

/*
 * De knop is die van de productkaarten van het thema: zelfde klassen, dus zelfde maat,
 * kleur en animatie (zie Toevoegbalk::THEMA_KNOP, of de klassen van het thema via hrw_maatwerk_productkaart). Hier alleen wat een <button> anders
 * heeft dan de <a> op de kaart.
 */
.hrw-tb__knop {
	flex: none;
	border: 0;
	font: inherit;
	cursor: pointer;
}

.hrw-tb__knop:focus-visible {
	outline: 2px solid var(--color-primary, #02922b);
	outline-offset: 2px;
}

/*
 * Het knopje "koekies" van Complianz (toestemming wijzigen) staat vast rechtsonder, in een
 * hogere laag (9998), en viel over de knop Toevoegen. Zolang de balk in beeld is, even weg;
 * daarna komt het terug. De grote cookiemelding zelf (99999) blijft altijd voorgaan.
 */
html.hrw-tb-aan #cmplz-manage-consent {
	display: none;
}

/* Ruimte onderaan, zodat de balk niets van de pagina afdekt. */
html.hrw-tb-aan body {
	padding-bottom: 96px;
}

/* Vanaf 1024px nooit (het script toont hem daar ook niet). */
@media (min-width: 64rem) {
	.hrw-tb {
		display: none !important;
	}

	html.hrw-tb-aan body {
		padding-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hrw-tb {
		transition: none;
	}
}

/*
 * Melding na toevoegen (telefoon en tablet), naar het voorbeeld van Omoda: een paneel
 * dat onderin omhoog schuift, boven een donkere achtergrond.
 */
.hrw-tm {
	position: fixed;
	inset: 0;
	z-index: 99990;
}

.hrw-tm[hidden] {
	display: none;
}

.hrw-tm__achter {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity 0.2s ease-out;
}

.hrw-tm__paneel {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 28px calc(24px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(24px + env(safe-area-inset-left, 0px));
	border-radius: 20px 20px 0 0;
	background: #fff;
	text-align: center;
	transform: translateY(100%);
	transition: transform 0.25s ease-out;
}

.hrw-tm__paneel:focus {
	outline: none;
}

.hrw-tm.is-open .hrw-tm__achter {
	opacity: 1;
}

.hrw-tm.is-open .hrw-tm__paneel {
	transform: translateY(0);
}

.hrw-tm__sluit {
	position: absolute;
	top: 12px;
	right: calc(12px + env(safe-area-inset-right, 0px));
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: #000;
	cursor: pointer;
}

.hrw-tm__kop {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0 0 8px;
	font-family: var(--wp--preset--font-family--battambang, Battambang, serif);
	font-size: 1.75rem;
	line-height: 1.2;
}

.hrw-tm__vink {
	flex: none;
}

.hrw-tm__tekst {
	margin: 0 0 20px;
	font-size: 0.9375rem;
}

.hrw-tm__naar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	border-radius: 999px;
	background: var(--color-primary, #02922b);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
}

.hrw-tm__naar:hover,
.hrw-tm__naar:focus-visible {
	background: #000;
	color: #fff;
}

.hrw-tm__verder {
	margin: 12px auto 0;
	padding: 10px 16px;
	border: 0;
	background: none;
	color: #000;
	font: inherit;
	font-size: 0.9375rem;
	text-decoration: underline;
	cursor: pointer;
}

.hrw-tm__naar:focus-visible,
.hrw-tm__verder:focus-visible,
.hrw-tm__sluit:focus-visible {
	outline: 2px solid var(--color-primary, #02922b);
	outline-offset: 2px;
}

html.hrw-tm-open {
	overflow: hidden;
}

/* Desktop: het nieuwe product licht even op in de mini-winkelwagen. */
@keyframes hrw-tb-oplichten {
	0%,
	40% {
		background-color: #d9efdf;
	}

	100% {
		background-color: transparent;
	}
}

.hrw-tb-nieuw > * {
	animation: hrw-tb-oplichten 1.8s ease-out;
}

@media (prefers-reduced-motion: reduce) {
	.hrw-tm__achter,
	.hrw-tm__paneel {
		transition: none;
	}

	.hrw-tb-nieuw > * {
		animation: none;
	}
}
