/* RK Tenders responsive polish. Keep this after the theme and feature styles. */

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

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

.login-otp-input {
    letter-spacing: 4px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

@media (max-width: 1199px) {
    .user-actions-cell {
        min-width: 420px;
    }

    .user-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .user-actions .btn,
    .user-actions .display-inline {
        margin: 0 !important;
    }
}

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

    section.content {
        margin: 70px 0 0 0;
        padding: 0 10px;
    }

    .container-fluid {
        padding-right: 10px;
        padding-left: 10px;
    }

    .navbar > .container-fluid {
        display: flex;
        align-items: center;
        min-height: 70px;
    }

    .navbar .navbar-header {
        width: auto;
        flex: 1 1 auto;
    }

    .navbar .navbar-brand {
        max-width: calc(100vw - 145px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 18px;
    }

    .navbar .navbar-collapse {
        display: block !important;
        flex: 0 0 auto;
        width: auto;
        border: 0;
        box-shadow: none;
    }

    .navbar .navbar-right {
        margin: 0;
        display: flex;
        align-items: center;
    }

    .navbar .navbar-right > li {
        float: none;
    }

    .card .header {
        padding: 16px;
    }

    .card .header h2 {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        line-height: 1.35;
    }

    .card .header .header-dropdown {
        position: static;
        float: none;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0 !important;
    }

    .monthly-report-form {
        flex-wrap: wrap;
    }

    .monthly-report-form .form-control,
    .monthly-report-form .btn {
        min-width: 120px;
    }

    .modal-dialog {
        width: auto;
        max-width: calc(100vw - 20px);
        margin: 10px;
    }

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

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

    .profile-hero,
    .profile-summary {
        flex-wrap: wrap;
    }
}

@media (max-width: 767px) {
    h1,
    .content h1 {
        font-size: 34px;
        line-height: 1.15;
        margin-top: 20px;
    }

    .card,
    .modal-content {
        border-radius: 4px;
    }

    .card .body {
        padding: 15px;
    }

    .table > thead > tr > th,
    .table > tbody > tr > td {
        white-space: nowrap;
        vertical-align: middle;
    }

    .user-actions-cell {
        min-width: 320px;
    }

    .user-actions .btn,
    .user-actions .display-inline {
        flex: 1 1 135px;
        min-width: 135px;
    }

    .permission-summary-grid,
    .permission-category-grid,
    .profile-details-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .login-page .login-box {
        width: auto;
        max-width: 420px;
        margin: 8% 14px 0;
    }

    .login-page .logo a {
        font-size: 30px;
    }

    .login-page .card .body {
        padding: 20px;
    }

    .login-page .row .col-xs-4,
    .login-page .row .col-xs-5,
    .login-page .row .col-xs-7,
    .login-page .row .col-xs-8 {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 520px) {
    .navbar .navbar-brand {
        font-size: 16px;
        max-width: calc(100vw - 125px);
    }

    .bars:before,
    .navbar-toggle:before {
        font-size: 22px;
    }

    section.content {
        padding: 0 6px;
    }

    .card .header,
    .card .body {
        padding: 12px;
    }

    .card .header .header-dropdown {
        width: 100%;
    }

    .card .header .header-dropdown .btn,
    .monthly-report-form .btn {
        width: 100%;
    }

    .monthly-report-form,
    .report-download-form {
        width: 100%;
    }

    .monthly-report-form .form-control,
    .yearly-report-input,
    .monthly-report-input {
        width: 100% !important;
    }

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

    .modal-footer {
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0 !important;
    }

    .rk-chat-panel {
        width: 100vw;
        right: 0;
        left: 0;
    }

    .rk-chat-main {
        min-width: 0;
    }

    .rk-chat-composer {
        gap: 6px;
        padding: 8px;
    }

    .rk-chat-composer input[type="text"],
    .rk-chat-composer textarea {
        min-width: 0;
        font-size: 14px;
    }

    .rk-chat-composer .btn,
    .rk-chat-composer button {
        flex: 0 0 auto;
    }
}
