/* Reproductor de audio · Una Vida de Luz */
.uvdl-ap {
	--ap-bg1: #2f241b; --ap-bg2: #4a3728; --ap-accent: #C9A96E; --ap-accent-2: #a8864f; --ap-text: #F6EFE4; --ap-dim: #cdbb9f;
	--ap-track: rgba(255, 255, 255, .16); --ap-btn: rgba(255, 255, 255, .06); --ap-btn-b: rgba(255, 255, 255, .16);
	position: relative; max-width: 560px; margin: 24px auto; border-radius: 28px; overflow: hidden; isolation: isolate;
	background: radial-gradient(120% 140% at 12% 0%, rgba(201, 169, 110, .26), transparent 55%), linear-gradient(155deg, var(--ap-bg2) 0%, var(--ap-bg1) 70%);
	box-shadow: 0 24px 50px -24px rgba(47, 36, 27, .65), 0 2px 8px rgba(47, 36, 27, .12);
	font-family: Quicksand, "Segoe UI", system-ui, sans-serif; color: var(--ap-text);
}
.uvdl-ap.is-light {
	--ap-bg1: #F7F1E7; --ap-bg2: #ffffff; --ap-accent: #C9A96E; --ap-accent-2: #8a6a3a; --ap-text: #3b2c20; --ap-dim: #8a7358;
	--ap-track: rgba(74, 55, 40, .14); --ap-btn: #fff; --ap-btn-b: rgba(201, 169, 110, .5);
	border: 1px solid rgba(201, 169, 110, .45);
	box-shadow: 0 20px 44px -28px rgba(74, 55, 40, .5);
}
.uvdl-ap *, .uvdl-ap *::before, .uvdl-ap *::after { box-sizing: border-box; }
.uvdl-ap button { font: inherit; margin: 0; padding: 0; line-height: 1; text-transform: none; letter-spacing: 0; min-height: 0; }
.uvdl-ap svg { display: block; }

.uvdl-ap__viz { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 74px; display: block; opacity: .5; pointer-events: none; z-index: 0; }
.uvdl-ap.is-light .uvdl-ap__viz { opacity: .35; }
.uvdl-ap__content { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; padding: 22px 24px 20px; }

