/* TH/EN as a quiet text pair: hairline divider, the active language in ink with a 1px underline
   (same mark as the current nav section). Each option is a 44px target. */
.lang-switch {
    display: inline-flex;
    align-items: center;
    flex: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "IBM Plex Sans Thai", "DM Sans", sans-serif;
    line-height: 1;
}

.lang-switch-sep {
    width: 1px;
    height: 12px;
    background: #cfcac0;
}

.lang-switch-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    color: #7a7c82;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .3s ease;
}

.lang-switch-option::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 13px;
    width: 1.6em;
    height: 1px;
    translate: -50% 0;
    background: currentColor;
    transform: scaleX(0);
    transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}

.lang-switch-option:hover { color: #15171c; }
.lang-switch-option.is-active { color: #15171c; }
.lang-switch-option.is-active::after { transform: scaleX(1); }

.lang-switch-option:focus-visible {
    outline: 1px solid #15171c;
    outline-offset: -6px;
    border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
    .lang-switch-option, .lang-switch-option::after { transition: none; }
}

@media (forced-colors: active) {
    .lang-switch-sep { background: CanvasText; }
    .lang-switch-option.is-active { text-decoration: underline; text-underline-offset: 6px; }
    .lang-switch-option.is-active::after { display: none; }
    .lang-switch-option:focus-visible { outline-color: CanvasText; }
}
