/* Oliva — the country and language window (includes/store-window.php, assets/store-window.js). Design:
   wordpress/store-window-mockup/. Oliva's look, not Mango's black: white box, the brown #3b2f2a for lines, the
   fields' borders and the button (hover #4d3b39), Cormorant for the title, Jost for the rest, small capitals only on
   the button and the fields' short labels. Computers and tablets: a box in the middle (440 px). Phones: a sheet from the bottom that fits without
   scrolling and leaves the top half of the page in view (Google: dialogs shouldn't hide the whole page).
   Above the cookie banner (Complianz: 99998–99999): choosing the language first means the banner the visitor answers
   is already in their language; closing the window leaves the banner as it was. Fixed on top of the page, so nothing
   in the page moves (no layout shift). */

.osw {
	--brown: #3b2f2a; --brown-soft: #4d3b39; --muted: #8d7c7a; --text: #4a423a;
	--sans: "Jost", system-ui, sans-serif; --serif: "Cormorant Garamond", Georgia, serif;
	position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 24px;
	color: var(--brown); font: 400 13px/1.6 var(--sans); text-align: left;
}
.osw[hidden] { display: none; }
.osw *, .osw *::before, .osw *::after { box-sizing: border-box; }
.osw__veil { position: absolute; inset: 0; background: rgba(31, 26, 20, .32); opacity: 0; transition: opacity .25s; }
.osw__box { position: relative; width: min(440px, 100%); padding: 44px 40px 36px; background: #fff; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.osw.is-open .osw__veil, .osw.is-open .osw__box { opacity: 1; transform: none; }
.osw__box:focus { outline: none; }

.osw .osw__close, .osw .osw__close:hover, .osw .osw__close:focus { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; margin: 0; padding: 10px; border: 0; border-radius: 0;
	background: transparent; box-shadow: none; color: var(--brown); cursor: pointer; }
.osw__close svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.osw .osw__title { margin: 0 0 26px; padding: 0 28px 0 0; font: 300 32px/1.12 var(--serif); letter-spacing: 0; text-transform: none; color: var(--brown); }

.osw__form { display: flex; flex-direction: column; margin: 0; }
/* Oliva's own dropdowns (assets/store-window.js, Combo): a field with its small label and the value; the list right
   below (or above when there is more room), as wide as the field, white with the thin brown line; it scrolls inside
   itself when long, the window never does. The chosen option in brown and a little bolder; the one under the pointer
   or the keyboard on the light grey the site already uses. */
.osw__field { position: relative; margin: 0 0 14px; }
.osw__field.is-open { z-index: 3; }
.osw .osw__combo { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 8px 44px 8px 14px;
	border: 1px solid var(--brown); border-radius: 0; background: #fff; color: var(--brown); cursor: pointer; outline: none;
	-webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.osw .osw__combo:focus-visible, .osw__field.is-open .osw__combo { box-shadow: inset 0 0 0 1px var(--brown); }
.osw .osw__label { display: block; margin: 0 0 2px; font: 400 10px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.osw .osw__value { display: block; font: 400 15px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--brown); overflow-wrap: anywhere; }
.osw__chev { position: absolute; top: 50%; right: 14px; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: var(--brown); stroke-width: 1.2; transition: transform .2s; }
.osw__field.is-open .osw__chev { transform: rotate(180deg); }
.osw .osw__list { position: absolute; left: 0; right: 0; top: 100%; z-index: 3; margin: -1px 0 0; padding: 6px 0; list-style: none;
	border: 1px solid var(--brown); background: #fff; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.osw .osw__list[hidden] { display: none; }
.osw .osw__list.is-up { top: auto; bottom: 100%; margin: 0 0 -1px; }
.osw .osw__option { margin: 0; padding: 9px 14px; font: 400 15px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); cursor: pointer; overflow-wrap: anywhere; list-style: none; }
.osw .osw__option::before, .osw .osw__option::marker { content: none; }
.osw .osw__option.is-active { background: #f6f6f6; }
.osw .osw__option[aria-selected="true"] { color: var(--brown); font-weight: 500; }

.osw .osw__button, .osw .osw__button:focus { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin: 10px 0 0; padding: 12px 16px;
	border: 1px solid var(--brown); border-radius: 0; background: var(--brown); box-shadow: none; color: #fff;
	font: 400 12px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-align: center; cursor: pointer; transition: background .2s, border-color .2s; }
.osw .osw__button:hover { background: var(--brown-soft); border-color: var(--brown-soft); color: #fff; }
.osw .osw__button[aria-busy="true"] { background: var(--brown-soft); border-color: var(--brown-soft); cursor: progress; }
.osw .osw__close:focus-visible, .osw .osw__button:focus-visible { outline: 1px solid var(--brown); outline-offset: 3px; }

/* The quick first step (like Zara): «Hola,», where the visitor is, the buttons one under the other, and the small line
   that opens the full step. Long button texts in normal case (they are sentences), the short «Continuar» in the site's
   small capitals; both wrap rather than ever cut. */
.osw__quick[hidden], .osw__full[hidden] { display: none; }
.osw .osw__hello { margin: 0 0 8px; padding: 0 28px 0 0; font: 300 34px/1.1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--brown); }
.osw .osw__line { margin: 0 0 24px; padding: 0 28px 0 0; font: 300 15px/1.55 var(--sans); color: var(--text); }
.osw__actions { display: flex; flex-direction: column; gap: 10px; }
.osw .osw__actions .osw__button { margin: 0; }
.osw .osw__button--long, .osw .osw__button--long:focus { font-size: 14px; line-height: 1.35; letter-spacing: .02em; text-transform: none; }
.osw .osw__button--line, .osw .osw__button--line:focus { background: #fff; color: var(--brown); }
.osw .osw__button--line:hover { background: var(--brown); border-color: var(--brown); color: #fff; }
.osw .osw__button--line[aria-busy="true"] { background: var(--brown-soft); border-color: var(--brown-soft); color: #fff; }
.osw .osw__button[hidden] { display: none; }
.osw .osw__other { margin: 18px 0 0; font: 400 13px/1.5 var(--sans); color: var(--text); }
.osw .osw__more, .osw .osw__more:hover, .osw .osw__more:focus { display: inline; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
	color: var(--brown); font: 500 13px/1.5 var(--sans); letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.osw .osw__more:hover { text-decoration-thickness: 2px; }
.osw .osw__more:focus-visible { outline: 1px solid var(--brown); outline-offset: 3px; }

/* Short windows on computers (a browser not full height): tighter, still no scrolling */
@media (min-width: 768px) and (max-height: 520px) {
	.osw__box { padding: 32px 36px 26px; }
	.osw .osw__title { margin-bottom: 18px; font-size: 28px; }
	.osw__field { margin-bottom: 10px; }
	.osw .osw__combo { min-height: 52px; }
}

/* Phones: a sheet from the bottom, like "Added to your bag" and the newsletter window */
@media (max-width: 767px) {
	.osw { place-items: end stretch; padding: 0; }
	.osw__box { width: 100%; padding: 30px 20px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%);
		transition: opacity .2s, transform .3s cubic-bezier(.2, .7, .2, 1); }
	.osw .osw__close, .osw .osw__close:hover, .osw .osw__close:focus { top: 8px; right: 6px; }
	.osw .osw__title { margin-bottom: 20px; padding-right: 32px; font-size: 27px; }
	.osw__field { margin-bottom: 12px; }
	.osw .osw__value, .osw .osw__option { font-size: 16px; } /* never smaller than 16 px on phones: no zoom */
	.osw .osw__hello { font-size: 30px; }
	.osw .osw__line { margin-bottom: 20px; }
	.osw .osw__option { padding: 11px 14px; }
	.osw .osw__button { margin-top: 6px; }
}
@media (max-width: 767px) and (max-height: 600px) {
	.osw__box { padding-top: 22px; }
	.osw .osw__title { margin-bottom: 14px; font-size: 24px; }
	.osw__field { margin-bottom: 8px; }
	.osw .osw__combo { min-height: 52px; }
}

/* While it is open, the cookie banner's own shade steps back (the window brings its own) */
html.oliva-store-open #cmplz-cookiebanner-container::before { opacity: 0; }
/* …and Oli (the chat, «Oliva — Chat») waits out of sight: on phones he climbs above the cookie banner, which sits behind
   the window, so he jumped to the middle of the screen and slid about over the window (Josep, 4/12/2026). He comes
   back, already in his place, when the window closes; his greeting waits for that too (oliva-chat assets/embed.js). */
html.oliva-store-open .oliva-chat { visibility: hidden !important; pointer-events: none !important; }

@media (prefers-reduced-motion: reduce) {
	.osw__veil, .osw__box { transition: none; }
}
