/* Bootstrap's percentage width can follow the LP's overflowing layout viewport. */
@media (max-width: 1024px) {
    #top-sect11 .modal[id^="modal-sect-"] {
        width: 100vw;
        max-width: 100vw;
        left: 0;
        right: auto;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    #top-sect11 .modal[id^="modal-sect-"] .modal-dialog {
        max-width: min(500px, calc(100vw - 1rem));
        margin-left: auto;
        margin-right: auto;
        margin-top: calc(clamp(24px, 5vh, 48px) + env(safe-area-inset-top, 0px));
        margin-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    #top-sect11 .modal[id^="modal-sect-"] .modal-content {
        min-width: 0;
        max-width: 100%;
    }

    #top-sect11 .modal[id^="modal-sect-"] .modal-body {
        min-width: 0;
        overflow-x: auto;
    }

    #top-sect11 .modal[id^="modal-sect-"] .modal-header .close {
        flex-shrink: 0;
    }
}

/* Only the two revenue graphs: stack their existing 50% Elementor columns. */
#top-sect11 #modal-sect-02-4 .modal-dialog {
    max-width: min(560px, calc(100vw - 1rem));
}

#modal-sect-02-4 .elementor-element-34a09c8c > .elementor-container {
    flex-direction: column;
}

#modal-sect-02-4 .elementor-element-34a09c8c > .elementor-container > .elementor-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 0 0 auto;
}

#modal-sect-02-4 .elementor-element-34a09c8c img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}
