/*
 * Site layer for the Thai landing page.
 * Loaded after the platform stylesheet and the theme variables, so these
 * rules only cover what the variables cannot: Thai typography, the article
 * markup in the footer, and the responsive behaviour the desktop-only
 * platform template lacks.
 */

/* ---------- Thai typography ---------- */
body,
button,
input,
select,
textarea {
    font-family: 'Poppins', 'Kanit', sans-serif;
}

/* ---------- Article (footer description) ---------- */
.footer-description-section h1 {
    margin: 10px 0 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffd04a;
}

.footer-description-section .site-description,
.site-description p,
.site-description li {
    font-size: 14px;
    line-height: 1.85;
    color: #d6dcf2;
}

.site-description h2 {
    margin: 32px 0 6px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.45;
    color: #ffd04a;
}

.site-description h3 {
    margin: 22px 0 4px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #ffffff;
}

.site-description ul {
    padding-inline-start: 22px;
}

.site-description p a {
    color: #ffd04a;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-description p a:hover {
    color: #ffffff;
}

.article-table-wrapper {
    margin: 18px 0;
    overflow-x: auto;
    border: 1px solid #2a3a8f;
    border-radius: 10px;
}

.article-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 14px;
}

.article-table th {
    padding: 10px 14px;
    background: #f5b400;
    color: #13207a;
    font-weight: 700;
    text-align: left;
}

.article-table td {
    padding: 10px 14px;
    border-top: 1px solid #2a3a8f;
    color: #eef1fb;
}

.article-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, .04);
}

/* ---------- Header on the white top bar ---------- */
/* the platform's topbar icons are white SVGs; tint them navy so they stay visible */
.topbar-sub-section [data-icon]:not([data-icon="telegram"]) {
    filter: brightness(0) saturate(100%) invert(12%) sepia(64%) saturate(4300%) hue-rotate(229deg) brightness(88%);
}

/* ---------- Images ---------- */
.banner-img,
.telegram-banner-container img,
.topbar-inner-container .logo img {
    max-width: 100%;
    height: auto;
}

.banner-img {
    width: 100%;
    aspect-ratio: 16 / 5;
    object-fit: cover;
    object-position: center;
}

/* ---------- Tablet (the platform template is desktop-only) ---------- */
@media (max-width: 991px) {
    .topbar-inner-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .topbar-inner-container .logo {
        flex: 0 0 100%;
        max-width: 260px;
        margin: 0 auto;
    }

    .topbar-inner-container .logo img {
        display: block;
        width: 100%;
    }

    .topbar-inner-group {
        width: 100%;
        align-items: center;
    }

    .topbar-sub-section {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 6px;
    }

    .login-panel {
        justify-content: center;
    }

    .top-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .footer-sitemap-section {
        flex-wrap: wrap;
        padding-right: 0;
        gap: 10px 20px;
    }

    .footer-sitemap-section > div {
        flex: 1 1 40%;
    }

    .footer-sitemap-section div + div {
        margin-left: 0;
    }

    .footer-misc .row.equal {
        display: flex;
        flex-wrap: wrap;
    }

    .footer-copyright-section .col-md-12 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 24px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .topbar-sub-section .topbar-item a {
        padding: 5px 6px;
        font-size: 12px;
    }

    .topbar-sub-section .topbar-item + .topbar-item {
        margin-left: 6px;
    }

    .login-panel .login-button,
    .login-panel .register-button {
        width: auto;
        min-width: 120px;
        padding: 6px 14px;
        font-size: 14px;
    }

    .announcement-container {
        font-size: 13px;
        font-weight: 500;
    }

    .lottery-menu a {
        font-size: 14px;
        line-height: 1.4;
    }

    /* lottery cards: market name on its own row, draw info + numbers below */
    .lottery-result-list .lottery-result-item .lottery-result-item-header {
        flex-wrap: wrap;
        row-gap: 4px;
        padding-right: 36px;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-header .lottery-name {
        width: 100%;
        flex-basis: 100%;
        font-size: 14px;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-header > span:not(.lottery-name) {
        width: auto;
        flex: 0 0 auto;
        padding-left: 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .lottery-result-list .lottery-result-item .lottery-number-container {
        padding-right: 0;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-header > .lottery-number-container {
        margin-left: auto;
        padding-bottom: 8px;
    }

    .lottery-result-list .lottery-result-list .lottery-number-container .lottery-number,
    .lottery-result-list .lottery-number-container .lottery-number {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-history-section .lottery-result-item-history-section-item {
        height: auto;
        flex-wrap: wrap;
        row-gap: 4px;
        padding: 8px 10px;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-history-section .lottery-number-container .lottery-number {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-history-section .lottery-result-item-history-section-item > span:not(.lottery-number-container):not(.offset) {
        width: auto;
        flex: 0 0 auto;
        padding-right: 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-history-section .lottery-result-item-history-section-item > span:first-child,
    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-history-section .lottery-result-item-history-section-item > span.offset {
        display: none;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-history-section .lottery-result-item-history-section-item > .lottery-number-container {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* popular games: readable thumbnails in the horizontal scroller */
    .popular-game-title-container + .game-list-container .game-list .games-group {
        width: 118px;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-footer > span {
        width: 100%;
        flex-basis: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-details .offset,
    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-footer > span:first-child {
        display: none;
    }

    .lottery-result-list .lottery-result-item .lottery-result-item-details .lottery-result-item-footer .info-section {
        padding-right: 0;
        gap: 12px;
    }

    .footer-description-section h1 {
        font-size: 22px;
    }

    .site-description h2,
    .faq-section h2 {
        font-size: 19px;
    }

    .site-description h3 {
        font-size: 17px;
    }

    .footer-sitemap-section > div {
        flex-basis: 100%;
    }
}
