/* Thai typography and static-export layout repairs. Original component hooks are retained. */
:root {
    --thai-primary: #142d91;
    --thai-primary-dark: #102477;
    --thai-accent: #ffba00;
    --thai-surface: #f2f4ff;
    --thai-border: #c7d0f2;
}
html { scroll-padding-top: 160px; }
body { color: #243966; line-height: 1.7; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #ffba00;
    outline-offset: 3px;
}
.container, .topbar-inner-group, .menu-slide, .game-item { min-width: 0; }
.topbar-inner-container .logo { flex: 0 1 220px; max-width: 35%; }
.topbar-inner-container .logo > picture img { max-width: 100%; object-fit: contain; }
.topbar-container { padding-block: 8px; }
.login-panel a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.login-panel .login-button { color: #fff; background: #142d91; border-color: #142d91; }
.site-header, .top-menu > li { color: #fff; }
.top-menu > li:hover, .top-menu > li[data-active="true"] { color: #ffcf42; }
.top-menu > li > a { padding-block: 12px; }
.top-menu > li + li::before { display: none; }
.top-menu .game-list-container {
    position: fixed;
    top: var(--thai-header-height, 125px);
    left: 0;
    right: 0;
    max-width: 100vw;
    max-height: calc(100dvh - var(--thai-header-height, 125px) - 12px);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 1025;
    background: #102477;
    border-bottom: 4px solid #ffba00;
}
body .top-menu > li[data-menu-open="true"] > .game-list-container { display: block; }
body .top-menu > li:not([data-menu-open="true"]) > .game-list-container { display: none; }
.top-menu .games-container { padding: 0; gap: 16px; }
.top-menu .games-container > li { flex-basis: calc(20% - 16px); }
.top-menu .games-container > li > a[aria-disabled="true"] { pointer-events: auto; }
.top-menu > li > a[aria-expanded="true"] { color: #ffcf42; }
.menu-slide [role="button"][aria-disabled="true"] { opacity: 0.35; }
.top-menu .games-container > li > a { color: #fff; }
.announcement-outer-container { background: #e7ebff; color: #142d91; }
.announcement-container [data-section="announcements"] { min-width: 0; overflow: hidden; }
.announcement-container [data-section="announcements"] > div { background: #e7ebff; border-radius: 8px; }
.announcement-container .tickercontainer, .announcement-container .mask { width: 100%; height: auto; }
.announcement-list { display: flex; width: 100%; overflow-x: auto; margin: 0; padding: 8px 0; gap: 24px; }
.announcement-list li { flex: 0 0 100%; white-space: normal; line-height: 1.7; list-style: none; }
.announcement-container .announcement-list li { font-size: 14px; padding: 0 16px 0 0; }
.home-inner-container, .site-footer { background: #f2f4ff; }
.game-list .game-item { border: 1px solid #c7d0f2; border-radius: 12px; overflow: hidden; }
.game-list .game-name { line-height: 1.7; }
.game-list .wrapper-container:focus-within .link-container { display: flex; }
.game-list .play-now { color: #fff; background: #142d91; }
.game-list .link-container { color: #fff; }
.home-progressive-jackpot .jackpot-container { font-family: Tahoma, sans-serif; }
.home-progressive-jackpot .jackpot-currency { color: #ffcf42; }
.home-progressive-jackpot #progressive_jackpot { color: #fff; }
.modal { overflow-y: auto; padding: 12px; z-index: 1060; }
.modal .modal-dialog { width: min(600px, 100%); max-width: 100%; margin: 24px auto; padding: 0; height: auto; min-height: calc(100dvh - 72px); display: flex; align-items: center; }
.modal .modal-content { width: 100%; overflow-wrap: anywhere; max-width: 100%; background: #f2f4ff; box-shadow: 0 12px 48px #10247733; }
.modal .modal-body { width: 100%; padding: 20px; color: #243966; max-height: calc(100dvh - 180px); overflow-y: auto; }
.modal-body img { height: auto; max-width: 100%; }
.modal .modal-header { padding: 16px; background: #142d91; background-image: none; color: #fff; }
.modal-title { line-height: 1.6; }
.modal-header .close { min-width: 44px; min-height: 44px; opacity: 1; margin-top: -8px; }
.modal-footer .btn { min-height: 44px; }
.modal .btn-primary { min-height: 44px; padding: 10px 16px; background: #142d91; color: #fff; border: 1px solid #142d91; }
.modal .btn-primary:hover { background: #102477; color: #fff; }
.modal .btn-link { min-height: 44px; padding: 10px 12px; color: #142d91; }
.modal-body p { line-height: 1.8; margin-bottom: 16px; }
.modal .register-page-reminder { margin-top: 16px; }
.thai-recovery-status { padding: 12px; border: 1px solid #8191c7; border-radius: 8px; }
[role="button"], .language_selector, .game-item .wrapper-container { cursor: pointer; }
.modal-open { overflow: hidden; }
.thai-modal-backdrop { position: fixed; inset: 0; z-index: 1040; background: #07144299; }
.thai-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; background: #e7ebff; color: #142d91; }
.search-popup-container.thai-search-container { top: var(--thai-header-height, 125px); bottom: auto; height: auto; width: 100%; background: #e7ebff; overflow: visible; }
.search-popup-container.thai-search-container.open { display: block; }
.thai-search input { flex: 1 1 160px; min-height: 44px; padding: 8px 12px; border: 1px solid #8191c7; border-radius: 8px; }
.thai-search button { min-height: 44px; padding: 8px 16px; background: #142d91; color: #fff; border: 0; border-radius: 8px; }
.language-selector-container { position: relative; }
.language-selector-trigger > img { display: none; }
.language-selector-container.thai-open .language-selector { display: block; }
.language-selector-container .language-selector { right: 0; left: auto; max-height: min(70dvh, 520px); overflow-y: auto; }
.language-selector-container .language_selector { min-height: 44px; }
.language_selector[aria-checked="true"] { outline: 2px solid #ffba00; outline-offset: -2px; }
.announcement-container [data-icon="news"][role="button"] { background-image: none; display: inline-flex; align-items: center; justify-content: center; }
.announcement-container [data-icon="news"][role="button"]::before { content: "i"; font: bold 16px Tahoma, sans-serif; color: #142d91; border: 1px solid currentColor; border-radius: 50%; width: 22px; height: 22px; text-align: center; }
.search_popup_button { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; }
.search_popup_button::before { content: "⌕"; color: #142d91; font-size: 28px; line-height: 1; }
.search_popup_button > i { display: none; }
[hidden] { display: none !important; }
@media (max-width: 991px) {
    .topbar-inner-container { gap: 12px; }
    .topbar-sub-section { margin-bottom: 4px; font-size: 12px; }
    .topbar-inner-container .logo > picture img { height: 54px; }
    .top-menu { overflow-x: auto; flex-shrink: 1; }
    .top-menu > li { flex-shrink: 0; }
    .top-menu .games-container > li { flex-basis: calc(25% - 16px); }
    .menu-slide > i { display: none; }
    .dragon-info-head h3 { font-size: 18px; }
    .dragon-info-list h4, .dragon-service-stat h4 { font-size: 16px; }
    .dragon-info-list p, .dragon-info-head p, .dragon-support-list a, .dragon-service-stat p { font-size: 14px; line-height: 1.8; }
    #download_apk.download-apk { flex-direction: column; min-height: 0; }
    #download_apk > div:nth-child(1) { padding: 24px 18px !important; }
    #download_apk > div:nth-child(2) { align-self: center; }
    #download_apk > div:nth-child(2) img { height: 280px !important; max-width: 100%; }
    .download-apk .h2 { font-size: 30px; }
    .download-apk .h3 { font-size: 20px; }
    .footer-provider-list, .support-container { flex-wrap: wrap; gap: 12px; }
    .game-list-container .game-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
    .game-list-container .game-list .game-item { width: auto; margin: 0; border-radius: 12px; }
    .game-list .wrapper-container { border-radius: 8px; }
    .popular-game-title-container + .game-list-container .game-list { display: flex; flex-wrap: nowrap; }
    .popular-game-title-container + .game-list-container .game-list .games-group { width: 135px; margin: 0; }
    .game-list .game-name { font-size: 13px; padding-top: 8px; }
}
@media (max-width: 600px) {
    .container { width: 100%; }
    .topbar-inner-container .logo { flex-basis: 120px; max-width: 30%; height: 48px; }
    .topbar-inner-container .logo > picture img { height: 48px; }
    .topbar-inner-group { flex: 1; flex-direction: row; align-items: center; justify-content: flex-end; gap: 4px; }
    .topbar-sub-section { flex-wrap: nowrap; margin: 0; }
    .topbar-sub-section .topbar-item:not(:first-child) { display: none; }
    .topbar-sub-section .topbar-item { padding-inline: 4px; }
    .login-panel { display: flex; gap: 6px; }
    .login-panel .login-panel-item, .login-panel .login-panel-item:last-of-type { margin: 0; padding: 0; }
    .login-panel .login-button, .login-panel .register-button { width: auto; margin: 0; padding: 8px; font-size: 13px; white-space: nowrap; min-width: 0; }
    .topbar-sub-section .topbar-item a.search_popup_button { padding: 0; width: 32px; min-width: 32px; }
    .top-menu .games-container { gap: 10px; }
    .top-menu .games-container > li { flex-basis: calc(33.333% - 10px); }
    .site-footer .site-description h1 { font-size: 27px; line-height: 1.6; }
    .site-footer .site-description h2 { font-size: 23px; line-height: 1.6; }
    .site-footer .site-description p { font-size: 16px; line-height: 1.9; }
    .dragon-info-card { padding-inline: 0; }
    .home-progressive-jackpot .border-container { flex-wrap: wrap; gap: 8px; justify-content: center; }
    .home-progressive-jackpot .jackpot-container { font-size: 30px; }
    .download-apk .h2 { font-size: 26px; }
    .copyright { text-align: center; }
    .announcement-container > [data-section="announcements"] { flex-basis: 100%; padding: 8px; }
    .announcement-container > [data-section="date"] { display: none; }
    .modal { padding: 8px; }
    .modal .modal-dialog { margin: 12px auto; min-height: calc(100dvh - 40px); }
    .modal .modal-body { padding: 16px; }
    .home-inner-container { padding: 16px; border-radius: 18px; }
    .game-list-container .game-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .popular-game-title-container + .game-list-container { padding: 8px; border-radius: 14px; }
    .popular-game-title-container + .game-list-container .game-list .games-group { width: min(135px, 36vw); }
    .forgot-password-dice-1, .forgot-password-dice-2 { display: none; }
    .standard-inline-form-group { flex-wrap: wrap; }
    .standard-inline-form-group > label, .standard-inline-form-group > [data-section="input"] { width: 100%; max-width: 100%; }
}
