/* Traduci e Leggi – selettore lingua del sito */
:root {
	--ttr-accent: #1e73be;
	--ttr-text: #ffffff;
	--ttr-bg: #ffffff;
}

html body .ttr-site-selector {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 15px;
	line-height: 1.2;
	vertical-align: middle;
}

/* Pulsanti (tendina e bandiere) */
html body .ttr-site-selector .ttr-site-btn,
html body .ttr-site-selector .ttr-site-flag {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px;
	min-height: 38px;
	width: auto !important;
	margin: 0 !important;
	padding: 7px 14px !important;
	border: 2px solid var(--ttr-accent) !important;
	border-radius: 999px !important;
	font-family: inherit;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	text-decoration: none !important;
	letter-spacing: normal !important;
	opacity: 1 !important;
	visibility: visible !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: filter .15s, background-color .15s, color .15s;
}
html body .ttr-site-selector.ttr-style-solid .ttr-site-btn,
html body .ttr-site-selector.ttr-style-solid .ttr-site-flag[aria-pressed="true"] {
	background: var(--ttr-accent) !important;
	color: var(--ttr-text) !important;
}
html body .ttr-site-selector.ttr-style-solid .ttr-site-flag {
	background: var(--ttr-bg) !important;
	color: var(--ttr-accent) !important;
}
html body .ttr-site-selector.ttr-style-outline .ttr-site-btn,
html body .ttr-site-selector.ttr-style-outline .ttr-site-flag {
	background: var(--ttr-bg) !important;
	color: var(--ttr-accent) !important;
}
html body .ttr-site-selector.ttr-style-outline .ttr-site-flag[aria-pressed="true"],
html body .ttr-site-selector.ttr-style-outline .ttr-site-btn[aria-expanded="true"] {
	background: var(--ttr-accent) !important;
	color: var(--ttr-text) !important;
}
html body .ttr-site-selector .ttr-site-btn:hover,
html body .ttr-site-selector .ttr-site-flag:hover { filter: brightness(.92); }
html body .ttr-site-selector button:focus-visible { outline: 3px solid var(--ttr-accent) !important; outline-offset: 2px; }

html body .ttr-site-selector button svg {
	display: block;
	flex: none;
	fill: currentColor !important;
	opacity: 1 !important;
	visibility: visible !important;
}
html body .ttr-site-selector button svg path { fill: currentColor !important; }
html body .ttr-site-selector button span { color: inherit !important; opacity: 1 !important; visibility: visible !important; }
html body .ttr-site-selector .ttr-flag { font-size: 1.2em; line-height: 1; }
html body .ttr-site-selector .ttr-site-code { font-size: 13px !important; }

/* Menu a tendina */
html body .ttr-site-selector .ttr-site-menu {
	position: absolute;
	z-index: 100000;
	top: calc(100% + 6px);
	left: 0;
	min-width: 180px;
	margin: 0 !important;
	padding: 6px !important;
	list-style: none !important;
	background: #ffffff !important;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
	text-align: left;
}
html body .ttr-site-selector .ttr-site-menu[hidden] { display: none !important; }
html body .ttr-site-selector .ttr-site-menu li { margin: 0 !important; padding: 0 !important; list-style: none !important; border: 0 !important; }
html body .ttr-site-selector .ttr-site-menu li::before,
html body .ttr-site-selector .ttr-site-menu li::marker { content: none !important; }
html body .ttr-site-selector .ttr-site-menu button {
	display: flex !important;
	align-items: center;
	gap: 10px;
	width: 100% !important;
	margin: 0 !important;
	padding: 9px 12px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: transparent !important;
	color: #1d2327 !important;
	font-family: inherit;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.3 !important;
	text-align: left !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	cursor: pointer;
}
html body .ttr-site-selector .ttr-site-menu button:hover,
html body .ttr-site-selector .ttr-site-menu button:focus-visible { background: rgba(0, 0, 0, .07) !important; outline: none; }
html body .ttr-site-selector .ttr-site-menu button[aria-checked="true"] { font-weight: 700 !important; color: var(--ttr-accent) !important; }
html body .ttr-site-selector .ttr-site-menu button[aria-checked="true"]::after { content: "✓"; margin-left: auto; }

/* Fluttuante */
html body .ttr-site-selector.ttr-site-floating {
	position: fixed !important;
	bottom: 16px;
	z-index: 99990;
	padding: 6px;
	background: #ffffff;
	border-radius: 999px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
html body .ttr-site-selector.ttr-site-floating-right { right: 16px; }
html body .ttr-site-selector.ttr-site-floating-left { left: 16px; }
html body .ttr-site-selector.ttr-site-floating .ttr-site-menu { top: auto; bottom: calc(100% + 10px); }
html body .ttr-site-selector.ttr-site-floating-right .ttr-site-menu { left: auto; right: 0; }

/* Se la barra degli articoli è anch'essa fluttuante a destra, la si alza. */
html.ttr-has-site-floating-right body .ttr-toolbar.ttr-pos-floating { bottom: 76px; }

/* Nel menu del tema */
html body .ttr-menu-item .ttr-site-selector { margin: 0 8px; }
html body .ttr-menu-item .ttr-site-selector .ttr-site-btn { min-height: 32px; padding: 4px 10px !important; font-size: 14px !important; }

/* Indicatore di caricamento */
html.ttr-site-busy .ttr-site-selector .ttr-site-btn::after {
	content: "";
	width: 12px;
	height: 12px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: ttr-site-spin .7s linear infinite;
}
@keyframes ttr-site-spin { to { transform: rotate(360deg); } }

/* Motore "Google nel browser": nasconde barra, logo e fumetti di Google */
html.ttr-gw body { top: 0 !important; }
html.ttr-gw .skiptranslate iframe,
html.ttr-gw iframe.goog-te-banner-frame,
html.ttr-gw iframe.VIpgJd-ZVi9od-ORHb-OEVmcd,
html.ttr-gw #goog-gt-tt,
html.ttr-gw .goog-te-balloon-frame,
html.ttr-gw .VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
html.ttr-gw #ttr-google-element { display: none !important; visibility: hidden !important; }
html.ttr-gw .goog-text-highlight,
html.ttr-gw .VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q { background: none !important; box-shadow: none !important; }
html.ttr-gw font { background: none !important; box-shadow: none !important; }

/* Lingue da destra a sinistra (arabo): testi allineati a destra, layout del tema invariato */
html.ttr-rtl body :is(p, li, h1, h2, h3, h4, h5, h6, blockquote, figcaption, td, th, dt, dd, label):not(.ttr-toolbar *):not(.ttr-site-selector *),
.ttr-content[dir="rtl"], [dir="rtl"].wp-block-post-title {
	direction: rtl;
	text-align: right;
}
.ttr-content[dir="rtl"] :is(p, li, h1, h2, h3, h4, h5, h6, blockquote) { direction: rtl; text-align: right; }

@media print { .ttr-site-selector { display: none !important; } }