/* Portada */
.uvdl-ap__art { position: relative; flex: none; width: 112px; height: 112px; border-radius: 18px; }
.uvdl-ap__ring {
	--ap-angle: 0deg;
	position: absolute; inset: -6px; border-radius: 22px; padding: 2px; opacity: 0; transition: opacity .4s ease; pointer-events: none;
	background: conic-gradient(from var(--ap-angle), var(--ap-accent), transparent 30%, transparent 70%, var(--ap-accent));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
	animation: uvdl-ap-spin 6s linear infinite;
}
.uvdl-ap.is-playing .uvdl-ap__ring { opacity: 1; }
/* Gira solo el brillo del borde (el marco queda quieto). */
@property --ap-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes uvdl-ap-spin { to { --ap-angle: 360deg; } }
.uvdl-ap .uvdl-ap__cover { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 18px !important; display: block; box-shadow: 0 10px 22px rgba(0, 0, 0, .3); transition: filter .35s ease, opacity .35s ease; }
.uvdl-ap__cover--empty { display: grid !important; place-items: center; background: linear-gradient(145deg, #e9d6ad, #a8864f); color: #fff; font-size: 38px; }
.uvdl-ap__art:hover .uvdl-ap__cover { filter: brightness(.62); }
.uvdl-ap .uvdl-ap__overlay { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: 18px; cursor: pointer; color: #fff; opacity: 0; transition: opacity .25s ease; }
.uvdl-ap__art:hover .uvdl-ap__overlay, .uvdl-ap__overlay:focus-visible { opacity: 1; }
.uvdl-ap__overlay svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
/* YouTube: el video se muestra en la portada mientras suena */
.uvdl-ap__yt { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; background: #000; opacity: 0; transition: opacity .35s ease; }
.uvdl-ap__yt iframe, .uvdl-ap__yt > div { position: absolute; top: 50%; left: 50%; width: 178%; height: 100%; transform: translate(-50%, -50%); border: 0; pointer-events: none; }
.uvdl-ap.is-yt.has-started .uvdl-ap__yt { opacity: 1; }
.uvdl-ap.is-yt.has-started .uvdl-ap__cover { opacity: 0; }
.uvdl-ap.is-yt.has-started .uvdl-ap__overlay { background: rgba(0, 0, 0, .001); }

/* Textos */
.uvdl-ap__info { flex: 1; min-width: 0; }
.uvdl-ap .uvdl-ap__title { margin: 0 0 3px; padding: 0; font: 600 18px/1.3 Quicksand, sans-serif; letter-spacing: .2px; color: var(--ap-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uvdl-ap .uvdl-ap__sub { margin: 0 0 14px; padding: 0; font: 500 13px/1.4 Quicksand, sans-serif; color: var(--ap-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Barra de avance */
.uvdl-ap__progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.uvdl-ap__time { flex: none; width: 40px; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--ap-dim); }
.uvdl-ap__time.is-end { text-align: right; }
.uvdl-ap__progress { position: relative; flex: 1; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; outline: none; }
.uvdl-ap__track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: var(--ap-track); }
.uvdl-ap__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--ap-accent-2), var(--ap-accent)); }
.uvdl-ap__handle { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--ap-accent); box-shadow: 0 0 0 4px rgba(201, 169, 110, .22); transform: translate(-50%, -50%); opacity: 0; transition: opacity .2s ease; }
.uvdl-ap__progress:hover .uvdl-ap__handle, .uvdl-ap__progress.is-dragging .uvdl-ap__handle, .uvdl-ap__progress:focus-visible .uvdl-ap__handle { opacity: 1; }

/* Botones */
.uvdl-ap__controls { display: flex; align-items: center; gap: 14px; }
.uvdl-ap .uvdl-ap__main {
	flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(145deg, #e3c995, var(--ap-accent) 45%, var(--ap-accent-2)); color: #2f241b;
	box-shadow: 0 8px 18px -6px rgba(168, 134, 79, .75); transition: transform .15s ease;
}
.uvdl-ap.is-light .uvdl-ap__main { background: #4a3728; color: #F6EFE4; box-shadow: 0 8px 18px -8px rgba(74, 55, 40, .8); }
.uvdl-ap .uvdl-ap__main:hover { transform: scale(1.06); }
.uvdl-ap .uvdl-ap__main:active { transform: scale(.94); }
.uvdl-ap.is-playing .uvdl-ap__main { animation: uvdl-ap-pulse 2.2s ease-in-out infinite; }
@keyframes uvdl-ap-pulse { 50% { box-shadow: 0 8px 24px -2px rgba(201, 169, 110, .8); } }
.uvdl-ap__main svg { width: 20px; height: 20px; }
.uvdl-ap .uvdl-ap__btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ap-btn-b); background: var(--ap-btn); color: var(--ap-text); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s ease, transform .15s ease; }
.uvdl-ap .uvdl-ap__btn:hover { background: rgba(201, 169, 110, .22); }
.uvdl-ap .uvdl-ap__btn:active { transform: scale(.92); }
.uvdl-ap__btn svg { width: 16px; height: 16px; }
.uvdl-ap .uvdl-ap__btn.is-mute { margin-left: auto; }
.uvdl-ap button:focus-visible { outline: 2px solid var(--ap-accent); outline-offset: 2px; }
.uvdl-ap .i-pause, .uvdl-ap .i-off { display: none; }
.uvdl-ap.is-playing .i-play { display: none; }
.uvdl-ap.is-playing .i-pause { display: block; }
.uvdl-ap.is-muted .i-on { display: none; }
.uvdl-ap.is-muted .i-off { display: block; }
.uvdl-ap.is-loading .uvdl-ap__main { opacity: .7; }
.uvdl-ap__error { position: relative; z-index: 1; margin: -6px 24px 16px; font-size: 12px; color: var(--ap-dim); }

/* Celular */
@media (max-width: 520px) {
	.uvdl-ap { border-radius: 24px; }
	.uvdl-ap__content { flex-direction: column; text-align: center; gap: 18px; padding: 26px 18px 20px; }
	.uvdl-ap__art { width: 150px; height: 150px; }
	.uvdl-ap .uvdl-ap__title, .uvdl-ap .uvdl-ap__sub { white-space: normal; }
	.uvdl-ap__info { width: 100%; }
	.uvdl-ap__controls { justify-content: center; }
	.uvdl-ap .uvdl-ap__btn.is-mute { margin-left: 0; }
	.uvdl-ap__overlay { opacity: 0 !important; }
	.uvdl-ap__viz { height: 96px; }
}
@media (prefers-reduced-motion: reduce) {
	.uvdl-ap__ring, .uvdl-ap.is-playing .uvdl-ap__main { animation: none; }
}
