/* =========================================================
   Dolphin Trade Pro — language switcher
   Loaded after main.css / style.css / pages.css.
   The dropdown and the in-menu language grid are both
   driven by assets/js/i18n.js.
   ========================================================= */

.lang-switch {
    position: relative;
    z-index: 20;
}

.lang-switch__btn {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 14px;
    background: transparent;
    border: 1px solid var(--tg-border-1);
    border-radius: 999px;
    color: var(--tg-color-white-default);
    font-family: var(--tg-heading-font-family);
    font-size: 12px;
    font-weight: var(--tg-fw-semi-bold);
    letter-spacing: 0.08em;
    line-height: 1;
    cursor: pointer;
    -webkit-transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.lang-switch__btn:hover,
.lang-switch__btn:focus-visible,
.lang-switch.is-open .lang-switch__btn {
    color: var(--tg-primary-color);
    border-color: var(--tg-primary-color);
    background: rgba(255, 204, 102, 0.06);
    outline: none;
}

.lang-switch__btn .fa-globe {
    font-size: 14px;
    color: var(--tg-primary-color);
}

.lang-switch__btn .fa-chevron-down {
    font-size: 9px;
    opacity: 0.65;
    -webkit-transition: transform 0.25s ease;
    transition: transform 0.25s ease;
}

.lang-switch.is-open .lang-switch__btn .fa-chevron-down {
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
}

.lang-switch__code {
    min-width: 20px;
    text-align: center;
}

.lang-switch__menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 194px;
    padding: 8px;
    background: #101010;
    border: 1px solid var(--tg-border-1);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    -webkit-transform: translateY(-6px);
    -ms-transform: translateY(-6px);
    transform: translateY(-6px);
    -webkit-transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.lang-switch.is-open .lang-switch__menu {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}

.lang-switch__menu button {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: 0;
    border-radius: 9px;
    color: #cfcfcf;
    font-family: var(--tg-body-font-family);
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    -webkit-transition: color 0.2s ease, background 0.2s ease;
    transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch__menu button:hover,
.lang-switch__menu button:focus-visible {
    background: rgba(255, 204, 102, 0.08);
    color: var(--tg-color-white-default);
    outline: none;
}

.lang-switch__menu button.is-active {
    background: rgba(255, 204, 102, 0.14);
    color: var(--tg-primary-color);
}

.lang-switch__menu button.is-active::after {
    content: "\2713";
    font-size: 12px;
    line-height: 1;
}

/* Mobile menu: a flat grid is easier to tap and cannot be
   clipped by the scrollable .tgmobile__menu-box. */
.lang-switch--inline {
    margin: 26px 20px 0;
    padding: 22px 0 4px;
    border-top: 1px solid var(--tg-border-1);
}

.lang-switch__title {
    display: block;
    margin-bottom: 14px;
    color: var(--tg-primary-color);
    font-family: var(--tg-heading-font-family);
    font-size: 12px;
    font-weight: var(--tg-fw-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lang-switch__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.lang-switch__grid button {
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tg-border-1);
    border-radius: 8px;
    color: #d6d6d6;
    font-family: var(--tg-body-font-family);
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    -webkit-transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lang-switch__grid button:hover,
.lang-switch__grid button:focus-visible {
    color: var(--tg-color-white-default);
    border-color: var(--tg-primary-color);
    outline: none;
}

.lang-switch__grid button.is-active {
    color: var(--tg-primary-color);
    border-color: var(--tg-primary-color);
    background: rgba(255, 204, 102, 0.08);
}

/* ---------------------------------------------------------
   Desktop navigation: always one row, never two.
   The right-hand "Open an Account" CTA was removed, so the nav
   has more room and can use a comfortable size again.
   --------------------------------------------------------- */
@media (min-width: 992px) {
    .tgmenu__nav,
    .tgmenu__navbar-wrap > ul {
        flex-wrap: nowrap;
    }

    .tgmenu__navbar-wrap {
        min-width: 0;
    }

    .tgmenu__navbar-wrap > ul > li {
        flex: 0 0 auto;
    }

    .tgmenu__navbar-wrap > ul > li > a {
        padding: 27px 8px;
        font-size: 12px;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .tgmenu__nav .logo,
    .tgmenu__action {
        flex: 0 0 auto;
    }

    .tgmenu__nav .logo img {
        max-width: 160px;
        max-height: 36px;
        width: auto;
        height: auto;
    }

    .tgmenu__action > ul li.header-lang {
        margin-left: 10px;
    }

    .lang-switch__btn {
        gap: 0;
        padding: 8px 10px;
    }

    .lang-switch__code,
    .lang-switch__btn .fa-chevron-down {
        display: none;
    }
}

@media (min-width: 1200px) {
    .tgmenu__nav .logo img {
        max-width: 170px;
        max-height: 40px;
        width: auto;
        height: auto;
    }

    .tgmenu__navbar-wrap > ul > li > a {
        padding: 27px 12px;
        font-size: 13px;
    }

    .tgmenu__action > ul li.header-lang {
        margin-left: 14px;
    }
}

@media (min-width: 1400px) {
    .tgmenu__nav .logo img {
        max-width: 180px;
        max-height: 45px;
        width: auto;
        height: auto;
    }

    .tgmenu__navbar-wrap > ul > li > a {
        padding: 27px 16px;
        font-size: 14px;
    }

    .tgmenu__action > ul li.header-lang {
        margin-left: 16px;
    }

    .lang-switch__btn {
        gap: 8px;
        padding: 9px 12px;
    }

    .lang-switch__code {
        display: inline;
    }

    .lang-switch__btn .fa-chevron-down {
        display: inline-block;
    }
}

@media (max-width: 380px) {
    .lang-switch__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------------------------------------------------------
   Static language switchers used by the generated pages.
   The pages are plain HTML: <details> opens the desktop menu
   and the mobile grid is a list of ordinary links.
   --------------------------------------------------------- */
.lang-switch--static > summary {
    list-style: none;
    cursor: pointer;
}

.lang-switch--static > summary::-webkit-details-marker {
    display: none;
}

.lang-switch--static > summary::marker {
    content: "";
}

.lang-switch--static[open] .lang-switch__menu {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}

.lang-switch__menu a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 9px;
    color: #cfcfcf;
    font-family: var(--tg-body-font-family);
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    -webkit-transition: color 0.2s ease, background 0.2s ease;
    transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch__menu a:hover,
.lang-switch__menu a:focus-visible {
    background: rgba(255, 204, 102, 0.08);
    color: var(--tg-color-white-default);
    outline: none;
}

.lang-switch__menu a.is-active {
    background: rgba(255, 204, 102, 0.14);
    color: var(--tg-primary-color);
}

.lang-switch__menu a.is-active::after {
    content: "\2713";
    font-size: 12px;
    line-height: 1;
}

.lang-switch__grid a {
    display: block;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tg-border-1);
    border-radius: 8px;
    color: #d6d6d6;
    font-family: var(--tg-body-font-family);
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    -webkit-transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lang-switch__grid a:hover,
.lang-switch__grid a:focus-visible {
    color: var(--tg-color-white-default);
    border-color: var(--tg-primary-color);
    outline: none;
}

.lang-switch__grid a.is-active {
    color: var(--tg-primary-color);
    border-color: var(--tg-primary-color);
    background: rgba(255, 204, 102, 0.08);
}

.is-i18n-busy .lang-switch {
    pointer-events: none;
    opacity: 0.65;
}

/* The brand/regulator logo strip uses Swiper. Swiper's default
   .swiper-wrapper { height: 100% } creates a circular percentage-height
   chain on the translated snapshots and can inflate the strip to several
   hundred pixels. Let the slide content define the height instead. */
.brand__area .swiper-container,
.brand__area .swiper-wrapper,
.brand__area .swiper-slide {
    height: auto;
}

