﻿/* Agent Commission Pivot Table */
.table-scroll-x {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.commission-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

    .commission-table th,
    .commission-table td {
        padding: .35rem .5rem;
        border-color: #e5e7eb;
        vertical-align: middle;
    }

    /* header */
    .commission-table thead th {
        position: sticky;
        top: 0;
        background: #f8f9fa;
        z-index: 4;
        font-size: 12px;
        line-height: 1.2;
        white-space: normal; /* allow wrap */
        word-break: break-word; /* wrap long product names */
        text-align: center;
    }

    /* product columns */
    .commission-table th:not(:first-child),
    .commission-table td:not(:first-child) {
        min-width: 95px;
        max-width: 130px;
        text-align: center;
        white-space: nowrap;
    }

    /* sticky AgentID column */
    .commission-table th:first-child,
    .commission-table td:first-child {
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 5;
        min-width: 180px;
        max-width: 240px;
        white-space: nowrap;
        box-shadow: 2px 0 4px rgba(0,0,0,.06);
    }

    /* hover */
    .commission-table tbody tr:hover td {
        background: #f8fbff;
    }

        .commission-table tbody tr:hover td:first-child {
            background: #fff;
        }

    /* empty cells */
    .commission-table td:empty {
        background: #fafafa;
    }
