/**
 * Hoeveelheidsvelden en meelopende koopbalk op de productpagina.
 *
 * Zowel het originele WooCommerce-aantalveld als het aantalveld in
 * de koopbalk gebruiken dezelfde min- en plusbediening.
 */

/* ============================================================
   MEELOPENDE KOOPBALK
   ============================================================ */

.lastore-koopbalk {
	--koopbalk-knop: #1b1b1b;
	--koopbalk-knop-tekst: #ffffff;

	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 998;

	background: #ffffff;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.08);

	visibility: hidden;
	transform: translateY(100%);
	transition: transform 0.25s ease, visibility 0.25s;
}

.lastore-koopbalk--open {
	visibility: visible;
	transform: none;
}

.lastore-koopbalk__binnen {
	display: flex;
	align-items: center;
	gap: 14px;

	max-width: calc(1300px + 32px);
	margin: 0 auto;
	padding: 10px 16px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom));
}


/* ============================================================
   FOTO
   ============================================================ */

.lastore-koopbalk__foto {
	flex: 0 0 auto;

	width: 56px;
	height: 56px;

	object-fit: contain;
	border-radius: 6px;
}


/* ============================================================
   PRODUCTTITEL + PRIJS
   ============================================================ */

.lastore-koopbalk__tekst {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;

	min-width: 0;
	gap: 2px;

	line-height: 1.25;
}

.lastore-koopbalk__titel {
	overflow: hidden;

	color: #1b1b1b;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 600;

	white-space: nowrap;
	text-overflow: ellipsis;
}

.lastore-koopbalk__prijs {
	color: #1b1b1b;
	font-size: 15px;
}

.lastore-koopbalk__prijs del {
	margin-right: 6px;

	opacity: 0.6;
	font-size: 15px;
}

.lastore-koopbalk__prijs .woocommerce-Price-amount {
	font-weight: 600;
}


/* ============================================================
   ORIGINELE HOEVEELHEID NAAST DE PRODUCTKNOP
   ============================================================ */

body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity {
	display: flex;
	flex: 0 0 96px;
	align-items: center;

	width: 96px;
	min-width: 96px;
	max-width: 96px;
	height: 42px;

	box-sizing: border-box;
	margin: 0;
	padding: 0;

	overflow: hidden;

	background: #ffffff;
	border: 1px solid #d5d5d5;
	border-radius: 5px;
}


/* ============================================================
   HOEVEELHEID IN DE MEELOPENDE KOOPBALK
   ============================================================ */

.lastore-koopbalk__hoeveelheid {
	display: flex;
	flex: 0 0 96px;
	align-items: stretch;

	width: 96px;
	min-width: 96px;
	max-width: 96px;
	height: 42px;

	box-sizing: border-box;
	margin: 0;
	padding: 0;

	overflow: hidden;

	background: #ffffff;
	border: 1px solid #d5d5d5;
	border-radius: 5px;
}


/* ============================================================
   MIN- EN PLUSKNOP ORIGINELE PRODUCTKNOP
   ============================================================ */

body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity
.lastore-aantal-min {
	order: 1;
}

body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity
.lastore-aantal-plus {
	order: 3;
}

body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity
.lastore-aantal-knop {
	display: flex;
	flex: 0 0 28px;
	align-items: center;
	justify-content: center;

	width: 28px;
	min-width: 28px;
	max-width: 28px;
	height: 40px;
	min-height: 40px;

	box-sizing: border-box;
	margin: 0;
	padding: 0;

	background: #ffffff;
	border: 0;
	border-radius: 0;
	box-shadow: none;

	color: #1b1b1b;
	font-family: inherit;
	font-size: 19px;
	font-weight: 400;
	line-height: 1;

	cursor: pointer;

	-webkit-appearance: none;
	appearance: none;
}

body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity
.lastore-aantal-knop:hover,
body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity
.lastore-aantal-knop:focus {
	background: #f5f5f5;
	color: #1b1b1b;
}


/* ============================================================
   GETAL ORIGINELE PRODUCTKNOP
   ============================================================ */

body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity
input.qty {
	order: 2;

	display: block;
	flex: 0 0 40px;

	width: 40px;
	min-width: 40px;
	max-width: 40px;
	height: 40px;

	box-sizing: border-box;
	margin: 0;
	padding: 0;

	background: #ffffff;
	border: 0;
	border-radius: 0;
	box-shadow: none;

	color: #1b1b1b;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 40px;
	text-align: center;

	-moz-appearance: textfield;
	appearance: textfield;
}


