/* ─────────────────────────────────────────────
 * MW Branded Image Widget
 * ───────────────────────────────────────────── */

.mw-branded-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Image — fills the widget width, vertically centred by the
   padding set on the wrapper via the Elementor control.       */
.mw-branded-image__img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
    object-fit: cover;
}

/* SVG pattern overlay — covers the entire widget (media + padding). */
.mw-branded-image__pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Self-hosted video — matches the image styling */
.mw-branded-image__video {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
    object-fit: cover;
}

/* oEmbed wrapper — responsive 16:9 for YouTube / Vimeo etc. */
.mw-branded-image__embed-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    z-index: 1;
}

/* Target the iframe that wp_oembed_get() generates */
.mw-branded-image__embed-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Link wrapper ── */
.mw-branded-image__link {
    display: block;
    position: relative;
    z-index: 1;
    text-decoration: none;
    color: inherit;
}

/* ── Play icon overlay ── */
.mw-branded-image__play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: color-mix(in srgb, var(--mw-bi-play-bg, #2F31FC) 85%, transparent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    z-index: 3;
    transition: transform 0.25s ease, background-color 0.25s ease;
    pointer-events: none;
}

.mw-branded-image__play-icon svg {
    width: 24px;
    height: 24px;
    margin-left: 2px;
    fill: currentColor;
}

.mw-branded-image__link:hover .mw-branded-image__play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--mw-bi-play-bg, #2F31FC);
}

/* ── Pill variant (with text) ── */
.mw-branded-image__play-icon--pill {
    width: auto;
    height: auto;
    border-radius: 100px;
    padding: 14px 28px 14px 22px;
    gap: 10px;
}

.mw-branded-image__play-icon--pill svg {
    width: 18px;
    height: 18px;
    margin-left: 0;
    flex-shrink: 0;
}

.mw-branded-image__play-text {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1;
}

/* Let the widget fill the parent column/container height. */
.elementor-widget-mw_branded_image,
.elementor-widget-mw_branded_image > .elementor-widget-container {
    height: 100%;
}
