/* ==========================================================================
   GTranslate — allineato al tema Museo Selfie
   https://gtranslate.com
   ========================================================================== */

/* Barra Google in alto (widget nascosto) */
.goog-te-banner-frame.skiptranslate,
body > .skiptranslate:not(.goog-te-gadget) {
	display: none !important;
}

body {
	top: 0 !important;
}

#google_translate_element2,
.gtranslate_wrapper > #google_translate_element2 {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	margin: -1px !important;
	padding: 0 !important;
}

/* Float switcher — posizione (GTranslate a destra; WhatsApp alla sua sinistra se presente) */
#gt_float_wrapper,
.gtranslate_wrapper #gt_float_wrapper {
	position: fixed !important;
	right: 1rem !important;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0)) !important;
	left: auto !important;
	z-index: 250 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body:has(.cookie-consent:not([hidden])) #gt_float_wrapper {
	bottom: calc(6.5rem + env(safe-area-inset-bottom, 0)) !important;
}

html.museo-sticky-bar-visible #gt_float_wrapper {
	bottom: calc(5.5rem + env(safe-area-inset-bottom, 0)) !important;
}

body:has(.cookie-consent:not([hidden])):has(.museo-sticky-bar:not(.museo-sticky-bar--idle)) #gt_float_wrapper {
	bottom: calc(11rem + env(safe-area-inset-bottom, 0)) !important;
}

@media (max-width: 767px) {
	#gt_float_wrapper {
		right: auto !important;
		left: 1rem !important;
		bottom: calc(5.5rem + env(safe-area-inset-bottom, 0)) !important;
	}

	body:has(.museo-whatsapp) #gt_float_wrapper {
		left: calc(1rem + 3.25rem + 0.65rem) !important;
	}

	body:has(.cookie-consent:not([hidden])) #gt_float_wrapper {
		bottom: calc(10rem + env(safe-area-inset-bottom, 0)) !important;
	}

	body:has(.cookie-consent:not([hidden])):has(.museo-sticky-bar:not(.museo-sticky-bar--idle)) #gt_float_wrapper {
		bottom: calc(15.5rem + env(safe-area-inset-bottom, 0)) !important;
	}
}

/* Switcher */
.gt_float_switcher,
.gtranslate_wrapper .gt_float_switcher {
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
	line-height: 1.2 !important;
	color: var(--color-text-dark) !important;
	opacity: 1 !important;
	filter: none !important;
	background: transparent !important;
	box-shadow: none !important;
	border: none !important;
}

.gt_float_switcher .gt-selected {
	background: #fff !important;
	border: 2px solid var(--color-lilac) !important;
	border-radius: var(--radius-lg) !important;
	box-shadow: var(--shadow-card) !important;
	overflow: hidden !important;
	transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition) !important;
}

.gt_float_switcher .gt-selected:hover {
	border-color: var(--color-accent) !important;
	box-shadow: 0 10px 28px rgba(155, 107, 255, 0.22) !important;
}

.gt_float_switcher .gt-current-lang {
	display: flex !important;
	align-items: center !important;
	gap: 0.45rem !important;
	padding: 0.55rem 0.75rem !important;
	min-height: var(--touch-min) !important;
	font-weight: 600 !important;
	color: var(--color-ink) !important;
}

.gt_float_switcher .gt-current-lang img {
	width: 1.35rem !important;
	height: auto !important;
	border-radius: 2px !important;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
}

.gt_float_switcher .gt-lang-code {
	font-family: var(--font-display) !important;
	font-size: 0.8125rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	color: var(--color-lilac) !important;
}

.gt_float_switcher-arrow,
.gt_arrow_rotate {
	border-color: var(--color-lilac) !important;
	opacity: 1 !important;
}

/* Dropdown lingue */
.gt_float_switcher .gt_options,
.gtranslate_wrapper .gt_options {
	display: none;
	margin-bottom: 0.4rem !important;
	padding: 0.35rem !important;
	background: #fff !important;
	border: 2px solid var(--color-sky) !important;
	border-radius: var(--radius-md) !important;
	box-shadow: var(--shadow-soft) !important;
	max-height: min(16rem, 50vh) !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var(--scrollbar-thumb-solid) var(--scrollbar-track);
}

.gt_float_switcher .gt_options::-webkit-scrollbar {
	width: 6px;
}

.gt_float_switcher .gt_options::-webkit-scrollbar-track {
	background: var(--scrollbar-track);
	border-radius: 999px;
}

.gt_float_switcher .gt_options::-webkit-scrollbar-thumb {
	background: var(--scrollbar-thumb);
	border-radius: 999px;
}

.gt_float_switcher .gt_options::-webkit-scrollbar-thumb:hover {
	background: var(--scrollbar-thumb-hover);
}

.gt_float_switcher .gt_options.gt-open,
.gtranslate_wrapper .gt_options.gt-open {
	display: block !important;
}

.gt_float_switcher .gt_options a,
.gtranslate_wrapper .gt_options a.nturl {
	display: flex !important;
	align-items: center !important;
	gap: 0.55rem !important;
	padding: 0.5rem 0.65rem !important;
	border-radius: var(--radius-sm) !important;
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	color: var(--color-text) !important;
	text-decoration: none !important;
	transition: background var(--transition), color var(--transition) !important;
}

.gt_float_switcher .gt_options a img,
.gtranslate_wrapper .gt_options a img {
	width: 1.25rem !important;
	height: auto !important;
	flex-shrink: 0 !important;
}

.gt_float_switcher .gt_options a:hover,
.gtranslate_wrapper .gt_options a.nturl:hover {
	background: var(--color-surface) !important;
	color: var(--color-lilac) !important;
}

.gt_float_switcher .gt_options a.gt-current,
.gtranslate_wrapper .gt_options a.gt-current {
	background: var(--color-accent-soft) !important;
	color: var(--color-accent) !important;
	font-weight: 700 !important;
}

/* Branding Google nel widget nascosto */
.goog-te-gadget {
	font-family: var(--font-body) !important;
	color: transparent !important;
	font-size: 0 !important;
}

.goog-te-gadget .goog-te-combo {
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
	padding: 0.4rem 0.6rem !important;
	border: 2px solid var(--color-sky) !important;
	border-radius: var(--radius-sm) !important;
	color: var(--color-text) !important;
	background: #fff !important;
}
