/*!
 * Square Golf — i18n.css
 * Language switcher styles + font overrides for TH / ZH
 */

/* ── Language dropdown ──────────────────────────────────────── */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    background: none;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    white-space: nowrap;
}

.lang-btn:hover {
    border-color: var(--color-primary, #0c813f);
    background: #f5faf7;
}

.lang-current-label {
    font-size: 13px;
    font-weight: 600;
}

.lang-arrow {
    font-size: 10px;
    color: #999;
    transition: transform .2s;
    display: inline-block;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0px);
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    padding: 4px;
    min-width: 110px;
    display: none;         /* GSAP sets to block on open */
    transform-origin: top center;
    z-index: 9999;
}

.lang-opt {
    display: block;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.lang-opt:hover {
    background: #f5faf7;
    color: var(--color-primary, #0c813f);
}

.lang-opt.is-active {
    color: var(--color-primary, #0c813f);
    background: rgba(12,129,63,.07);
}

/* Mobile lang row — pinned footer inside .mobile-menu */
.mobile-lang-row {
    padding: 12px 24px;
    border-top: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}

.lang-switcher-mobile .lang-btn {
    width: 100%;
    justify-content: space-between;
}

.lang-switcher-mobile .lang-dropdown {
    top: auto;
    bottom: calc(100% + 6px);
    right: auto;
    left: 0;
    right: 0;
    min-width: unset;
    transform-origin: bottom center;
}

/* ── Font overrides for non-Japanese scripts ────────────────── */
html[lang="th"] body,
html[lang="th"] p,
html[lang="th"] h1,
html[lang="th"] h2,
html[lang="th"] h3,
html[lang="th"] h4,
html[lang="th"] li,
html[lang="th"] span,
html[lang="th"] div {
    font-family: 'Noto Sans Thai', 'Noto Sans JP', system-ui, sans-serif;
}

html[lang="zh"] body,
html[lang="zh"] p,
html[lang="zh"] h1,
html[lang="zh"] h2,
html[lang="zh"] h3,
html[lang="zh"] h4,
html[lang="zh"] li,
html[lang="zh"] span,
html[lang="zh"] div {
    font-family: 'Noto Sans SC', 'Noto Sans JP', system-ui, sans-serif;
}
