/**
 * Podcast Embed - iVoox — estilos del front
 * @package PodcastEmbedIvoox
 * @since   1.3.0
 */

.pei-wrapper {
    position: relative;
    width: 100%;
    margin: 1.2em 0;
}

/* ── Portada con botón de reproducción ───────────────────────────── */
.pei-ctl .pei-poster {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background-color: #0f1419;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    -webkit-appearance: none;
    appearance: none;
}

.pei-ctl .pei-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.42) 55%, rgba(0,0,0,.62) 100%);
    transition: background .25s ease;
}

.pei-ctl .pei-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .5);
    transition: transform .2s ease, box-shadow .2s ease;
}

.pei-ctl .pei-play svg {
    margin-left: 3px; /* compensa el triángulo, que pesa a la izquierda */
}

/* Estados */
.pei-ctl .pei-poster:hover .pei-play,
.pei-ctl .pei-poster:focus-visible .pei-play {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 6px 26px rgba(0, 0, 0, .6);
}

.pei-ctl .pei-poster:hover .pei-shade {
    background: linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,.34) 55%, rgba(0,0,0,.56) 100%);
}

.pei-ctl .pei-poster:focus-visible {
    outline: 3px solid #17B3D0;
    outline-offset: 2px;
}

/* ── Aviso bajo la portada ───────────────────────────────────────── */
.pei-ctl .pei-note {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    z-index: 2;
    margin: 0;
    text-align: center;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .78);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    pointer-events: none;
}

.pei-ctl .pei-note a {
    color: rgba(255, 255, 255, .95);
    text-decoration: underline;
    pointer-events: auto;
}

.pei-ctl .pei-note a:hover {
    color: #fff;
}

/* ── Iframe una vez cargado ──────────────────────────────────────── */
.pei-iframe {
    margin: 1.2em 0;
    max-width: 100%;
}

/* ── Pantallas pequeñas ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .pei-ctl .pei-play {
        width: 54px;
        height: 54px;
    }
    .pei-ctl .pei-play svg {
        width: 22px;
        height: 22px;
    }
    .pei-ctl .pei-note {
        font-size: 10px;
        bottom: 6px;
    }
}

/* ── Accesibilidad: menos movimiento ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .pei-ctl .pei-play,
    .pei-ctl .pei-shade {
        transition: none;
    }
    .pei-ctl .pei-poster:hover .pei-play,
    .pei-ctl .pei-poster:focus-visible .pei-play {
        transform: translate(-50%, -50%);
    }
}
