/*
Theme Name: Car Inventory Manager
Theme URI: https://thichcode.net
Author: Nguyen Khanh Duy - 0919.344.644
Author URI: https://thichcode.net
Description: Quản lý xe VinFast
Version: 1.0
Text Domain: car-inventory-manager
*/
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 1;
}

/* Ẩn mũi tên trên Chrome, Safari, Edge */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ẩn mũi tên trên Firefox */
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
    /* Cho Chrome/Safari/Edge */
}

.small {
    font-size: .875em;
}

.form-control[readonly],
.form-select[readonly],
.form-control:read-only,
.form-select[disabled],
.form-select:disabled {
    background-color: var(--cui-secondary-bg) !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

.table tr.bg-danger>td {
    background-color: var(--cui-danger) !important;
    color: #fff;
}

.table td.text-nowrap {
    min-width: 100px;
    ;
}

.table-sticky {
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

.table-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #212529;
    /* table-dark */
}

td[contenteditable]:focus {
    outline: 2px solid #0d6efd;
    background: #eef6ff;
}

@media (max-width: 768px) {
    table thead {
        display: none;
    }

    table tbody tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #ddd;
        padding: 10px;
        /* border-radius: 8px; */
        padding: 0;
        margin-bottom: 30px;        
    }

    table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;             
    }

    table td::before {
        content: attr(data-label);
        font-weight: bold;
    }

    td.mobile-hide-empty.is-empty {
        display: none !important;
    }
}