/* Eatmeister Ordering – productpopup
 * Kleuren overschrijfbaar via :root { --emo-accent: ...; --emo-accent-hover: ...; }
 */
html.emo-popup-open { overflow: hidden; }

.emo-popup[hidden] { display: none; }
.emo-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: inherit;
}
.emo-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .25s;
}
.emo-popup__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
	padding: 28px;
	outline: none;
	opacity: 0;
	transform: translateY(16px) scale(.98);
	transition: opacity .25s, transform .25s;
}
.emo-popup.is-open .emo-popup__overlay { opacity: 1; }
.emo-popup.is-open .emo-popup__dialog { opacity: 1; transform: none; }

/* Mobiel: sheet vanaf de onderkant */
@media (max-width: 767px) {
	.emo-popup { align-items: flex-end; padding: 0; }
	.emo-popup__dialog {
		max-width: none;
		max-height: 90vh;
		border-radius: 20px 20px 0 0;
		padding: 24px 18px calc(18px + env(safe-area-inset-bottom));
		transform: translateY(100%);
	}
}
@media (prefers-reduced-motion: reduce) {
	.emo-popup__overlay, .emo-popup__dialog { transition: none; }
}

.emo-popup__close {
	position: sticky;
	top: 0;
	float: right;
	margin: -12px -12px 0 8px;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: #f2f2f2;
	color: #333;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	padding: 0;
}
.emo-popup__close:hover { background: #e6e6e6; }

/* Laden */
.emo-popup__loading { display: flex; justify-content: center; padding: 48px 0; }
.emo-popup__loading span {
	width: 32px; height: 32px; border-radius: 50%;
	border: 3px solid #e5e5e5; border-top-color: var(--emo-accent, #208418);
	animation: emo-spin .7s linear infinite;
}
@keyframes emo-spin { to { transform: rotate(360deg); } }

/* Inhoud */
.emo-popup__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-right: 36px; }
.emo-popup__title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; color: #1c1c1c; }
.emo-popup__price { display: inline-block; transform-origin: right center; font-size: 18px; font-weight: 700; color: var(--emo-accent, #208418); white-space: nowrap; }
.emo-popup__price del { color: #9a9a9a; font-weight: 400; font-size: .85em; margin-right: 6px; }
.emo-popup__price ins { text-decoration: none; }
.emo-popup__desc { margin-top: 8px; color: #6b6b6b; font-size: 15px; line-height: 1.5; }
.emo-popup__desc p { margin: 0 0 6px; }

.emo-popup__options { margin-top: 18px; }
.emo-popup__options form.cart { margin: 0; display: block; }
.emo-popup__options .stock { font-size: 14px; }

/* Product Add-Ons velden */
.emo-popup .wc-pao-addon-container,
.emo-popup .wc-pao-addon { border-top: 1px solid #eee; padding: 14px 0; margin: 0; }
.emo-popup .wc-pao-addon-name { display: block; font-weight: 700; font-size: 16px; margin-bottom: 8px; color: #1c1c1c; }
.emo-popup .wc-pao-addon-description { font-size: 14px; color: #6b6b6b; margin: -4px 0 8px; }
.emo-popup .wc-pao-addon-wrap p { margin: 0; }

/* Aanvinkvakjes / keuzerondjes: Product Add-Ons zet <input> en <label> naast elkaar in een div */
.emo-popup .wc-pao-addon-wrap > div:has(> input[type="checkbox"]),
.emo-popup .wc-pao-addon-wrap > div:has(> input[type="radio"]),
.emo-popup .wc-pao-addon-wrap > p:has(> input[type="checkbox"]),
.emo-popup .wc-pao-addon-wrap > p:has(> input[type="radio"]) {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 4px 0;
}
.emo-popup .wc-pao-addon-wrap > div > input[type="checkbox"],
.emo-popup .wc-pao-addon-wrap > div > input[type="radio"],
.emo-popup .wc-pao-addon-wrap > p > input[type="checkbox"],
.emo-popup .wc-pao-addon-wrap > p > input[type="radio"] { margin: 0; cursor: pointer; }
.emo-popup .wc-pao-addon-wrap > div > input + label,
.emo-popup .wc-pao-addon-wrap > p > input + label {
	flex: 1;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 8px 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	color: #1c1c1c;
	cursor: pointer;
}
.emo-popup .wc-pao-addon-price {
	flex: 0 0 auto;
	color: #6b6b6b;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}
/* Gekozen optie licht op */
.emo-popup .wc-pao-addon-wrap > div > input:checked + label { font-weight: 600; }
.emo-popup .wc-pao-addon-wrap > div > input:checked + label .wc-pao-addon-price { color: var(--emo-accent, #208418); }

/* Oudere opmaak waarbij het vakje ín het label staat */
.emo-popup .wc-pao-addon-wrap label:has(> input[type="checkbox"]),
.emo-popup .wc-pao-addon-wrap label:has(> input[type="radio"]) {
	display: flex; align-items: center; gap: 12px; padding: 8px 0; margin: 0; font-size: 15px; cursor: pointer;
}
.emo-popup input[type="checkbox"],
.emo-popup input[type="radio"] { width: 20px; height: 20px; accent-color: var(--emo-accent, #208418); flex: 0 0 auto; }
.emo-popup select,
.emo-popup textarea,
.emo-popup input[type="text"],
.emo-popup input[type="number"] {
	width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px; font-size: 15px; background: #fff;
}
.emo-popup .required { color: #c62828; }

/* Subtotaal staat bovenin als prijs (popup.js); het blok van Product Add-Ons zelf verbergen */
.emo-popup #product-addons-total { display: none !important; }

.emo-popup__price.is-bump { animation: emo-bump .3s ease; }
@keyframes emo-bump { 40% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .emo-popup__price.is-bump { animation: none; } }

/* (oude stijl, blijft voor als je het blok weer zichtbaar wilt maken) */
.emo-popup #product-addons-total { border-top: 1px solid #eee; padding-top: 12px; margin-top: 4px; }
.emo-popup .product-addon-totals { margin: 0; border: 0; padding: 0; }
.emo-popup .product-addon-totals ul { list-style: none; margin: 0; padding: 0; }
.emo-popup .product-addon-totals li:not(.wc-pao-subtotal-line) { display: none !important; }
.emo-popup .product-addon-totals .wc-pao-subtotal-line { border: 0; padding: 0; margin: 0; }
.emo-popup .product-addon-totals .wc-pao-subtotal-line .price {
	display: flex; justify-content: space-between; align-items: baseline; margin: 0;
	font-size: 18px; font-weight: 700; color: #1c1c1c;
}
.emo-popup .product-addon-totals .wc-pao-subtotal-line .amount { color: var(--emo-accent, #208418); }

/* Verouderde algemene melding van Product Add-Ons: niet gebruiken, fouten staan per optie */
.emo-popup #required_addons_validation_message { display: none !important; }

/* Foutmelding per optie (Product Add-Ons 7+) */
.emo-popup .wc-pao-validation-notice {
	display: flex; align-items: center; gap: 6px;
	margin: 6px 0 0; padding: 0;
	color: #c62828; font-size: 13px; font-weight: 600; line-height: 1.3;
	position: static; background: none; border: 0; box-shadow: none;
}
.emo-popup .wc-pao-validation-notice::before {
	content: "!"; display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%;
	background: #c62828; color: #fff; font-size: 11px; font-weight: 700;
}
.emo-popup .wc-pao-addon-container:has(.wc-pao-validation-notice) .wc-pao-addon-name { color: #c62828; }
.emo-popup [aria-invalid="true"]:is(select, input[type="text"], input[type="number"], textarea) { border-color: #c62828; }
.emo-popup fieldset.wc-pao-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Aantal + knop: sticky onderaan zodat hij altijd bereikbaar is */
.emo-popup__options form.cart > .quantity,
.emo-popup__options form.cart > .single_add_to_cart_button { vertical-align: middle; }
.emo-popup__options form.cart {
	position: relative;
}
.emo-popup__options .quantity { display: inline-flex; margin: 16px 10px 0 0; }
.emo-popup__options .quantity .qty {
	width: 70px; height: 50px; text-align: center; border: 1px solid #ddd; border-radius: 12px; font-size: 16px; font-weight: 600;
}
.emo-popup .single_add_to_cart_button {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 200px; height: 50px; margin-top: 16px; padding: 0 22px;
	border: 0; border-radius: 999px;
	background: var(--emo-accent, #208418) !important; color: #fff !important;
	font-size: 16px; font-weight: 700; cursor: pointer;
	transition: background .2s;
}
.emo-popup .single_add_to_cart_button:hover { background: var(--emo-accent-hover, #EC9316) !important; }
.emo-popup .single_add_to_cart_button.loading { opacity: .6; pointer-events: none; }
@media (max-width: 767px) {
	.emo-popup .single_add_to_cart_button { flex: 1; min-width: 0; }
	.emo-popup__options form.cart .quantity + .single_add_to_cart_button { width: calc(100% - 84px); }
}

/* Foutmeldingen */
.emo-popup__errors {
	background: #fdecea; color: #b71c1c; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px;
}
.emo-popup__errors p { margin: 0; }

/* Aantal in de popup: [−] 1 [+] */
.emo-popup__options .quantity.emo-stepper {
	display: inline-flex; align-items: center; gap: 2px;
	height: 50px; padding: 0 4px; margin: 16px 10px 0 0;
	border: 1.5px solid #ddd; border-radius: 999px; background: #fff;
	vertical-align: middle;
}
.emo-popup__options .quantity.emo-stepper .qty {
	width: 40px; height: 40px; padding: 0; margin: 0;
	border: 0 !important; border-radius: 0; box-shadow: none !important; background: transparent;
	text-align: center; font-size: 17px; font-weight: 700; color: #1c1c1c;
	-moz-appearance: textfield;
}
.emo-popup__options .quantity.emo-stepper .qty::-webkit-outer-spin-button,
.emo-popup__options .quantity.emo-stepper .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.emo-stepper__btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; margin: 0;
	border: 0; border-radius: 50%; background: #f2f2f2;
	color: var(--emo-accent, #208418); font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer;
	transition: background .15s;
}
.emo-stepper__btn:hover { background: rgba(32, 132, 24, .14); }
.emo-stepper__btn[disabled] { color: #c4c4c4; background: #f6f6f6; cursor: default; }
@media (max-width: 767px) {
	.emo-popup__options form.cart .quantity.emo-stepper + .single_add_to_cart_button { width: calc(100% - 152px); }
}

/* "Al 3 in je bestelling" */
.emo-popup__incart {
	display: inline-flex; align-items: center; gap: 4px;
	margin-top: 6px; padding: 3px 10px; border-radius: 999px;
	background: rgba(32, 132, 24, .1); color: var(--emo-accent, #208418);
	font-size: 13px; font-weight: 600;
}
.emo-popup__incart[hidden] { display: none; }

/* Statiegeld onder de prijs in de popup */
.emo-popup__deposit { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: #6b6b6b; }

/* Statiegeld achter een add-on-optie */
.emo-addon-deposit { display: block; margin-top: 1px; font-size: 11px; font-weight: 400; line-height: 1.3; color: #6b6b6b; }

/* ───────── Eatmeister add-ons ───────── */
.emo-ao { margin: 0 0 14px; }
/* Elke extra optie een eigen kaartje met een kopstrook */
.emo-ao__addon { margin: 0 0 12px; padding: 0 14px 4px; border: 1px solid #e8e8e8; border-radius: 14px; background: #fff; min-width: 0; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.emo-ao__addon:focus-within { border-color: #cfe3cd; box-shadow: 0 2px 10px rgba(32,132,24,.07); }
/* !important: thema's (normalize.css) geven legend max-width:100% en display:table, dan valt de strook rechts te kort */
.emo-ao__head { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 8px; float: left; width: calc(100% + 28px) !important; max-width: none !important; box-sizing: border-box; padding: 11px 14px 10px !important; margin: 0 -14px 6px !important; background: #f7f7f7; border-bottom: 1px solid #eeeeee; white-space: normal; }
.emo-ao__head + * { clear: both; }
.emo-ao__addon > .emo-ao__desc { padding-top: 2px; }
.emo-ao__addon > .emo-ao__select, .emo-ao__addon > .emo-ao__text { margin: 6px 0 10px; }
.emo-ao__title { font-size: 16px; font-weight: 700; color: #1c1c1c; margin-right: auto; }
.emo-ao__badge { padding: 2px 9px; border-radius: 999px; background: #f2f2f2; color: #6b6b6b; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.emo-ao__badge--req { background: #fff1dc; color: #9a5b00; }
.emo-ao__hint { flex-basis: 100%; order: 3; font-size: 12px; color: #6b6b6b; }
.emo-ao__desc { margin: -2px 0 6px; font-size: 13px; color: #6b6b6b; }
.emo-ao__opts { display: flex; flex-direction: column; }
.emo-ao__opt { display: flex; align-items: center; gap: 12px; padding: 10px 0; margin: 0; cursor: pointer; font-size: 15px; line-height: 1.35; color: #1c1c1c; border-bottom: 1px solid #f3f3f3; }
.emo-ao__opt:last-child { border-bottom: 0; }
.emo-ao__opt input { margin: 0; }
.emo-ao__label { flex: 1; min-width: 0; }
.emo-ao__price { flex: 0 0 auto; color: #6b6b6b; font-size: 14px; font-weight: 500; white-space: nowrap; }
.emo-ao__opt:has(input:checked) { font-weight: 600; }
.emo-ao__opt:has(input:checked) .emo-ao__price { color: var(--emo-accent, #208418); }
.emo-ao__opt.is-soldout { cursor: not-allowed; color: #9a9a9a; }
.emo-ao__opt.is-soldout .emo-ao__label { text-decoration: line-through; }
.emo-ao__soldout { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #fcf0f1; color: #b32d2e; font-size: 11px; font-weight: 600; text-decoration: none; }
.emo-ao__opt.is-maxed { opacity: .45; cursor: not-allowed; }
.emo-ao__text { width: 100%; box-sizing: border-box; }
.emo-ao__price--text { display: block; margin: -4px 0 10px; }
.emo-ao__addon.has-error { border-color: #e9a5a5; }
.emo-ao__addon.has-error .emo-ao__head { background: #fdf1f1; border-bottom-color: #f6d6d6; }
.emo-ao__addon.has-error .emo-ao__title { color: #c62828; }
.emo-ao__addon.has-error .emo-ao__badge--req { background: #fdecea; color: #c62828; }
.emo-ao__addon.has-error .emo-ao__select, .emo-ao__addon.has-error .emo-ao__text { border-color: #c62828; }
.emo-ao__head .emo-ao__badge:not(.emo-ao__badge--req) { background: #fff; box-shadow: inset 0 0 0 1px #e4e4e4; }

.emo-popup__minqty { display: inline-block; margin: 4px 0 10px; padding: 3px 10px; border-radius: 999px; background: #fff1dc; color: #9a5b00; font-size: 12px; font-weight: 600; }

/* Statiegeld onder een keuzelijst (in plaats van in elke regel) */
.emo-ao__dep { margin: 6px 2px 0 !important; color: #8a8a8a; font-size: 12.5px; line-height: 1.35; }
.emo-ao__dep.is-chosen { color: #208418; font-weight: 600; }

/* Knop "Toevoegen aan winkelwagen" past ook op smalle telefoons */
@media (max-width: 420px) {
	.emo-popup .single_add_to_cart_button { padding-left: 10px !important; padding-right: 10px !important; font-size: 14px !important; letter-spacing: -.01em; white-space: normal !important; line-height: 1.15 !important; text-align: center; }
}
