/*
|--------------------------------------------------------------------------
| Table Component & Responsive Scroll Container
| WebPixLab Billing Software
|--------------------------------------------------------------------------
*/

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    margin-bottom: 20px;
    border-radius: 16px;
    position: relative;
}

/* Custom scrollbar for table container */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f6;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #d0c8f5;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #5f00ff;
}

table,
.table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    min-width: 640px; /* Ensures columns remain properly legible while scrolling smoothly */
}

table thead,
.table thead {
    background: linear-gradient(90deg, #5f00ff, #d100ff);
    color: #fff;
}

table th,
.table th {
    padding: 16px 18px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    border: none;
    white-space: nowrap;
}

table th:first-child,
.table th:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

table th:last-child,
.table th:last-child {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
    text-align: center;
}

table td,
.table td {
    padding: 15px 18px;
    border-bottom: 1px solid #edf0f8;
    font-size: 14px;
    vertical-align: middle;
    color: #333;
}

table td:not(:first-child),
.table td:not(:first-child) {
    text-align: center;
}

table tbody tr,
.table tbody tr {
    transition: background 0.2s ease;
}

table tbody tr:hover,
.table tbody tr:hover {
    background: #fafaff;
}

.table input,
.table select {
    border-radius: 12px !important;
}

/* TABLE SPECIFIC COMPONENT FIXES */
.customer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    min-width: 170px;
}

.service-info {
    text-align: left;
    min-width: 170px;
}

/* RESPONSIVE TABLE STYLING */
@media screen and (max-width: 768px) {
    table th,
    .table th {
        padding: 13px 14px;
        font-size: 13px;
    }

    table td,
    .table td {
        padding: 12px 14px;
        font-size: 13px;
    }
}