/* Contenitore tecnico del widget: mai visibile. */
#ygpgt-google-element {
	display: none !important;
}

/* Voce "versione originale": visibile solo quando una lingua Google è attiva. */
.ygpgt-reset {
	display: none !important;
}

.ygpgt-on .ygpgt-reset {
	display: list-item !important;
}

/* Allineamento bandiera/nome, coerente con le voci Polylang. */
.ygpgt-lang-item > a {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ygpgt-lang-item img {
	display: inline-block;
	vertical-align: middle;
}

.ygpgt-current > a {
	font-weight: 600;
}

/* Rimozione della barra superiore iniettata da Google. */
.ygpgt-hide-banner .skiptranslate,
.ygpgt-hide-banner .goog-te-banner-frame,
.ygpgt-hide-banner #goog-gt-tt,
.ygpgt-hide-banner .goog-te-balloon-frame {
	display: none !important;
}

.ygpgt-hide-banner body,
body.ygpgt-hide-banner {
	top: 0 !important;
	position: static !important;
}

.ygpgt-hide-banner .goog-text-highlight {
	background: none !important;
	box-shadow: none !important;
}

/* Evita che il font-size del body venga alterato dal widget. */
.ygpgt-hide-banner body {
	min-height: 0 !important;
}

/* Sigla del paese quando la bandiera non e' disponibile. */
.ygpgt-flag-fallback {
	display: inline-block;
	min-width: 18px;
	padding: 1px 3px;
	border: 1px solid currentColor;
	border-radius: 2px;
	opacity: .7;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 9px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .04em;
	text-align: center;
	text-transform: uppercase;
	vertical-align: middle;
}

/* Le bandiere di Polylang sono 18x12: allineiamo le nostre allo stesso passo. */
.ygpgt-lang-item img {
	width: 18px;
	height: 12px;
	flex: 0 0 auto;
}

/* Lingua Polylang che non e' piu' quella mostrata a schermo. */
.ygpgt-was-current > a {
	font-weight: inherit;
}

/* Nome lingua nascosto ma disponibile agli screen reader. */
.ygpgt-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* In modalita' "solo bandiera" il link non deve collassare. */
.ygpgt-lang-item:not(.ygpgt-has-text) > a {
	min-width: 18px;
}
