/* Marina Bay Sands-style language dropdown (top-left) */
.mbs-lang-switcher {
    position: fixed;
    top: 22px;
    left: 24px;
    z-index: 2147483000;
    font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body:has(.cpl-navigation__hamburger) .mbs-lang-switcher {
    left: 132px;
}

.mbs-lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 8px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.2;
    cursor: pointer;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.mbs-lang-switcher__toggle:hover,
.mbs-lang-switcher__toggle:focus {
    outline: none;
    opacity: 0.82;
}

.mbs-lang-switcher__chevron {
    display: block;
    width: 10px;
    height: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.mbs-lang-switcher.is-open .mbs-lang-switcher__chevron {
    transform: rotate(180deg);
}

.mbs-lang-switcher__menu,
.mbs-lang-switcher ul.mbs-lang-switcher__menu,
.mbs-lang-switcher .mbs-lang-switcher__menu li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}

.mbs-lang-switcher__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    margin: 0 !important;
    padding: 8px 0 !important;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    border-radius: 2px;
}

.mbs-lang-switcher.is-open .mbs-lang-switcher__menu {
    display: block;
}

.mbs-lang-switcher__menu li,
.mbs-lang-switcher .mbs-lang-switcher__menu > li {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
}

.mbs-lang-switcher__menu li::before,
.mbs-lang-switcher__menu li::after,
.mbs-lang-switcher__menu li::marker,
.mbs-lang-switcher__menu li > span {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    border: 0 !important;
}

.mbs-lang-switcher__menu button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 18px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    letter-spacing: 0.02em;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.mbs-lang-switcher__menu button:hover,
.mbs-lang-switcher__menu button:focus {
    background: #f4f4ef;
    outline: none;
}

.mbs-lang-switcher__menu button.is-active {
    display: block;
    font-weight: 600;
    background: #f4f4ef;
    cursor: default;
}

.mbs-lang-switcher.is-light .mbs-lang-switcher__toggle {
    color: #111;
    text-shadow: none;
}

.mbs-lang-switcher.is-light .mbs-lang-switcher__chevron path {
    fill: #111;
}

@media (max-width: 1024px) {
    .mbs-lang-switcher,
    body:has(.cpl-navigation__hamburger) .mbs-lang-switcher {
        top: 10px;
        left: 12px;
        right: auto;
    }

    .mbs-lang-switcher__toggle {
        padding: 8px 12px;
        background: rgba(0, 0, 0, 0.45);
        border-radius: 4px;
        text-shadow: none;
        min-height: 40px;
        color: #fff;
    }

    .mbs-lang-switcher.is-light .mbs-lang-switcher__toggle {
        color: #111;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    }

    .mbs-lang-switcher.is-light .mbs-lang-switcher__chevron path {
        fill: #111;
    }

    .mbs-lang-switcher__menu {
        left: 0;
        right: auto;
        min-width: 240px;
        max-width: calc(100vw - 24px);
        max-height: min(70vh, 420px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
