/*
Theme Name:   Onkaos Child
Description:  Child theme de Onkaos-2024
Template:     onkaos-2024
Version:      1.0.0
*/

/* ─── Embed fix ──────────────────────────────────────────────────────────────
   El tema padre usa height:0 + flex:1 en el iframe, que falla en Safari y con
   embeds que tienen wrapper div (Vimeo, YouTube, etc.). Esta implementación
   funciona con cualquier tipo de embed: iframes directos, divs con iframes,
   scripts de terceros, etc.
   
   Estructura HTML esperada:
   .post-embeded
     .post-embeded-caption   (opcional)
     .post-embeded-wrapper   ← aquí va el iframe / código del embed
       iframe / div / etc.
──────────────────────────────────────────────────────────────────────────── */

/* Resetear el display del tema padre que interfiere */
.post-embeded {
    display: flex;
    flex-direction: column;
    gap: var(--unit);
    aspect-ratio: unset;        /* quitar el aspect-ratio del padre */
    width: 100%;
}

/* Caption: tipografía del padre, sin cambios */
.post-embeded-caption {
    font-size: var(--txt-caption);
    line-height: var(--txt-caption-lh);
    font-weight: var(--fw-regular);
    text-align: center;
}

/* El wrapper controla el aspect-ratio — siempre 16:9 */
.post-embeded-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Todo lo que esté dentro del wrapper ocupa el 100% */
.post-embeded-wrapper iframe,
.post-embeded-wrapper video,
.post-embeded-wrapper > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}
