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

body {
    min-width: 320px;
}

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

.main-content {
    min-width: 0;
}

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

.row {
    min-width: 0;
}

.card,
.card-body,
.modal-content,
.tab-content {
    min-width: 0;
}

.table-responsive,
.fixed-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    vertical-align: middle;
}

.table th,
.table td {
    white-space: nowrap;
}

.table td .btn,
.bootstrap-table .btn {
    white-space: nowrap;
}

.form-control,
.form-select,
.bootstrap-select,
.bootstrap-select > .dropdown-toggle,
.input-group,
.input-group-text {
    max-width: 100%;
}

.input-group {
    flex-wrap: nowrap;
}

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

.modal-dialog {
    max-width: calc(100vw - 1rem);
}

.modal-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#contenedorMapaGoogle {
    min-height: 320px;
}

@media (max-width: 991.98px) {
    body {
        overflow-x: hidden;
    }

    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 .75rem;
    }

    .main-content > .container-fluid,
    .main-content > .container {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }

    .navbar-main {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .sidenav {
        max-width: min(17rem, calc(100vw - 3rem));
    }

    .card {
        margin-left: 0;
        margin-right: 0;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .nav-tabs,
    .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .25rem;
    }

    .nav-tabs .nav-link,
    .nav-pills .nav-link {
        white-space: nowrap;
    }

    .btn {
        min-height: 38px;
    }

    .btn:not(.btn-icon-only) {
        white-space: normal;
    }

    .d-flex.gap-2,
    .d-flex.gap-3,
    .btn-group,
    .fixed-table-toolbar {
        flex-wrap: wrap;
    }

    .fixed-table-toolbar .columns,
    .fixed-table-toolbar .search,
    .fixed-table-toolbar .bs-bars,
    .fixed-table-pagination,
    .fixed-table-pagination .pagination-detail,
    .fixed-table-pagination .pagination {
        float: none !important;
        width: 100%;
    }

    .fixed-table-toolbar .search {
        margin-left: 0 !important;
    }

    .fixed-table-toolbar .search input {
        width: 100% !important;
    }

    .fixed-table-pagination {
        display: flex;
        flex-direction: column;
        gap: .5rem;
        align-items: stretch;
    }

    .fixed-table-pagination .pagination {
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 0;
    }

    .modal-dialog {
        margin: .5rem auto !important;
    }

    .modal-content {
        max-height: calc(100dvh - 1rem);
    }

    .modal-body {
        max-height: calc(100dvh - 9rem);
    }

    #contenedorMapaGoogle {
        height: min(60dvh, 460px) !important;
    }
}

@media (max-width: 767.98px) {
    h1,
    .h1 {
        font-size: 1.75rem;
    }

    h2,
    .h2 {
        font-size: 1.45rem;
    }

    h3,
    .h3 {
        font-size: 1.25rem;
    }

    .main-content {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .container-fluid,
    .container {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding-left: .875rem;
        padding-right: .875rem;
    }

    .row {
        --bs-gutter-x: 1rem;
    }

    [class*="col-md-"],
    [class*="col-lg-"],
    [class*="col-xl-"] {
        margin-bottom: .75rem;
    }

    .input-group .btn {
        flex: 0 0 auto;
    }

    .bootstrap-select .dropdown-menu {
        width: 100%;
    }

    .notificaciones-dropdown .dropdown-menu,
    .dropdown-menu.dropdown-menu-end {
        left: .75rem !important;
        right: .75rem !important;
        width: auto !important;
        min-width: 0 !important;
        transform: none !important;
    }

    .table {
        font-size: .8125rem;
    }

    .table th,
    .table td {
        padding: .55rem .65rem;
    }

    footer.footer {
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: .8125rem;
    }
}

@media (max-width: 575.98px) {
    .btn:not(.btn-icon-only),
    .form-control,
    .form-select,
    .bootstrap-select > .dropdown-toggle {
        min-height: 42px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: .875rem;
        padding-right: .875rem;
    }

    .modal-footer {
        gap: .5rem;
    }

    .modal-footer > * {
        margin: 0;
    }

    .modal-footer .btn {
        flex: 1 1 100%;
    }

    .swal2-popup {
        width: calc(100vw - 1rem) !important;
    }
}
