﻿
/* ===== Monthly History Result Chart ===== */

.monthly-history-chart {
    margin: 20px 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.08);
}

/* Premium Heading */
.monthly-history-title {
    margin: 0;
    padding: 12px 10px;
    text-align: center;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.4px;
    color: #172033;
    background: linear-gradient(90deg, #f5b700, #ffd65a, #f5b700);
    border-bottom: 3px solid #d99a00;
}

/* Responsive Table */
.monthly-history-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#historyTable {
    width: 100%;
    min-width: 1000px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

    /* Table Header */
    #historyTable thead th {
        padding: 13px 10px;
        background: #f3f6fa;
        color: #243247;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        text-align: center;
        vertical-align: middle;
        border: 1px solid #e0e5ec;
        border-top: 0;
        border-bottom: 2px solid #d4dce7;
    }

        /* Date Column */
        #historyTable thead th:first-child,
        #historyTable tbody td:first-child {
            position: sticky;
            left: 0;
            min-width: 95px;
            text-align: left;
            font-weight: 700;
            background: #fff8e5;
            z-index: 2;
            white-space: nowrap;
        }

        /* Keep Date Header Above Other Cells */
        #historyTable thead th:first-child {
            background: #e8edf5;
            z-index: 3;
        }

    /* Table Cells */
    #historyTable tbody td {
        padding: 11px 10px;
        text-align: center;
        vertical-align: middle;
        color: #243247;
        font-size: 14px;
        font-weight: 600;
        border: 1px solid #e5e9ef;
        white-space: nowrap;
    }

    /* Alternate Rows */
    #historyTable tbody tr:nth-child(even) td {
        background-color: #f8fafc;
    }

        #historyTable tbody tr:nth-child(even) td:first-child {
            background-color: #fff2cc;
        }

    /* Hover Effect */
    #historyTable tbody tr:hover td {
        background-color: #fff3c4;
        transition: background-color 0.2s ease;
    }

        #historyTable tbody tr:hover td:first-child {
            background-color: #ffe49a;
        }

    /* Missing Results: XX */
    #historyTable tbody td.missing {
        color: #dc3545;
        background-color: #fff0f0;
        font-weight: 800;
    }

/* Responsive Heading and Cells */
@media (max-width: 767px) {
    .monthly-history-chart {
        margin: 12px 0;
        border-radius: 7px;
    }

    .monthly-history-title {
        font-size: 19px;
        padding: 10px 6px;
    }

    #historyTable {
        min-width: 900px;
        font-size: 13px;
    }

        #historyTable thead th {
            padding: 10px 8px;
            font-size: 11px;
        }

        #historyTable tbody td {
            padding: 10px 8px;
            font-size: 13px;
        }
}
