/*
 * SIGABEN Responsive 08B
 * Capa adicional. No modifica Bootstrap, AdminLTE, Vue, PDF ni Excel.
 */

html,
body {
    max-width: 100%;
}

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

.select2-container,
.select2-container--default,
.multiselect,
.vue-multiselect {
    max-width: 100% !important;
}

.modal-dialogxl {
    position: relative;
    margin: 30px auto;
    width: 94%;
    max-width: 1280px;
}

#contenidoItem,
#contenidoItemFF,
.content-wrapper,
.content,
.box,
.box-body,
.modal-body {
    min-width: 0;
}

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

.pagination {
    white-space: normal;
}

@media (max-width: 991px) {
    .modal-dialogxl {
        width: auto !important;
        max-width: none !important;
        margin: 15px !important;
    }

    .modal-dialog {
        max-width: calc(100vw - 30px);
    }

    .box-body,
    .modal-body,
    #contenidoItem {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-wrapper table.table,
    .modal table.table {
        min-width: 680px;
    }

    .select2-container,
    .select2-container--classic,
    .select2-container--default {
        width: 100% !important;
    }
}

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

    .content {
        padding: 8px !important;
    }

    .container,
    .container-fluid {
        width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .box {
        margin-bottom: 12px;
    }

    .box-header,
    .box-body,
    .box-footer {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .modal {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .modal-dialog,
    .modal-dialogxl {
        width: auto !important;
        max-width: none !important;
        margin: 8px !important;
    }

    .modal-content {
        max-height: calc(100vh - 16px);
        overflow-y: auto;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 12px !important;
    }

    .modal-footer .btn {
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .form-horizontal .control-label,
    label.control-label {
        text-align: left !important;
        padding-top: 0 !important;
        margin-bottom: 5px !important;
    }

    input.form-control,
    select.form-control,
    textarea.form-control,
    .input-group,
    .input-group .form-control {
        width: 100% !important;
        max-width: 100% !important;
    }

    input[type="date"],
    input[type="time"],
    input[type="number"],
    input[type="file"] {
        max-width: 100%;
    }

    [class*="col-sm-"],
    [class*="col-md-"] {
        max-width: 100%;
    }

    .btn {
        max-width: 100%;
        white-space: normal;
    }

    .box-header .pull-left,
    .box-header .pull-right,
    .modal-footer .pull-left,
    .modal-footer .pull-right {
        max-width: 100%;
    }

    .content-wrapper table.table,
    .modal table.table {
        min-width: 640px;
        margin-bottom: 8px;
    }

    .table > thead > tr > th,
    .table > tbody > tr > th,
    .table > tfoot > tr > th,
    .table > thead > tr > td,
    .table > tbody > tr > td,
    .table > tfoot > tr > td {
        padding: 7px;
        vertical-align: middle;
    }

    .pagination {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
        margin: 10px 0;
    }

    .pagination > li > a,
    .pagination > li > span {
        margin-left: 0;
    }

    .alertify-notifier {
        max-width: calc(100vw - 24px);
    }

    .swal2-popup {
        max-width: calc(100vw - 20px) !important;
    }

    iframe,
    #viewer {
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media print {
    /* La capa responsive no altera reportes ni formatos de impresión. */
    .modal-dialogxl {
        width: auto;
        max-width: none;
        margin: 0;
    }
}
