/* ============================================================
   LANGUAGE MODAL — МОБИЛЬНАЯ ВЕРСИЯ
   ============================================================ */

/* ===== ПО УМОЛЧАНИЮ СКРЫТО ===== */
.lang-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* ✅ КОГДА ОТКРЫТО — ПОКАЗЫВАЕМ */
.lang-modal.open {
    display: flex !important;
}
/* ===== СОДЕРЖИМОЕ ===== */
.lang-modal-content {
    background: #1e1e2e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    min-width: 260px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

/* ===== ЗАГОЛОВОК ===== */
.lang-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.lang-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.lang-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
}

.lang-close-btn:hover {
    color: #fff;
}

/* ===== СПИСОК ЯЗЫКОВ ===== */
.lang-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #2a2a3e;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ccc;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    width: 100%;
    transition: all 0.2s ease;
}

/* ✅ ТОЛЬКО НАВЕДЕНИЕ (кроме активного) */
.lang-option:hover:not(.active) {
    background: #32324a;
    border-color: #555;
}

/* ✅ ТОЛЬКО АКТИВНЫЙ */
.lang-option.active {
    background: #3a3a5e;
    border-color: #6c8cff;
    color: #fff;
}

.lang-option.active:hover {
    background: #3a3a5e;
    border-color: #6c8cff;
    color: #fff;
}

.lang-option input[type="radio"] {
    accent-color: #6c8cff;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* ===== СОСТОЯНИЯ ===== */
.lang-loading {
    color: #94A3B8;
    text-align: center;
    padding: 12px;
    font-size: 14px;
}

.lang-error {
    color: #ef4444;
    text-align: center;
    padding: 12px;
    font-size: 14px;
}

.lang-empty {
    color: #94A3B8;
    text-align: center;
    padding: 12px;
    font-size: 14px;
}

/* ===== SELECT (выпадающий список) ===== */
.lang-selector-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
}

.lang-select {
    width: 100%;
    padding: 12px 16px;
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.lang-select:focus {
    outline: none;
    border-color: #6B82F8;
}

.lang-select option {
    background: #1e1e2e;
    color: #fff;
}

/* ===== КНОПКА ПРИМЕНЕНИЯ ===== */
.lang-apply-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4F6BF6, #7C3AED);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(79, 107, 246, 0.3);
}

.lang-apply-btn:active {
    transform: translateY(0);
}