/* Shared responsive safeguards for the application shell. */
html {
    scroll-behavior: smooth;
}

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

.main-panel,
.content,
.container-fluid,
.card,
.card-body,
.table-responsive {
    min-width: 0;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

.table-responsive > table {
    max-width: 100%;
}

form .form-control,
form .custom-select,
form .custom-file {
    max-width: 100%;
}

.pwa-shell .navbar-wrapper.row > [class*="col-"] {
    min-width: 0;
}

@media (max-width: 991.98px) {
    .pwa-shell .navbar-wrapper.row > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .pwa-shell .navbar-wrapper.row > .col-md-6:last-child {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding-top: .25rem;
    }

    .pwa-shell .navbar-wrapper.row > .col-md-6:last-child > .btn {
        float: none !important;
        flex: 1 1 10rem;
        margin: .25rem;
        white-space: normal;
    }
}

@media (max-width: 767.98px) {
    .navbar .navbar-brand {
        max-width: calc(100vw - 7rem);
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        width: 100%;
        margin: .5rem 0;
        text-align: left;
        white-space: normal;
    }

    .dataTables_wrapper .dataTables_filter input {
        max-width: calc(100% - 5rem);
    }

    .dataTables_wrapper .dataTables_paginate {
        display: flex;
        flex-wrap: wrap;
        gap: .25rem;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        margin: 0;
        padding: .35rem .5rem;
    }
}

@media (max-width: 575.98px) {
    .main-panel .content {
        padding-right: .75rem !important;
        padding-left: .75rem !important;
    }

    .main-panel .content > .container-fluid {
        padding-right: .25rem;
        padding-left: .25rem;
    }

    .main-panel .card-body.mx-5 {
        margin-right: 1rem !important;
        margin-left: 1rem !important;
    }

    .main-panel .card-body.px-5 {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }

    .main-panel .card-header .row > [class*="col-"] {
        min-width: 0;
    }

    .main-panel .card-header .text-nowrap {
        white-space: normal !important;
    }

    #pilihKamera {
        width: 100% !important;
        margin: .5rem 0 !important;
    }

    .btn,
    button,
    input,
    select,
    textarea {
        max-width: 100%;
    }

    .pwa-shell .navbar-wrapper.row > .col-md-6:last-child > .btn {
        flex-basis: calc(50% - .5rem);
        min-height: 40px;
        padding: .5rem;
        font-size: .75rem;
        line-height: 1.25;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
