/**
 * Promo image card look for coded single.
 * Sticky positioning is owned by .mme-blog-single__promo-sticky in blog-single.css.
 */

body.mme-blog-single-body .mme-blog-sidebar-promo,
body.mme-blog-single-body .mme-blog-sidebar-promo--single,
body.mme-blog-single-body .mme-blog-sidebar-promo--widget {
    margin: 0;
    padding: 0;
    width: 100%;
}

body.mme-blog-single-body .mme-blog-sidebar-promo__sticky {
    position: static;
    width: 100%;
}

body.mme-blog-single-body .mme-blog-sidebar-promo__link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e2;
    box-shadow: 0 1px 3px rgb(26 35 50 / 6%);
}

body.mme-blog-single-body a.mme-blog-sidebar-promo__link:hover {
    box-shadow: 0 6px 18px rgb(26 35 50 / 12%);
}

body.mme-blog-single-body .mme-blog-sidebar-promo__img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

#mme-blog-sidebar-promo-source {
    display: none !important;
}

/* Shared promo card look on Elementor / classic singles */
body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo,
body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo--single {
    margin: 0;
    padding: 0;
    width: 100%;
}

body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo__sticky {
    position: static;
    width: 100%;
}

body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo__link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e2;
    box-shadow: 0 1px 3px rgb(26 35 50 / 6%);
}

body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo__img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Preferred: promo inside Elementor sidebar column (no 3rd column) — not sticky */
body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo-host--in-sidebar {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    margin: 0 0 1.25rem;
    padding: 0;
    height: fit-content !important;
    position: static !important;
    top: auto !important;
    z-index: 1;
    align-self: stretch;
}

body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-promo-sidebar-col {
    overflow: visible !important;
}

/* Fallback: sibling column when Elementor has no sidebar container — not sticky */
body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo-host:not(.mme-blog-sidebar-promo-host--in-sidebar) {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    flex: 0 0 280px !important;
    width: 280px !important;
    max-width: 280px !important;
    min-width: 280px !important;
    min-height: 0 !important;
    height: fit-content !important;
    align-self: flex-start !important;
    position: static !important;
    top: auto !important;
    z-index: 1;
}

body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-promo-overflow-fix {
    overflow: visible !important;
}

/* Keep Elementor article readable — avoid edge-to-edge stretch */
body.single-post.mme-blog-elementor-keep .elementor,
body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .elementor {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

body.single-post.mme-blog-elementor-keep .wd-col-content-md-sm,
body.single-post.mme-blog-elementor-keep .wd-col-content-sm,
body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .wd-col-content-md-sm,
body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .wd-col-content-sm {
    max-width: 720px;
}

@media (max-width: 991px) {
    body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo-host--in-sidebar {
        position: static !important;
        top: auto !important;
        margin: 0 0 1rem;
        max-width: 360px;
    }

    body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .mme-blog-sidebar-promo-host:not(.mme-blog-sidebar-promo-host--in-sidebar) {
        position: static !important;
        top: auto !important;
        width: 100% !important;
        max-width: 360px !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
        margin: 1.25rem auto 0;
    }

    body.single-post.mme-blog-elementor-keep .wd-col-content-md-sm,
    body.single-post.mme-blog-elementor-keep .wd-col-content-sm,
    body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .wd-col-content-md-sm,
    body.single-post.mme-has-blog-promo:not(.mme-blog-single-body) .wd-col-content-sm {
        max-width: none;
    }
}
