/* ============================================================================
   responsive-fixes.css — Marsland (tenant + public) responsive hardening.
   The Marsland vendor CSS is already richly responsive; this fills the gaps in
   the project's own custom.css (which ships ~0 media queries) and in the tenant
   portal tables. Standard Bootstrap breakpoints; 320px floor.
   ========================================================================== */

/* ---- Media never overflows --------------------------------------------- */
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }

/* ---- Tenant portal: tables scroll inside their box, not the page -------- */
.flex-main-content td,
.flex-main-content th { overflow-wrap: anywhere; }
@media (max-width: 991.98px) {
    .flex-main-content table:not(.table-fixed-ok) {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .flex-main-content table[style*="width"]:not(.table-fixed-ok) { width: 100% !important; }
}

/* ---- Tenant portal: main content stacks under the sidebar on tablet ----- */
@media (max-width: 991.98px) {
    .flex-main-content { display: block; }
    .flex-main-content > * { width: 100%; }
}

/* ---- Modals fit small screens ------------------------------------------- */
@media (max-width: 575.98px) {
    .modal-dialog {
        max-width: calc(100vw - 1rem);
        margin: .5rem auto;
    }
    .modal-body { overflow-x: auto; }
}

/* ---- Very small phones -------------------------------------------------- */
@media (max-width: 375px) {
    .section-padding { padding-top: 40px !important; padding-bottom: 40px !important; }
    .container, .container-fluid { padding-left: .75rem; padding-right: .75rem; }
}