/* ============================================================
   MIN- EN PLUSKNOP IN DE KOOPBALK
   ============================================================ */

.lastore-koopbalk__hoeveelheid .lastore-aantal-knop {
	display: flex;
	flex: 0 0 28px;
	align-items: center;
	justify-content: center;

	width: 28px;
	min-width: 28px;
	max-width: 28px;
	height: 40px;
	min-height: 40px;

	box-sizing: border-box;
	margin: 0;
	padding: 0;

	background: #ffffff;
	border: 0;
	border-radius: 0;
	box-shadow: none;

	color: #1b1b1b;
	font-family: inherit;
	font-size: 19px;
	font-weight: 400;
	line-height: 1;

	cursor: pointer;

	-webkit-appearance: none;
	appearance: none;
}

.lastore-koopbalk__hoeveelheid .lastore-aantal-knop:hover,
.lastore-koopbalk__hoeveelheid .lastore-aantal-knop:focus {
	background: #f5f5f5;
	color: #1b1b1b;
}


/* ============================================================
   GETAL IN DE KOOPBALK
   ============================================================ */

.lastore-koopbalk__hoeveelheid input.lastore-koopbalk__aantal {
	display: block;
	flex: 0 0 40px;

	width: 40px;
	min-width: 40px;
	max-width: 40px;
	height: 40px;

	box-sizing: border-box;
	margin: 0;
	padding: 0;

	background: #ffffff;
	border: 0;
	border-radius: 0;
	box-shadow: none;

	color: #1b1b1b;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 40px;
	text-align: center;

	-moz-appearance: textfield;
	appearance: textfield;
}


/* ============================================================
   STANDAARD BROWSERPIJLTJES VERWIJDEREN
   ============================================================ */

body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity
input.qty::-webkit-inner-spin-button,
body.single-product
.elementor-widget-woocommerce-product-add-to-cart
form.cart
.quantity
input.qty::-webkit-outer-spin-button,
.lastore-koopbalk__hoeveelheid
input.lastore-koopbalk__aantal::-webkit-inner-spin-button,
.lastore-koopbalk__hoeveelheid
input.lastore-koopbalk__aantal::-webkit-outer-spin-button {
	margin: 0;

	-webkit-appearance: none;
}


/* ============================================================
   KNOP IN DE MEELOPENDE KOOPBALK
   ============================================================ */

.lastore-koopbalk__knop {
	flex: 0 0 auto;

	padding: 12px 32px;

	background: var(--koopbalk-knop);
	border: 0;
	border-radius: 5px;

	color: var(--koopbalk-knop-tekst);
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;

	cursor: pointer;
	transition: opacity 0.2s;

	appearance: none;
}

.lastore-koopbalk__knop:hover,
.lastore-koopbalk__knop:focus-visible {
	opacity: 0.85;
}


/* ============================================================
   MOBIEL
   ============================================================ */

@media (max-width: 600px) {

	.lastore-koopbalk__binnen {
		display: grid;

		grid-template-columns: 48px 38px minmax(0, 1fr);
		grid-template-areas:
			"foto tekst tekst"
			"aantal aantal knop";

		gap: 8px 10px;

		padding: 10px 12px;
		padding-bottom: calc(10px + env(safe-area-inset-bottom));
	}

	.lastore-koopbalk__foto {
		grid-area: foto;

		width: 48px;
		height: 48px;
	}

	.lastore-koopbalk__tekst {
		grid-area: tekst;

		min-width: 0;
		justify-content: center;
	}

	.lastore-koopbalk__titel {
		font-size: 14px;
	}

	.lastore-koopbalk__hoeveelheid {
		grid-area: aantal;

		width: 96px;
		min-width: 96px;
		max-width: 96px;
		height: 44px;
	}

	.lastore-koopbalk__hoeveelheid .lastore-aantal-knop {
		height: 42px;
		min-height: 42px;
	}

	.lastore-koopbalk__hoeveelheid input.lastore-koopbalk__aantal {
		height: 42px;
		line-height: 42px;
	}

	.lastore-koopbalk__knop {
		grid-area: knop;

		width: 100%;
		min-height: 44px;
		padding: 11px 18px;
	}
}


/* ============================================================
   MINDER ANIMATIES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

	.lastore-koopbalk {
		transition: none;
	}
}