/**
 * Branches Intake Table Styles
 * Save this file as: assets/css/branches-table.css
 */

.branches-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

.branches-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid #000;
}

/* Header Styles */
.branches-table thead th {
    background-color: #f8f9fa;
    color: #000000;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #000;
    text-transform: uppercase;
}

.branches-table thead th:first-child {
    width: 80px;
    text-align: center;
}

.branches-table thead th:last-child {
    width: 100px;
    text-align: center;
}

/* Body Styles */
.branches-table tbody tr {
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

.branches-table tbody tr:hover:not(.total-row) {
    background-color: #f8f9fa;
}

.branches-table tbody td {
    padding: 10px 15px;
    color: #212529;
    font-size: 14px;
    border: 1px solid #000;
    vertical-align: middle;
}

.branches-table tbody td:first-child {
    text-align: center;
    font-weight: 500;
}

.branches-table tbody td:last-child {
    text-align: center;
    font-weight: 500;
}

/* Total Row Styles */
.branches-table tbody tr.total-row {
    background-color: #e9ecef;
    font-weight: 700;
}

.branches-table tbody tr.total-row:hover {
    background-color: #e9ecef;
}

.branches-table tbody tr.total-row td {
    font-weight: 700;
    padding: 12px 15px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .branches-table {
        font-size: 13px;
    }

    .branches-table thead th {
        padding: 10px 12px;
        font-size: 13px;
    }

    .branches-table tbody td {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .branches-table {
        font-size: 12px;
    }

    .branches-table thead th {
        padding: 8px 10px;
        font-size: 11px;
    }

    .branches-table tbody td {
        padding: 6px 10px;
        font-size: 12px;
    }

    .branches-table thead th:first-child,
    .branches-table tbody td:first-child {
        width: 50px;
    }
}

/* Animation states for GSAP */
.branches-table-animated .branches-table-row {
    opacity: 0;
    transform: translateY(20px);
}

.branches-table-animated thead {
    opacity: 0;
    transform: translateY(-20px);
}

/* Loading state */
.branches-table-wrapper.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Print styles */
@media print {
    .branches-table-wrapper {
        box-shadow: none;
    }

    .branches-table {
        page-break-inside: auto;
    }

    .branches-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .branches-table thead {
        display: table-header-group;
    }
}

/* Accessibility */
.branches-table:focus-within {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Smooth transitions */
.branches-table tbody tr,
.branches-table tbody td {
    transition: all 0.3s ease;
}

/* Hover effect for cells */
.branches-table tbody tr:not(.total-row) td:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Special styling for intake column */
.branches-table tbody td:last-child {
    color: #0066cc;
    font-weight: 600;
}

.branches-table tbody tr.total-row td:last-child {
    color: #dc3545;
    font-weight: 700;
    font-size: 16px;
}

/* Box shadow for depth */
.branches-table-wrapper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

/* Alternate row coloring (optional) */
.branches-table tbody tr:nth-child(odd):not(.total-row) {
    background-color: #fafafa;
}

.branches-table tbody tr:nth-child(odd):not(.total-row):hover {
    background-color: #f0f0f0;
}