/* ==========================================================
   GTC Language Switcher — Floating Widget
   ========================================================== */

#gtc-lang-switcher {
	position: fixed;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1;
}

/* Posizioni */
.gtc-switcher--bottom-right { bottom: 24px; right: 24px; }
.gtc-switcher--bottom-left  { bottom: 24px; left: 24px; }
.gtc-switcher--top-right    { top: 24px; right: 24px; }
.gtc-switcher--top-left     { top: 24px; left: 24px; }

/* Pulsante toggle */
.gtc-switcher__toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 50px;
	padding: 8px 14px 8px 10px;
	cursor: pointer;
	box-shadow: 0 2px 12px rgba(0,0,0,.15);
	transition: box-shadow .2s, transform .2s;
	color: #333;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.gtc-switcher__toggle:hover {
	box-shadow: 0 4px 20px rgba(0,0,0,.2);
	transform: translateY(-1px);
}

.gtc-switcher__toggle:focus {
	outline: 2px solid #1A73E8;
	outline-offset: 2px;
}

.gtc-switcher__flag {
	font-size: 20px;
	line-height: 1;
}

.gtc-switcher__code {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .5px;
}

.gtc-switcher__arrow {
	font-size: 8px;
	color: #888;
	transition: transform .2s;
	margin-left: 2px;
}

/* Arrow ruota quando aperto */
#gtc-lang-switcher.is-open .gtc-switcher__arrow {
	transform: rotate(180deg);
}

/* Lista lingue */
.gtc-switcher__list {
	list-style: none;
	margin: 0;
	padding: 6px 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0,0,0,.15);
	min-width: 160px;
	overflow: hidden;

	/* Nascosto di default */
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px) scale(.97);
	transition: opacity .18s, transform .18s, visibility .18s;
	pointer-events: none;

	/* Posiziona sopra il toggle */
	position: absolute;
	bottom: calc(100% + 8px);
	right: 0;
}

/* Posizioni left */
.gtc-switcher--bottom-left .gtc-switcher__list,
.gtc-switcher--top-left .gtc-switcher__list {
	right: auto;
	left: 0;
}

/* Posizioni top: lista va sotto */
.gtc-switcher--top-right .gtc-switcher__list,
.gtc-switcher--top-left .gtc-switcher__list {
	bottom: auto;
	top: calc(100% + 8px);
}

/* Stato aperto */
#gtc-lang-switcher.is-open .gtc-switcher__list {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	pointer-events: all;
}

/* Singola voce lingua */
.gtc-switcher__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	text-decoration: none;
	color: #333;
	transition: background .15s;
	cursor: pointer;
	white-space: nowrap;
}

a.gtc-switcher__item:hover {
	background: #f5f5f5;
	color: #1A73E8;
	text-decoration: none;
}

.gtc-switcher__item--current {
	background: #f0f4ff;
	color: #1A73E8;
	font-weight: 600;
}

.gtc-switcher__item .gtc-switcher__flag {
	font-size: 20px;
}

.gtc-switcher__name {
	flex: 1;
	font-size: 14px;
}

.gtc-switcher__check {
	color: #1A73E8;
	font-weight: 700;
	font-size: 13px;
}

/* Separatore tra voci */
.gtc-switcher__list li + li {
	border-top: 1px solid #f0f0f0;
}

/* Mobile */
@media (max-width: 480px) {
	.gtc-switcher--bottom-right { bottom: 16px; right: 16px; }
	.gtc-switcher--bottom-left  { bottom: 16px; left: 16px; }
	.gtc-switcher--top-right    { top: 16px; right: 16px; }
	.gtc-switcher--top-left     { top: 16px; left: 16px; }

	.gtc-switcher__toggle {
		padding: 7px 12px 7px 8px;
	}

	.gtc-switcher__list {
		min-width: 140px;
	}
}
