/**
 * Podcast RSS Player - estilos del widget compacto (estilo "mini player").
 */

.prp-podcast-player {
	max-width: 420px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Contenedor general con fondo y esquinas redondeadas */
.prp-shell {
	background: #f5f6f8;
	border-radius: 20px;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	transition: opacity .2s ease;
}

/* Fila principal: portada, info, controles */
.prp-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
}

.prp-cover {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #dde0e4;
	flex-shrink: 0;
	object-fit: cover;
	display: block;
}

.prp-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.prp-title {
	font-size: 14px;
	font-weight: 700;
	color: #16181c;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

.prp-progress-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.prp-progress-bar {
	position: relative;
	flex: 1 1 auto;
	height: 4px;
	background: #e1e3e8;
	border-radius: 2px;
	cursor: pointer;
}

.prp-progress-bar::before {
	/* aumenta el área clicable sin agrandar visualmente la barra */
	content: "";
	position: absolute;
	top: -8px;
	left: 0;
	right: 0;
	bottom: -8px;
}

.prp-progress-fill {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 0%;
	background: #12b76a;
	border-radius: 2px;
	transition: width .15s linear;
}

.prp-time {
	font-size: 12px;
	color: #9aa1a9;
	white-space: nowrap;
	flex-shrink: 0;
	min-width: 34px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.prp-controls {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.prp-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0;
	color: #7a8088;
	border-radius: 50%;
}

.prp-btn:focus-visible {
	outline: 2px solid #12b76a;
	outline-offset: 2px;
}

.prp-play-btn {
	width: 40px;
	height: 40px;
	background: #12b76a;
	color: #fff;
	box-shadow: 0 2px 6px rgba(18, 183, 106, .45);
}

.prp-play-btn:hover {
	background: #0fa25e;
}

.prp-play-btn svg {
	width: 16px;
	height: 16px;
}

.prp-expand-btn,
.prp-close-btn {
	width: 30px;
	height: 30px;
}

.prp-expand-btn:hover,
.prp-close-btn:hover {
	background: rgba(0, 0, 0, .05);
}

.prp-expand-btn svg,
.prp-close-btn svg {
	width: 18px;
	height: 18px;
	transition: transform .2s ease;
}

.prp-expand-btn.is-open svg {
	transform: rotate(180deg);
}

/* Panel expandible con la descripción del episodio */
.prp-expanded-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height .25s ease, padding .25s ease;
}

.prp-expanded-panel.is-open {
	max-height: 240px;
	padding: 0 16px 14px 76px;
}

.prp-description {
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.45;
	color: #565c66;
}

.prp-download-link {
	font-size: 12px;
	font-weight: 600;
	color: #12b76a;
	text-decoration: none;
}

.prp-download-link:hover {
	text-decoration: underline;
}

/* Oculta el audio/Plyr real; solo se usa como motor de reproducción */
.prp-native-audio-wrap {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.prp-message {
	font-style: italic;
	color: #666;
	padding: 12px 16px;
}

.prp-error {
	color: #b32d2e;
}

/* Variante flotante, fija en la parte inferior del viewport (footer global).
   Nace oculta y se revela con la clase .is-visible (agregada por JS al
   detectar scroll hacia abajo). */
.prp-podcast-player--sticky {
	position: fixed;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%) translateY(16px);
	width: calc(100% - 32px);
	max-width: 460px;
	z-index: 99999;
	/* deja espacio para áreas seguras en móviles (notch / gesture bar) */
	padding-bottom: env(safe-area-inset-bottom, 0);

	opacity: 0;
	pointer-events: none;
	transition: opacity .3s ease, transform .3s ease;
}

.prp-podcast-player--sticky.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

.prp-podcast-player--sticky .prp-shell {
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.prp-podcast-player--sticky .prp-expanded-panel.is-open {
	padding-left: 16px;
}

@media (max-width: 480px) {
	.prp-podcast-player--sticky {
		width: calc(100% - 20px);
		bottom: 10px;
	}
}
