/* JCA — Language Switcher */

.jca-langswitcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: inherit;
	color: inherit;
}

.jca-langswitcher-label {
	font-size: 13px;
	font-weight: 500;
}

.jca-langswitcher-select {
	font-family: inherit;
	font-size: 14px;
	padding: 6px 10px;
	border: 1px solid #cfcfcf;
	border-radius: 6px;
	background: #fff;
	color: inherit;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.jca-langswitcher-select:focus {
	outline: 0;
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.18);
}

.jca-langswitcher-feedback {
	font-size: 12px;
	opacity: 0.75;
	min-height: 14px;
	min-width: 60px;
}

.jca-langswitcher-feedback[data-state="error"] {
	color: #b32d2e;
}
.jca-langswitcher-feedback[data-state="ok"] {
	color: #008a20;
}

/* =================================================================
   Style: list (per popup / bottom sheet)
   Uso classi dedicate .jca-lsw-* per evitare conflitti col tema che
   applica stili generici a ogni <button>.
   ================================================================= */

.jca-lsw {
	display: block;
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	box-sizing: border-box;
	font-family: inherit;
	color: inherit;
}

.jca-lsw-list-label {
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.65;
	margin: 0 0 12px;
	padding: 0 4px;
}

.jca-lsw-list-items {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 520px) {
	.jca-lsw-list-items {
		grid-template-columns: 1fr 1fr;
		gap: 4px 10px;
		/* Spazio per il pulsante X di chiusura dei popup Elementor (in alto-destra).
		   Sposta giù la griglia così la sigla della prima riga della colonna destra
		   non finisce sotto la X. */
		padding-top: 18px;
	}
}

/* Item — è un <div role="radio">, non un <button>, così il tema non lo stila */
.jca-lsw-list-item {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	width: 100% !important;
	padding: 12px 14px !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	color: inherit !important;
	cursor: pointer !important;
	text-align: left !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	line-height: 1.3 !important;
	min-height: 48px !important;
	box-sizing: border-box !important;
	transition: background 0.15s ease, color 0.15s ease !important;
	outline: 0 !important;
	user-select: none;
}

.jca-lsw-list-item:hover {
	background: rgba(0, 0, 0, 0.05) !important;
	color: inherit !important;
	border: 0 !important;
	box-shadow: none !important;
}

.jca-lsw-list-item:focus {
	outline: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
}

.jca-lsw-list-item:focus-visible {
	background: rgba(0, 0, 0, 0.05) !important;
	box-shadow: inset 0 0 0 2px rgba(0, 181, 196, 0.45) !important;
	border: 0 !important;
	outline: 0 !important;
}

.jca-lsw-list-name {
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jca-lsw-list-code {
	flex: 0 0 auto;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 34px;
	min-width: 34px;
	max-width: 34px;
	height: 22px;
	font-size: 11px !important;
	font-weight: 500 !important;
	font-style: normal !important;
	letter-spacing: 0.04em;
	padding: 0 !important;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.08);
	color: inherit;
	opacity: 0.75;
	box-sizing: border-box;
	line-height: 1 !important;
	text-transform: uppercase;
}

.jca-lsw-list-check {
	flex: 0 0 auto;
	font-size: 16px;
	line-height: 1;
	color: currentColor;
}

/* Current state: grassetto + accent brand JA Compass */
.jca-lsw-list-item.is-current {
	font-weight: 700 !important;
	color: var(--jca-accent, #00B5C4) !important;
	background: rgba(0, 181, 196, 0.10) !important;
	border: 0 !important;
	box-shadow: none !important;
}

.jca-lsw-list-item.is-current:hover,
.jca-lsw-list-item.is-current:focus,
.jca-lsw-list-item.is-current:focus-visible {
	background: rgba(0, 181, 196, 0.16) !important;
	color: var(--jca-accent, #00B5C4) !important;
}

.jca-lsw-list-item.is-current .jca-lsw-list-code {
	background: var(--jca-accent, #00B5C4);
	color: #fff;
	opacity: 1;
	font-weight: 500 !important;
	font-style: normal !important;
}

.jca-lsw-list-item.is-saving {
	opacity: 0.6;
	cursor: progress !important;
}

.jca-lsw-feedback {
	text-align: center;
	margin-top: 10px;
	font-size: 13px;
	min-height: 18px;
}

.jca-lsw-feedback[data-state="error"] { color: #b32d2e; }
.jca-lsw-feedback[data-state="ok"]    { color: #008a20; }
