/* Add-to-cart pop-up (assets/product-options.js). Colours from the swebetech theme.json palette. */
.vpo {
	--vpo-rouge: #C8202F;
	--vpo-charbon: #1F1A17;
	--vpo-creme: #FFF8F0;
	--vpo-farine: #F4E6D4;
	--vpo-taupe: #6E625A;
	--vpo-basilic: #2E6B3F;
	--vpo-line: #E7DCCF;
	width: min(640px, calc(100vw - 48px));
	max-height: min(88vh, 860px);
	padding: 0;
	border: 0;
	border-radius: 20px;
	background: #fff;
	color: var(--vpo-charbon);
	box-shadow: 0 24px 80px rgba(31, 26, 23, .35);
	font-family: var(--wp--preset--font-family--manrope, "Manrope", system-ui, sans-serif);
	overflow: hidden;
}
.vpo::backdrop { background: rgba(31, 26, 23, .55); }
.vpo[open] { display: flex; flex-direction: column; animation: vpo-in .18s ease-out; }
@keyframes vpo-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
html.vpo-open { overflow: hidden; }

.vpo-inner { display: flex; flex-direction: column; min-height: 0; max-height: inherit; flex: 1; margin: 0; }
.vpo-head { position: relative; display: flex; align-items: center; gap: 16px; padding: 20px 64px 16px 24px; border-bottom: 1px solid var(--vpo-line); background: var(--vpo-creme); }
.vpo-img { flex: none; width: 88px; height: 88px; border-radius: 14px; object-fit: cover; background: var(--vpo-farine); }
.vpo-kicker { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--vpo-taupe); }
.vpo-ok { color: var(--vpo-basilic); text-transform: none; letter-spacing: 0; font-size: 15px; }
.vpo-title { margin: 0; font-family: var(--wp--preset--font-family--platypi, "Platypi", Georgia, serif); font-size: 26px; line-height: 1.15; }
.vpo-base { margin: 4px 0 0; font-weight: 700; }
.vpo-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--vpo-charbon); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.vpo-close:hover { background: var(--vpo-farine); }

