/* RCA Player – Rádio Clube de Arganil */
.rca-player {
	--rca-accent: #d7262b;
	--rca-bg: #15171c;
	--rca-bg2: #22252d;
	--rca-text: #ffffff;
	--rca-muted: #a9adb8;
	box-sizing: border-box;
	position: relative;
	width: 100%;
	max-width: 560px;
	margin: 0 auto 1.5em;
	padding: 18px;
	border-radius: 18px;
	background: linear-gradient(135deg, var(--rca-bg2), var(--rca-bg));
	color: var(--rca-text);
	font-family: inherit;
	line-height: 1.3;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	overflow: hidden;
}
.rca-player *, .rca-player *::before, .rca-player *::after { box-sizing: border-box; }

.rca-main { display: flex; align-items: center; gap: 16px; }

.rca-cover {
	flex: 0 0 auto;
	width: 72px; height: 72px;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}
.rca-cover img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border: 0; }

.rca-info { flex: 1 1 auto; min-width: 0; transition: opacity .25s; }
.rca-changing .rca-info { opacity: 0; }

.rca-live {
	display: flex; align-items: center; gap: 6px;
	font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--rca-accent);
	margin-bottom: 4px;
}
.rca-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rca-accent); }
.rca-player[data-state="playing"] .rca-dot { animation: rca-pulse 1.6s infinite; }

.rca-eq { display: none; align-items: flex-end; gap: 2px; height: 11px; margin-left: 2px; }
.rca-eq i { display: block; width: 3px; height: 100%; background: var(--rca-accent); transform-origin: bottom; animation: rca-eq .9s ease-in-out infinite; }
.rca-eq i:nth-child(2) { animation-delay: -.3s; }
.rca-eq i:nth-child(3) { animation-delay: -.6s; }
.rca-eq i:nth-child(4) { animation-delay: -.15s; }
.rca-player[data-state="playing"] .rca-eq { display: inline-flex; }

.rca-title-wrap { overflow: hidden; white-space: nowrap; }
.rca-title { display: inline-block; font-size: 18px; font-weight: 700; color: var(--rca-text); }
.rca-title.rca-scroll { animation: rca-marquee var(--rca-dur, 8s) ease-in-out infinite alternate; }
.rca-artist { margin-top: 2px; font-size: 14px; color: var(--rca-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Botão play */
.rca-play {
	position: relative; flex: 0 0 auto;
	width: 60px; height: 60px; padding: 0; margin: 0;
	border: 0; border-radius: 50%;
	background: var(--rca-accent); color: #fff;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	transition: transform .15s, filter .15s;
}
.rca-play:hover { transform: scale(1.06); filter: brightness(1.08); }
.rca-play:focus-visible, .rca-mute:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.rca-play svg { width: 28px; height: 28px; fill: currentColor; }
.rca-i-pause, .rca-spin { display: none; }
.rca-player[data-state="playing"] .rca-i-play,
.rca-player[data-state="loading"] .rca-i-play { display: none; }
.rca-player[data-state="playing"] .rca-i-pause { display: block; }
.rca-player[data-state="loading"] .rca-spin {
	display: block; position: absolute; inset: 0;
	border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%;
	animation: rca-spin .8s linear infinite;
}
.rca-player[data-state="loading"] .rca-play::after {
	content: ""; width: 12px; height: 12px; border-radius: 2px; background: #fff;
}

/* Volume */
.rca-controls { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.rca-mute {
	flex: 0 0 auto; width: 32px; height: 32px; padding: 4px; margin: 0;
	border: 0; border-radius: 8px; background: transparent; color: var(--rca-muted); cursor: pointer;
}
.rca-mute:hover { color: var(--rca-text); background: rgba(255, 255, 255, .08); }
.rca-mute svg { width: 100%; height: 100%; fill: currentColor; }
.rca-i-muted { display: none; }
.rca-is-muted .rca-i-vol { display: none; }
.rca-is-muted .rca-i-muted { display: block; }

.rca-vol {
	-webkit-appearance: none; appearance: none;
	flex: 0 1 140px; height: 4px; margin: 0; padding: 0;
	border-radius: 4px; background: rgba(255, 255, 255, .2); cursor: pointer; border: 0;
}
.rca-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--rca-accent); border: 0; }
.rca-vol::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--rca-accent); border: 0; }
.rca-msg { font-size: 13px; color: #ffb4b4; }

/* Últimas músicas */
.rca-recent { margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; }
.rca-recent summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--rca-muted); list-style: revert; }
.rca-recent summary:hover { color: var(--rca-text); }
.rca-recent ol { list-style: none; margin: 8px 0 0; padding: 0; }
.rca-recent li { display: flex; gap: 10px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, .06); margin: 0; }
.rca-recent li:last-child { border-bottom: 0; }
.rca-recent time { flex: 0 0 auto; color: var(--rca-accent); font-variant-numeric: tabular-nums; }
.rca-recent span { color: var(--rca-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rca-recent .rca-empty { color: var(--rca-muted); }

/* Barra fixa no fundo */
.rca-player.rca-fixo {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
	max-width: none; margin: 0; padding: 10px 16px;
	border-radius: 0;
	display: flex; align-items: center; gap: 16px;
}
.rca-fixo .rca-main { flex: 1 1 auto; min-width: 0; }
.rca-fixo .rca-cover { width: 52px; height: 52px; border-radius: 8px; }
.rca-fixo .rca-play { width: 48px; height: 48px; order: -1; }
.rca-fixo .rca-controls { margin: 0; flex: 0 0 auto; }
.rca-fixo .rca-title { font-size: 16px; }
body.rca-has-fixo { padding-bottom: 80px; }

@media (max-width: 480px) {
	.rca-player { padding: 14px; border-radius: 14px; }
	.rca-cover { width: 56px; height: 56px; }
	.rca-title { font-size: 16px; }
	.rca-play { width: 52px; height: 52px; }
	.rca-fixo .rca-controls { display: none; }
}

@keyframes rca-pulse { 0% { box-shadow: 0 0 0 0 rgba(215, 38, 43, .7); } 70% { box-shadow: 0 0 0 7px rgba(215, 38, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(215, 38, 43, 0); } }
@keyframes rca-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes rca-spin { to { transform: rotate(360deg); } }
@keyframes rca-marquee { 0%, 15% { transform: translateX(0); } 85%, 100% { transform: translateX(var(--rca-shift, 0)); } }

@media (prefers-reduced-motion: reduce) {
	.rca-player *, .rca-player *::before, .rca-player *::after { animation: none !important; transition: none !important; }
	.rca-title-wrap { text-overflow: ellipsis; }
}
