/* ==========================================================================
   Centraliza — Idiomas: Estilos Frontend del Selector Desplegable
   ========================================================================== */

.cntrlz-lang-switcher-dropdown {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    z-index: 99999;
}

/* Botón del idioma seleccionado */
.cntrlz-lang-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f2f2f2;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 7px 12px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    min-width: 68px;
    box-sizing: border-box;
}

.cntrlz-lang-current:hover {
    background: #e8e8e8;
    border-color: #cccccc;
}

.cntrlz-lang-flag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.cntrlz-lang-flag-icon svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cntrlz-lang-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4cd964;
    transition: transform 0.2s ease;
}

.cntrlz-lang-arrow svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.cntrlz-lang-switcher-dropdown:hover .cntrlz-lang-arrow {
    transform: rotate(180deg);
}

/* Menú desplegable flotante */
.cntrlz-lang-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 100%;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 100000;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: hidden;
}

.cntrlz-lang-switcher-dropdown:hover .cntrlz-lang-dropdown-menu,
.cntrlz-lang-switcher-dropdown.active .cntrlz-lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Elemento del desplegable */
.cntrlz-lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #2c2c2c;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f4f4f4;
    box-sizing: border-box;
}

.cntrlz-lang-dropdown-item:last-child {
    border-bottom: none;
}

.cntrlz-lang-dropdown-item:hover {
    background: #f7f7f9;
    color: #111111;
}

.cntrlz-lang-dropdown-item.active {
    background: #f0f4ff;
    font-weight: 700;
}

.cntrlz-lang-code {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #444;
}
