/* Shared small-screen layout.
   Loaded after each shell's theme so one rule covers every page.
   Utilities that already use !important are overridden only where noted. */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
video,
canvas {
    max-width: 100%;
}

.modal-backdrop,
.offcanvas-backdrop,
.modal-fullscreen {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 575.98px) {
    .modal-fullscreen-sm-down { width: 100%; max-width: 100%; }
}

@media (max-width: 767.98px) {
    .modal-fullscreen-md-down { width: 100%; max-width: 100%; }
}

@media (max-width: 991.98px) {
    .modal-fullscreen-lg-down { width: 100%; max-width: 100%; }
}

@media (max-width: 1199.98px) {
    .modal-fullscreen-xl-down { width: 100%; max-width: 100%; }
}

@media (max-width: 1399.98px) {
    .modal-fullscreen-xxl-down { width: 100%; max-width: 100%; }
}

.table-responsive {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="file"]),
    select,
    textarea,
    .form-control,
    .form-select {
        font-size: 16px;
    }

    .modal-dialog {
        width: auto;
        max-width: calc(100% - 1rem);
        margin-right: auto;
        margin-left: auto;
    }

    .dropdown-menu {
        max-width: calc(100vw - 1rem);
    }

    .container,
    .container-fluid,
    .container-xxl {
        max-width: 100%;
    }
}

/* Jobzio width utilities are !important, so the mobile override has to be too. */
@media (max-width: 575.98px) {
    .w-200px,
    .minw-200px {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
    }
}

/* Admin shell (Frest): stack cramped headers and hide the theme customizer. */
@media (max-width: 1199.98px) {
    #template-customizer,
    .template-customizer-open-btn {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .layout-wrapper .card-header.d-flex {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .layout-wrapper .card-header .card-title {
        white-space: normal;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .layout-wrapper .card-header > .d-flex {
        flex-wrap: wrap;
        width: 100%;
    }

    .layout-wrapper .btn-group {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }

    .layout-wrapper .btn-group > .btn {
        flex: 1 1 auto;
    }

    .layout-wrapper .container-p-y {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .layout-wrapper select.form-select {
        min-width: 0;
        max-width: 100%;
    }
}
