/* =========================
   HISTORY SECTION
========================= */

.history-section {
    background: var(--color-bg);
}


/* =========================
   HISTORY TOOLBAR
========================= */

.history-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.history-search {
    width: min(100%, 430px);
}

.history-search label {
    display: block;

    margin-bottom: 7px;

    color: var(--color-text);

    font-size: 12px;
    font-weight: 700;
}

.search-box {
    display: flex;
    align-items: stretch;

    width: 100%;

    overflow: hidden;

    border: 1px solid var(--color-border);
    border-radius: 10px;

    background: var(--color-white);

    box-shadow: var(--shadow-sm);
}

.search-box input {
    min-width: 0;
    flex: 1;

    height: 44px;

    padding: 0 14px;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--color-text);

    font-size: 13px;
}

.search-box input::placeholder {
    color: #9aa69f;
}

.search-box input:focus {
    box-shadow: inset 0 0 0 2px rgba(8, 127, 75, 0.08);
}

.search-box button {
    flex-shrink: 0;

    min-width: 82px;

    border: 0;

    background: var(--color-green);

    color: var(--color-white);

    font-size: 12px;
    font-weight: 700;

    transition: background 0.2s ease;
}

.search-box button:hover {
    background: var(--color-green-dark);
}


/* =========================
   TABLE WRAPPER
========================= */

.history-table-wrapper {
    overflow-x: auto;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);

    background: var(--color-white);

    box-shadow: var(--shadow-sm);

    -webkit-overflow-scrolling: touch;
}


/* =========================
   TABLE
========================= */

.history-table {
    min-width: 680px;

    background: var(--color-white);
}

.history-table thead {
    background: #f1f6f3;
}

.history-table th {
    padding: 15px 18px;

    color: var(--color-green-dark);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-align: left;
    text-transform: uppercase;

    white-space: nowrap;
}

.history-table td {
    padding: 17px 18px;

    border-top: 1px solid var(--color-border);

    color: var(--color-text-soft);

    font-size: 13px;

    white-space: nowrap;
}

.history-table tbody tr {
    transition: background 0.18s ease;
}

.history-table tbody tr:hover {
    background: rgba(8, 127, 75, 0.025);
}


/* =========================
   PERIOD
========================= */

.history-table td:first-child {
    color: var(--color-green-dark);

    font-weight: 700;
}


/* =========================
   WINNING NUMBER
========================= */

.history-table td:nth-child(2) {
    color: var(--color-green-dark);

    font-size: 17px;
    font-weight: 800;

    letter-spacing: 0.08em;
}


/* =========================
   DRAW TIME
========================= */

.history-table td:last-child {
    color: var(--color-green);

    font-weight: 700;
}


/* =========================
   EMPTY STATE
========================= */

.history-empty td {
    padding: 42px 20px;

    color: var(--color-text-soft);

    text-align: center;
}

.history-empty:hover {
    background: transparent !important;
}


/* =========================
   PAGINATION
========================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 24px;
}

.pagination button {
    min-width: 38px;
    height: 38px;

    padding: 0 10px;

    border: 1px solid var(--color-border);
    border-radius: 9px;

    background: var(--color-white);

    color: var(--color-text-soft);

    font-size: 12px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.pagination button:hover {
    border-color: rgba(8, 127, 75, 0.25);

    color: var(--color-green);

    background: rgba(8, 127, 75, 0.05);
}

.pagination button.active {
    border-color: var(--color-green);

    background: var(--color-green);

    color: var(--color-white);
}

.pagination button:disabled {
    opacity: 0.45;

    cursor: not-allowed;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 650px) {

    .history-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .history-search {
        width: 100%;
    }

    .history-table th,
    .history-table td {
        padding-left: 14px;
        padding-right: 14px;
    }

    .pagination {
        gap: 5px;
    }

    .pagination button {
        min-width: 35px;
        height: 35px;
    }

}