/* Radio Manila Player */

/* Azzera wrapper Elementor/tema che contengono direttamente il player */
.elementor-widget-container:has(> .rmp-player),
.elementor-shortcode:has(> .rmp-player),
.wp-block-shortcode:has(> .rmp-player),
p:has(> .rmp-player) {
	background: transparent !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
}

.rmp-player {
	--rmp-blue: #55AAE2;
	--rmp-blue-hover: #55AAE2;
	--rmp-white: #ffffff;
	--rmp-width: 296px;
	--rmp-font-size: 24px;
	display: inline-flex;
	flex-direction: column;
	align-items: stretch;
	vertical-align: middle;
	max-width: 100%;
	line-height: 1;
}

/* Reset aggressivo: i temi stilizzano tutti i <button>.
   Specificità alzata (.rmp-player .rmp-button) + !important sui font. */
.rmp-player .rmp-button,
.rmp-player .rmp-button:hover,
.rmp-player .rmp-button:focus,
.rmp-player .rmp-button:active {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 12px;
	box-sizing: border-box !important;
	width: var(--rmp-width) !important;
	max-width: 100% !important;
	background: var(--rmp-blue) !important;
	background-image: none !important;
	color: var(--rmp-white) !important;
	opacity: 1 !important;
	filter: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	outline: 0 !important;
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 16px 24px !important;
	font-family: 'Montserrat', Arial, sans-serif !important;
	font-size: var(--rmp-font-size) !important;
	font-weight: 700 !important;
	font-style: normal !important;
	letter-spacing: 0 !important;
	line-height: 1 !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .15s ease;
}

.rmp-player .rmp-button:hover,
.rmp-player .rmp-button:focus-visible { background: var(--rmp-blue-hover) !important; }
.rmp-player .rmp-button:focus-visible { outline: 2px solid var(--rmp-blue) !important; outline-offset: 2px !important; }

.rmp-player .rmp-text { color: inherit; font: inherit; }

.rmp-icon-wrap {
	display: inline-flex;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.rmp-icon { width: 100%; height: 100%; display: none; }
.rmp-icon-play { display: block; }

.rmp-player.is-playing .rmp-icon-play  { display: none; }
.rmp-player.is-playing .rmp-icon-pause { display: block; }

.rmp-player.is-loading .rmp-icon {
	animation: rmp-pulse 1s ease-in-out infinite;
}

@keyframes rmp-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: .35; }
}

/* Volume opzionale (shortcode volume="si"), visibile solo in riproduzione */
.rmp-volume-wrap {
	display: none;
	align-items: center;
	gap: 12px;
	padding: 14px 18px 0;
	color: var(--rmp-blue);
	box-sizing: border-box;
}
.rmp-player.is-playing .rmp-volume-wrap { display: flex; }

.rmp-volume-icon { width: 22px; height: 22px; flex-shrink: 0; }

.rmp-player .rmp-volume {
	flex: 1;
	min-width: 0;
	width: 100%;
	height: 4px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 2px;
	-webkit-appearance: none;
	appearance: none;
	background: linear-gradient(to right, var(--rmp-blue) var(--rmp-fill, 80%), rgba(85, 170, 226, .3) var(--rmp-fill, 80%));
	cursor: pointer;
	outline: 0;
}
.rmp-player .rmp-volume::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.rmp-player .rmp-volume::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 18px; height: 18px; margin-top: -7px;
	border-radius: 50%;
	background: var(--rmp-blue);
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--rmp-blue);
}
.rmp-player .rmp-volume::-moz-range-track { height: 4px; background: transparent; }
.rmp-player .rmp-volume::-moz-range-thumb {
	width: 14px; height: 14px;
	border-radius: 50%;
	background: var(--rmp-blue);
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--rmp-blue);
}

/* Mobile: stesso breakpoint di Elementor (font 20px) */
@media (max-width: 767px) {
	.rmp-player { --rmp-font-size: 20px; }
}

/* Tablet e mobile: pulsante a larghezza intera (breakpoint tablet Elementor = 1024px).
   Nota: se nello shortcode usi width="...", quel valore ha la precedenza. */
@media (max-width: 1024px) {
	.rmp-player {
		display: flex;
		width: 100%;
		--rmp-width: 100%;
	}
}

/* Il widget Elementor che contiene il player deve occupare tutta la riga
   (nei container flex con align-items:center altrimenti si restringe). */
@media (max-width: 1024px) {
	.elementor-widget:has(.rmp-player),
	.elementor-widget:has(.rmp-player) > .elementor-widget-container,
	.elementor-widget:has(.rmp-player) .elementor-shortcode {
		width: 100% !important;
		max-width: 100% !important;
		align-self: stretch !important;
	}
}

/* Larghezza intera su qualsiasi dispositivo: shortcode con full="si" */
.rmp-player.rmp-full {
	display: flex;
	width: 100%;
	--rmp-width: 100%;
}
.elementor-widget:has(.rmp-full),
.elementor-widget:has(.rmp-full) > .elementor-widget-container,
.elementor-widget:has(.rmp-full) .elementor-shortcode {
	width: 100% !important;
	max-width: 100% !important;
	align-self: stretch !important;
}
