/* Estilos para el Selector de Idiomas Premium */
:root {
    --lang-primary: #5262FF;
    --lang-bg: #ffffff;
    --lang-text: #1a1a1a;
    --lang-subtext: #7a7a7a;
}

/* Botón flotante disparador */
.lang-selector-trigger {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    background: var(--lang-bg);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 2px solid #eee;
}

.lang-selector-trigger:hover {
    transform: scale(1.1);
}

.lang-selector-trigger img {
    width: 32px;
    height: 22px;
    border-radius: 3px;
    object-fit: cover;
}

/* Modal del Selector */
.lang-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lang-modal {
    background: var(--lang-bg);
    width: 380px;
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.lang-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.lang-modal-icon {
    width: 48px;
    height: 48px;
    background: #6D7AFE;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.lang-modal-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--lang-text);
}

.lang-modal-title p {
    margin: 0;
    font-size: 14px;
    color: var(--lang-subtext);
}

.lang-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: background 0.2s;
}

.lang-close:hover {
    background: #e4e6e9;
}

/* Lista de Idiomas */
.lang-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    border: 1px solid #eee;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.lang-item:hover {
    background: #f8faff;
    border-color: #d0d7ff;
}

.lang-item.active {
    border-color: var(--lang-primary);
    background: #f0f3ff;
}

.lang-item img {
    width: 28px;
    height: 20px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lang-item span {
    font-size: 16px;
    font-weight: 500;
    color: var(--lang-text);
}

.lang-item .check-icon {
    margin-left: auto;
    width: 20px;
    height: 20px;
    background: var(--lang-primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.lang-item.active .check-icon {
    display: flex;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}



[dir="rtl"] .lang-close {
    right: auto;
    left: 20px;
}

[dir="rtl"] .lang-item .check-icon {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .lang-modal-header {
    flex-direction: row-reverse;
    text-align: right;
}

/* Responsive */
@media (max-width: 480px) {
    .lang-modal {
        width: 90%;
        padding: 20px;
    }
}
