/**
 * Shared result chips for 3 ตัวบน / 2 ตัวล่าง
 * Used on /result and /historical statistics tables.
 */
.historical-table-result-chip {
    display: inline-flex;
    min-width: 2.85rem;
    min-height: 1.85rem;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.0625rem;
    line-height: 1.2;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.historical-table-result-chip--3up {
    color: #92400e;
    border-color: #fcd34d;
    background-color: #fffbeb;
}

.historical-table-result-chip--2down {
    color: #be123c;
    border-color: #fda4af;
    background-color: #fff1f2;
}

@media (min-width: 640px) {
    .historical-table-result-chip {
        min-width: 3rem;
        min-height: 2rem;
        padding: 0.25rem 0.75rem;
        font-size: 1.125rem;
        letter-spacing: 0.06em;
    }
}

/* Full-width zone columns: 3 ตัวบน | 2 ตัวล่าง */
.lotto-result-zone-table {
    border-collapse: collapse;
}

.lotto-result-zone-table th:nth-child(2),
.lotto-result-zone-table td.lotto-result-zone-cell--3up {
    width: 26%;
}

.lotto-result-zone-table th:nth-child(3),
.lotto-result-zone-table td.lotto-result-zone-cell--2down {
    width: 26%;
}

.lotto-result-zone-cell {
    padding: 0;
    vertical-align: middle;
    text-align: center;
    background-color: #ffffff;
}

.lotto-result-zone-table tbody td.result-lotto-name-cell,
.lotto-result-zone-table tbody td.historical-table-date-cell {
    border-bottom: 1px solid #f3f4f6;
}

.lotto-result-zone-table tbody td.historical-table-date-cell {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 600;
}

.lotto-result-zone-table tbody td.historical-table-date-cell a {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.lotto-result-zone-table tbody td.lotto-result-zone-cell--3up,
.lotto-result-zone-table tbody td.lotto-result-zone-cell--2down {
    border-bottom: 1px solid #f2f2f2;
    padding: 0;
}

.lotto-result-zone-table tbody td.lotto-result-zone-cell--3up:has(.historical-result-pending-plain),
.lotto-result-zone-table tbody td.lotto-result-zone-cell--2down:has(.historical-result-pending-plain) {
    background-color: #f8fafc;
    border-bottom: 1px solid #f2f2f2;
}

.lotto-result-zone-table tbody td.lotto-result-zone-cell--3up:has(.historical-table-result-chip--3up),
.lotto-result-zone-table tbody td.lotto-result-zone-cell--2down:has(.historical-table-result-chip--2down),
.lotto-result-zone-table tbody tr.historical-table-row--has-result td.historical-table-date-cell,
.lotto-result-zone-table tbody tr:has(.historical-table-result-chip--3up, .historical-table-result-chip--2down) td.result-lotto-name-cell {
    background: linear-gradient(180deg, #fff 0%, #fffefe 50%, #fdfdfd 100%);
    border-top: 1px solid #fdfdfd;
    border-bottom: 1px solid #f6f6f6;
}

.lotto-result-zone-table tbody tr.historical-table-row--pending td.historical-table-date-cell,
.lotto-result-zone-table tbody tr:has(.historical-result-pending-plain):not(:has(.historical-table-result-chip--3up, .historical-table-result-chip--2down)) td.historical-table-date-cell {
    background-color: #f8fafc;
    border-bottom: 1px solid #f2f2f2;
}

.lotto-result-zone-table .historical-table-result-chip,
.lotto-result-zone-table .historical-result-pending-plain {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    height: 100%;
    padding: 0.625rem 0.5rem;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.lotto-result-zone-table .historical-table-result-chip--3up {
    color: #383838;
    background: transparent;
}

.lotto-result-zone-table .historical-table-result-chip--2down {
    color: #383838;
    background: transparent;
}

@media (min-width: 640px) {
    .lotto-result-zone-table .historical-table-result-chip,
    .lotto-result-zone-table .historical-result-pending-plain {
        padding: 0.75rem 0.625rem;
    }

    .lotto-result-zone-table tbody td.historical-table-date-cell {
        font-size: 1.0625rem;
    }
}
