/*
|--------------------------------------------------------------------------
| MoniTrack Responsive Tables
|--------------------------------------------------------------------------
| Add class "mt-responsive-table" to any table that should become
| collapsible product cards on mobile devices.
*/

.mt-mobile-row-toggle {
    display: none;
}

@media (max-width: 767px) {
    .mt-responsive-table {
        width: 100% !important;
        min-width: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    .mt-responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .mt-responsive-table,
    .mt-responsive-table tbody,
    .mt-responsive-table tr,
    .mt-responsive-table td {
        display: block;
    }

    .mt-responsive-table tbody tr {
        position: relative;
        margin: 0 0 14px;
        padding: 14px;
        border: 1px solid #e2e8f0 !important;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
        overflow: hidden;
    }

    .mt-responsive-table tbody tr.is-edited {
        border-color: #86efac !important;
        background: #f0fdf4;
    }

    .mt-responsive-table tbody td {
        width: 100% !important;
        min-width: 0 !important;
        padding: 9px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid #eef2f7 !important;
        text-align: left !important;
        white-space: normal !important;
    }

    .mt-responsive-table tbody td:last-child {
        border-bottom: 0 !important;
    }

    .mt-responsive-table tbody td::before {
        content: attr(data-mobile-label);
        display: block;
        margin-bottom: 5px;
        color: #64748b;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .mt-responsive-table tbody td.mt-mobile-primary {
        display: block;
    }

    .mt-responsive-table tbody td.mt-mobile-secondary {
        display: none;
    }

    .mt-responsive-table tbody tr.mt-mobile-expanded td.mt-mobile-secondary {
        display: block;
    }

    .mt-responsive-table tbody td.mt-mobile-product-cell::before {
        display: none;
    }

    .mt-responsive-table tbody td.mt-mobile-product-cell {
        padding-right: 42px !important;
    }

    .mt-mobile-row-toggle {
        position: absolute;
        top: 12px;
        right: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        padding: 0;
        border: 1px solid #a7f3d0;
        border-radius: 9px;
        color: #15803d;
        background: #ecfdf5;
        font-size: 14px;
        cursor: pointer;
    }

    .mt-responsive-table tbody tr.mt-mobile-expanded .mt-mobile-row-toggle {
        color: #ffffff;
        border-color: #0f766e;
        background: #0f766e;
    }

    .mt-responsive-table .form-control,
    .mt-responsive-table .select2-container {
        width: 100% !important;
    }

    .mt-responsive-table textarea.form-control {
        min-height: 72px;
    }

    .mt-responsive-table .dropdown-menu {
        max-width: calc(100vw - 40px);
    }
}
