/* 
 * Estilos para o Seletor de Idiomas MEGH 
 */

.megh-lang-switcher {
    position: relative;
    font-family: inherit;
    display: inline-block;
}

.megh-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #eee;
    font-size: 1.5em;
    line-height: 1;
    margin-right: 8px;
    width: 24px;
    height: 24px;
}

.megh-lang-flag.round {
    border-radius: 50%;
}

.megh-lang-flag.square {
    border-radius: 4px;
}

.megh-lang-text {
    font-size: 14px;
    font-weight: 500;
}

/* Dropdown Menu Styles */
.megh-lang-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid transparent;
    transition: background 0.2s;
    border-radius: 4px;
}

.megh-lang-dropdown-toggle:hover {
    background: rgba(0,0,0,0.05);
}

.megh-lang-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0; /* Alinha à direita por padrão para evitar quebra em menus laterais */
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 5px;
    border-radius: 6px;
    min-width: 80px; /* Reduzido de 140px para 80px */
    margin-top: 5px;
    border: 1px solid #e2e4e7;
}

.megh-lang-dropdown-menu .megh-lang-link {
    display: flex;
    align-items: center;
    justify-content: center; /* Centraliza o conteúdo (siglas) */
    padding: 6px 10px;
    margin-bottom: 2px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.megh-lang-dropdown-menu .megh-lang-link:last-child {
    margin-bottom: 0;
}

.megh-lang-dropdown-menu .megh-lang-link:hover {
    background: #f1f3f5;
    opacity: 1 !important;
}

.megh-lang-dropdown-menu .megh-lang-link.is-active {
    background: #e9ecef;
    font-weight: 700;
    pointer-events: none; /* Opcional: desabilita o clique no idioma já selecionado */
}

.megh-lang-text.minimal {
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: block;
    width: 100%;
    text-align: center;
}

.megh-lang-switcher.inline {
    display: flex;
    align-items: center;
    gap: 15px;
}
