/* Gray Audio — beeld of video bij een tekstwidget (zie inc/elementor/gx-media.php) */

.gx-mfig {
    margin: 0;
    width: 100%;
}

.gx-mfig__frame {
    border-radius: var(--gx-radius);
    aspect-ratio: 4 / 3;
}

.gx-mfig--portrait .gx-mfig__frame { aspect-ratio: 4 / 5; }
.gx-mfig--square .gx-mfig__frame { aspect-ratio: 1 / 1; }
.gx-mfig--wide .gx-mfig__frame { aspect-ratio: 16 / 9; }

/* Dubbele klasse: Elementor zet anders height:auto op elke img. */
.gx-mfig__frame .gx-mfig__img,
.gx-mfig__frame .gx-mfig__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--focus, 50% 50%);
}

.gx-mfig__frame .gx-mfig__video {
    opacity: 0;
    transition: opacity var(--gx-slow) var(--gx-ease);
}

.gx-mfig__frame .gx-mfig__video.is-playing {
    opacity: 1;
}

.gx-mfig__toggle {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(14, 14, 15, 0.45);
    color: var(--gx-white);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: border-color var(--gx-fast) var(--gx-ease), background-color var(--gx-fast) var(--gx-ease);
}

.gx-mfig__toggle[hidden] {
    display: none;
}

.gx-mfig__toggle:hover,
.gx-mfig__toggle:focus-visible {
    border-color: var(--gx-white);
    background: rgba(14, 14, 15, 0.7);
}

.gx-mfig__toggle .gx-icon {
    width: 15px;
    height: 15px;
}

.gx-mfig__toggle .gx-icon--play {
    fill: currentColor;
}

.gx-mfig__toggle-play,
.gx-mfig__toggle[aria-pressed="true"] .gx-mfig__toggle-pause {
    display: none;
}

.gx-mfig__toggle[aria-pressed="true"] .gx-mfig__toggle-play {
    display: inline-flex;
}

.gx-mfig__caption {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    font-size: 0.8125rem;
    color: var(--gx-slate);
}

.gx-mfig__caption::before {
    content: "";
    width: 22px;
    height: 1px;
    flex: none;
    background: currentColor;
}

.gx--navy .gx-mfig__caption,
.gx--deep .gx-mfig__caption {
    color: var(--gx-slate-300);
}

.gx--navy .gx-mfig__frame,
.gx--deep .gx-mfig__frame {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
