/*
 * lite-youtube · Docentes 2.0
 * Estilos de la fachada de YouTube. Extraídos de multimedia.php.
 * Acompaña a /js/lite-youtube.js
 */
.lite-youtube {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    border: 0;
    background: #0b1d26 center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.lite-youtube::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8, 22, 30, .12), rgba(8, 22, 30, .55));
}

.lite-youtube-play {
    position: relative;
    z-index: 2;
    width: 68px;
    height: 48px;
    border-radius: 14px;
    background: #e62117;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .32);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, background .18s ease;
}

.lite-youtube-play::after {
    content: "";
    display: block;
    margin-left: 4px;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}

.lite-youtube:hover .lite-youtube-play,
.lite-youtube:focus .lite-youtube-play {
    transform: scale(1.12);
    background: #ff1f17;
}

.lite-youtube:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 3px;
}

.lite-youtube-title {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .75);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lite-youtube iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .lite-youtube-play { transition: none; }
}

/* Cuando el video arranca solo, sobra el botón de reproducir */
.lite-youtube.is-playing { cursor: default; }
.lite-youtube.is-playing::before,
.lite-youtube.is-playing .lite-youtube-play,
.lite-youtube.is-playing .lite-youtube-title { display: none; }

/* Interruptor de sonido para el arranque automático */
.lite-youtube-sound {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(8, 22, 30, .62);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .18s ease, border-color .18s ease;
}
.lite-youtube-sound:hover { background: rgba(8, 22, 30, .85); border-color: #ffc107; }
.lite-youtube-sound:focus-visible { outline: 3px solid #ffc107; outline-offset: 2px; }
.lite-youtube-sound[aria-pressed="true"] { border-color: #ffc107; color: #ffc107; }
