﻿/* =========================================================
   Seletor global de idioma

   Prefixo:
   bvi18n = Belovety Internacionalização
   ========================================================= */

.bvi18n-language,
.bvi18n-language *,
.bvi18n-language *::before,
.bvi18n-language *::after {
    box-sizing: border-box;
}

.bvi18n-language {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
}

.bvi18n-language__control {
    position: relative;
    min-width: 66px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 0 10px;
    overflow: hidden;
    border: 1px solid rgba(35, 39, 48, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: #343943;
    box-shadow: 0 5px 16px rgba(20, 24, 33, .09);
    cursor: pointer;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

    .bvi18n-language__control:hover {
        border-color: rgba(255, 7, 135, .28);
        background: #ffffff;
        box-shadow: 0 7px 20px rgba(20, 24, 33, .13);
        transform: translateY(-1px);
    }

    .bvi18n-language__control:focus-within {
        border-color: rgba(255, 7, 135, .52);
        box-shadow: 0 0 0 3px rgba(255, 7, 135, .13), 0 7px 20px rgba(20, 24, 33, .12);
    }

    .bvi18n-language__control > .fa-globe {
        flex: 0 0 auto;
        color: #ff0787;
        font-size: .9rem;
    }

.bvi18n-language__code {
    color: inherit;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .035em;
}

.bvi18n-language__chevron {
    flex: 0 0 auto;
    color: currentColor;
    font-size: .58rem;
    opacity: .68;
}

/*
 * O select cobre integralmente o controle.
 * Continua acessível e abre o seletor nativo.
 */
.bvi18n-language select {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.bvi18n-language__noscript {
    min-height: 38px;
    margin-left: 6px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: #ff0787;
    color: #ffffff;
    font-size: .75rem;
    font-weight: 800;
}

/* =========================================================
   Dentro do Header Principal

   Usa o mesmo estilo translúcido do sino.
   ========================================================= */

.bvh-header .bvi18n-language__control {
    min-width: 58px;
    height: 43px;
    padding: 0 9px;
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .13);
    color: #ffffff;
    box-shadow: none;
}

    .bvh-header .bvi18n-language__control:hover,
    .bvh-header .bvi18n-language__control:focus-within {
        border-color: rgba(255, 255, 255, .48);
        background: rgba(255, 255, 255, .22);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, .10);
    }

    .bvh-header .bvi18n-language__control > .fa-globe {
        color: #ffffff;
    }

/* =========================================================
   Dentro do Header Simples
   ========================================================= */

.bvhs-header .bvi18n-language__control {
    min-width: 58px;
    height: 40px;
    padding: 0 9px;
    border-color: rgba(255, 255, 255, .20);
    background: rgba(255, 255, 255, .11);
    color: #ffffff;
    box-shadow: none;
}

    .bvhs-header .bvi18n-language__control:hover,
    .bvhs-header .bvi18n-language__control:focus-within {
        border-color: rgba(255, 255, 255, .42);
        background: rgba(255, 255, 255, .20);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, .16);
    }

    .bvhs-header .bvi18n-language__control > .fa-globe {
        color: #ffffff;
    }

/* =========================================================
   Telas de Account

   Fica no canto superior direito, não no rodapé.
   ========================================================= */

.bvi18n-language-host--access {
    position: fixed;
    z-index: 1250;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    display: inline-flex;
}

/* =========================================================
   Mobile

   Exibe somente o globo para não ocupar o Header.
   ========================================================= */

@media (max-width: 700px) {
    .bvh-header .bvi18n-language__control,
    .bvhs-header .bvi18n-language__control {
        width: 39px;
        min-width: 39px;
        height: 39px;
        padding: 0;
        border-radius: 50%;
    }

    .bvh-header .bvi18n-language__code,
    .bvh-header .bvi18n-language__chevron,
    .bvhs-header .bvi18n-language__code,
    .bvhs-header .bvi18n-language__chevron {
        display: none;
    }

    .bvi18n-language-host--access {
        top: max(10px, env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
    }

        .bvi18n-language-host--access .bvi18n-language__control {
            width: 38px;
            min-width: 38px;
            height: 38px;
            padding: 0;
            border-radius: 50%;
        }

        .bvi18n-language-host--access .bvi18n-language__code,
        .bvi18n-language-host--access .bvi18n-language__chevron {
            display: none;
        }
}

@media (max-width: 380px) {
    .bvh-header .bvi18n-language__control,
    .bvhs-header .bvi18n-language__control {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bvi18n-language__control {
        transition: none;
    }

        .bvi18n-language__control:hover {
            transform: none;
        }
}
