/* Radio Talpa — player fisso
   I colori seguono i "Colori globali" di Elementor se impostati
   (Accento = pulsante), altrimenti i valori qui sotto. */

.rt-player {
	--rt-bg: #111418;
	--rt-fg: #ffffff;
	--rt-muted: rgba(255, 255, 255, .65);
	--rt-accent: var(--e-global-color-accent, #64c9d9);
	--rt-h: 64px;

	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	height: var(--rt-h);
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 16px;
	padding-bottom: env(safe-area-inset-bottom, 0);
	box-sizing: content-box;
	background: var(--rt-bg);
	color: var(--rt-fg);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, .35);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.3;
}

body.has-rt-player { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0)); }

.rt-player__toggle {
	flex: 0 0 auto;
	position: relative;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--rt-accent);
	color: #111;
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: transform .15s ease;
}
.rt-player__toggle:hover { transform: scale(1.06); background: var(--rt-accent); color: #111; }
.rt-player__toggle:focus-visible { outline: 3px solid var(--rt-fg); outline-offset: 2px; }

.rt-icon { width: 24px; height: 24px; fill: currentColor; display: block; }
.rt-icon--pause, .rt-spinner { display: none; }
.rt-player[data-state="playing"] .rt-icon--play { display: none; }
.rt-player[data-state="playing"] .rt-icon--pause { display: block; }
.rt-player[data-state="loading"] .rt-icon--play { display: none; }
.rt-player[data-state="loading"] .rt-spinner { display: block; }

.rt-spinner {
	width: 22px;
	height: 22px;
	border: 3px solid rgba(0, 0, 0, .25);
	border-top-color: #111;
	border-radius: 50%;
	animation: rt-spin .8s linear infinite;
}
@keyframes rt-spin { to { transform: rotate(360deg); } }

.rt-player__info { flex: 1 1 auto; min-width: 0; }
.rt-player__station { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.rt-player__station strong { font-weight: 700; }
.rt-player__status { color: var(--rt-muted); overflow: hidden; text-overflow: ellipsis; }
.rt-player__title { color: var(--rt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.rt-player[data-state="playing"] .rt-player__title { color: var(--rt-fg); }

.rt-live { width: 8px; height: 8px; border-radius: 50%; background: #e53935; flex: 0 0 auto; opacity: .5; }
.rt-player[data-state="playing"] .rt-live { opacity: 1; animation: rt-pulse 1.6s ease-in-out infinite; }
@keyframes rt-pulse { 50% { opacity: .35; } }

.rt-player__volume { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; color: var(--rt-muted); margin: 0; }
.rt-player__volume input { width: 96px; accent-color: var(--rt-accent); }

/* Barra di caricamento della navigazione continua */
.rt-progress {
	position: absolute;
	top: 0;
	left: 0;
	height: 2px;
	width: 0;
	background: var(--rt-accent);
	opacity: 0;
	transition: width .3s ease, opacity .3s ease;
}
html.rt-navigating .rt-progress { width: 70%; opacity: 1; transition: width 4s cubic-bezier(.1, .7, .2, 1); }

@media (max-width: 767px) {
	.rt-player { gap: 10px; padding: 0 10px; }
	.rt-player__volume { display: none; } /* sul telefono si usa il volume del dispositivo */
	.rt-player__status { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.rt-live, .rt-spinner { animation: none !important; }
}

/* Pulsante grande [radiotalpa_ascolta] e qualsiasi elemento con classe rt-play */
.rt-play { cursor: pointer; }
.rt-play-big {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 14px 26px 14px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--e-global-color-accent, #64c9d9);
	color: #111;
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.rt-play-big__icon {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 10px 0 10px 16px;
	border-color: transparent transparent transparent currentColor;
	margin-left: 6px;
}
.rt-play.is-playing .rt-play-big__icon { border: 0; width: 16px; height: 20px; border-left: 5px solid; border-right: 5px solid; margin-left: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
