/* ============================================================
   POPUP PAESE E LINGUA
   Fixed bottom-right, globale su tutte le pagine
   Valori da Figma node 2013:26788
   ============================================================ */

.s4w-cl-popup {
	position: fixed;
	bottom: 0;
	right: 0;
	z-index: 9999;
	width: 361px;
	max-width: 100vw;
}

/* Card — padding-bottom: 34px (dal bottone al bordo inferiore) */
.s4w-cl-popup__card {
	position: relative;
	background: var(--bg-white-0);
	padding: 6px 18px 34px 18px;
	border: 1px solid var(--bg-soft-200);
}

/* Close — top:6 right:12 */
.s4w-cl-popup__close {
	position: absolute;
	top: 6px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	color: var(--text-main-900);
	line-height: 0;
}

.s4w-cl-popup__close:focus-visible {
	outline: 2px solid var(--text-main-900);
	outline-offset: 2px;
}

/* Testo descrittivo — Merriweather 18px
   margin-top: 6(close top) + 24(close h) + 26(gap) - 6(card padding) = 50px
   margin-bottom: 24px verso il primo campo */
.s4w-cl-popup__text {
	font-family: var(--font-secondary);
	font-size: var(--label-large);
	font-weight: var(--weight-regular);
	line-height: 1.4;
	color: var(--text-main-900);
	margin: 50px 0 24px;
}

/* Wrapper select con chevron sovrapposto — 12px tra i due campi */
.s4w-cl-popup__select-wrap {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 12px;
}

/* Ultimo select (lingua): 14px verso la nota */
.s4w-cl-popup__select-wrap--last {
	margin-bottom: 24px;
}

/* Stili applicati sia al select WPML custom che al select nativo WCPBC */
.s4w-cl-popup__select,
.s4w-cl-popup__select-wrap--country .wcpbc-country-switcher {
	width: 100%;
	height: 46px;
	padding: 11px 40px 11px 16px;
	font-family: var(--font-primary);
	font-size: var(--paragraph-small);
	font-weight: var(--weight-book);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-main-900);
	background: var(--bg-white-0);
	border: 1px solid var(--bg-soft-200);
	border-radius: 3px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	outline: none;
}

.s4w-cl-popup__select:focus-visible,
.s4w-cl-popup__select-wrap--country .wcpbc-country-switcher:focus-visible {
	border-color: var(--text-main-900);
}

/* Nasconde il wrapper aggiuntivo che WCPBC genera attorno al select */
.s4w-cl-popup__select-wrap--country .wc-price-based-country {
	width: 100%;
}

.s4w-cl-popup__chevron {
	position: absolute;
	right: 11px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	pointer-events: none;
	color: var(--text-main-900);
	line-height: 0;
}

/* Nota — 14px dal secondo campo, 12px verso il bottone */
.s4w-cl-popup__note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 0;
	margin-bottom: 12px;
	min-height: 35px;
}

.s4w-cl-popup__note-line {
	flex-shrink: 0;
	width: 1px;
	align-self: stretch;
	background: var(--color-green, #34A665);
}

.s4w-cl-popup__note-text {
	font-family: var(--font-primary);
	font-size: var(--paragraph-xsmall);
	font-weight: var(--weight-regular);
	line-height: 1.3;
	color: var(--text-sub-500);
	margin: 0;
}

.s4w-cl-popup__note-text strong {
	font-weight: var(--weight-bold);
	color: var(--text-main-900);
}

/* Bottone CONFERMA — height 44px, padding 12px 16px */
.s4w-cl-popup__confirm {
	width: 100%;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-primary);
	font-size: var(--paragraph-small);
	font-weight: var(--weight-book);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: var(--text-main-900);
	color: var(--bg-white-0);
	border: none;
	cursor: pointer;
	border-radius: 0;
	padding: 12px 16px;
	transition: opacity 0.2s ease;
}

.s4w-cl-popup__confirm:hover {
	opacity: 0.85;
}

.s4w-cl-popup__confirm:focus-visible {
	outline: 2px solid var(--text-main-900);
	outline-offset: 2px;
}

/* Modalità megamenu: posizione calcolata via JS sul bottone trigger */
.s4w-cl-popup--from-megamenu {
	transform: none;
}

/* Mobile */
@media (max-width: 480px) {
	.s4w-cl-popup {
		bottom: 0;
		right: 0;
		width: 100%;
		max-width: 100%;
	}
}