.vpo-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 24px 20px; }
.vpo-desc { margin: 12px 0 4px; color: var(--vpo-taupe); }
.vpo-loading { padding: 40px 0; text-align: center; color: var(--vpo-taupe); }
.vpo-section { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
.vpo-section legend, .vpo-label { display: block; padding: 0; margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.vpo-label span { font-weight: 500; color: var(--vpo-taupe); font-size: 14px; }
.vpo-help { margin: -4px 0 10px; font-size: 14px; color: var(--vpo-taupe); }

.vpo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vpo-chip { position: relative; cursor: pointer; }
.vpo-chip input, .vpo-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vpo-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 14px; border: 1.5px solid var(--vpo-line); border-radius: 999px; background: #fff; font-weight: 600; transition: background .12s, border-color .12s; }
.vpo-chip span::before { content: "✓"; color: var(--vpo-basilic); font-weight: 800; }
.vpo-chip input:checked + span { border-color: var(--vpo-rouge); background: #FCE9EA; color: #8F1520; text-decoration: line-through; }
.vpo-chip input:checked + span::before { content: "✕"; color: var(--vpo-rouge); text-decoration: none; display: inline-block; }
.vpo-chip input:focus-visible + span, .vpo-row input:focus-visible ~ .vpo-check { outline: 3px solid #F2A541; outline-offset: 2px; }

.vpo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vpo-row { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 12px; border: 1.5px solid var(--vpo-line); border-radius: 12px; cursor: pointer; }
.vpo-row:has(input:checked) { border-color: var(--vpo-basilic); background: #EEF6F0; }
.vpo-check { flex: none; width: 22px; height: 22px; border: 2px solid var(--vpo-taupe); border-radius: 6px; display: inline-grid; place-items: center; }
.vpo-row input:checked ~ .vpo-check { background: var(--vpo-basilic); border-color: var(--vpo-basilic); }
.vpo-row input:checked ~ .vpo-check::after { content: "✓"; color: #fff; font-size: 14px; font-weight: 800; }
.vpo-name { flex: 1; font-weight: 600; margin: 0; }
.vpo-price { margin: 0; font-weight: 700; color: var(--vpo-taupe); white-space: nowrap; }

.vpo textarea { width: 100%; min-height: 64px; padding: 10px 12px; border: 1.5px solid var(--vpo-line); border-radius: 12px; font: inherit; resize: vertical; box-sizing: border-box; }
.vpo textarea:focus { outline: 3px solid #F2A541; outline-offset: 1px; border-color: var(--vpo-taupe); }
.vpo-count { margin: 4px 0 0; text-align: right; font-size: 13px; color: var(--vpo-taupe); }

.vpo-drinks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.vpo-drink { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1.5px solid var(--vpo-line); border-radius: 14px; }
.vpo-drink img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--vpo-farine); }
.vpo-drink > div { flex: 1; min-width: 0; }
/* Drink quantity selector: own line, full width of the pop-up. */
.vpo-drink { flex-wrap: wrap; }
.vpo-drink .vpo-stepper { display: flex; flex: 1 0 100%; }
.vpo-drink .vpo-stepper button { flex: none; width: 64px; height: 48px; }
.vpo-drink .vpo-stepper input { flex: 1; width: auto; min-width: 0; height: 48px; font-size: 18px; }

.vpo-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--vpo-line); background: #fff; }
.vpo-foot .vpo-error { flex-basis: 100%; }
.vpo-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #FCE9EA; color: #8F1520; font-weight: 600; }
.vpo-foot .vpo-error { margin: 0; }
.vpo-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--vpo-line); border-radius: 999px; overflow: hidden; }
.vpo-stepper button { width: 44px; height: 44px; border: 0; background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--vpo-charbon); }
.vpo-stepper button:hover { background: var(--vpo-farine); }
.vpo-stepper input { width: 40px; height: 44px; border: 0; text-align: center; font: inherit; font-weight: 800; -moz-appearance: textfield; appearance: textfield; }
.vpo-stepper input::-webkit-inner-spin-button, .vpo-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.vpo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 10px 20px; border: 1.5px solid var(--vpo-line); border-radius: 999px; background: #fff; color: var(--vpo-charbon); font: inherit; font-weight: 700; cursor: pointer; }
.vpo-btn-primary { flex: 1; justify-content: space-between; border-color: var(--vpo-rouge); background: var(--vpo-rouge); color: #fff; }
.vpo-btn-primary:hover { background: #A81A27; border-color: #A81A27; }
.vpo-btn:disabled { opacity: .55; cursor: not-allowed; }
.vpo-btn:focus-visible, .vpo-stepper button:focus-visible, .vpo-close:focus-visible { outline: 3px solid #F2A541; outline-offset: 2px; }
.is-busy .vpo-btn-primary { cursor: progress; }

.vpo-toast { position: fixed; z-index: 100000; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: 14px; background: #1F1A17; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font-weight: 600; transition: opacity .3s, transform .3s; }
.vpo-toast a { color: #F2A541; font-weight: 800; }
.vpo-toast.is-out { opacity: 0; transform: translate(-50%, 10px); }

/* Mobile: full screen. */
@media (max-width: 600px) {
	.vpo { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
	.vpo[open] { animation-name: vpo-up; }
	@keyframes vpo-up { from { transform: translateY(24px); opacity: 0; } }
	.vpo-head { padding: calc(14px + env(safe-area-inset-top)) 60px 14px 16px; }
	.vpo-close { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
	.vpo-img { width: 64px; height: 64px; }
	.vpo-title { font-size: 22px; }
	.vpo-body { padding: 4px 16px 20px; }
	.vpo-list { grid-template-columns: 1fr; }
	.vpo-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
	.vpo-foot .vpo-btn:not(.vpo-btn-primary) { flex: 0 0 auto; }
	.vpo-toast { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
	.vpo[open], .vpo-toast { animation: none; transition: none; }
}
