/* ====== HIGHLIGHT-PANEL ====== */
.highlight-panel {
    background: rgba(255, 255, 255, 0.05);
    /* Полупрозрачный светлый фон */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 0px;
    position: relative;
    /* Для точного позиционирования language-selector */
}

/* ====== ВЫБОР ЯЗЫКА ====== */
.language-selector {
    position: absolute;
    top: -36px;
    /* Сдвигаем выше highlight-panel, учитывая новую высоту кнопки */
    right: 30px;
    /* Смещаем левее, чтобы не наезжать на скруглённый угол */
    z-index: 10;
    /* Поверх других элементов */
}

.language-toggle {
    background: rgba(255, 255, 255, 0.05);
    /* Тот же фон, что у highlight-panel */
    border: 1px solid var(--border);
    border-bottom: none;
    /* Убираем нижнюю границу для слияния */
    border-radius: 14px 14px 0 0;
    /* Скругление только сверху */
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 36px;
    /* Уменьшенная высота */
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    /* Убрано transform */
}



.language-flag {
    width: 28px;
    /* Уменьшено для соответствия меньшей высоте кнопки */
    height: 28px;
    object-fit: contain;
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    /* Под кнопкой */
    right: 0;
    background: rgba(255, 255, 255, 0.05);
    /* Тот же фон, что у highlight-panel */
    border: 1px solid var(--border);
    border-top: none;
    /* Убираем верхнюю границу для слияния с кнопкой */
    border-radius: 0 0 14px 14px;
    /* Скругление только снизу */
    box-shadow: var(--shadow);
    padding: 3px;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
    transform: translateY(8px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.language-dropdown.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.language-option {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    width: 40px;
    height: 40px;
}

.language-option:hover {
    background: rgba(39, 106, 252, 0.1);
}

.language-option.hidden {
    display: none;
    /* Скрываем выбранный язык */
}

@media (max-width:720px) {
    :root {
        --mobile-gutter: 12px;
    }

    /* желаемый отступ от правого края экрана */

    .language-selector {
        /* прижимаем к правой кромке вьюпорта с полем --mobile-gutter */
        right: calc(50% - 50vw + var(--mobile-gutter));
        top: -40px;
        /* при необходимости подгони */
        z-index: 20;
    }

    .language-selector {
        top: -36px;
    }
}










/* ====== QUICK-ACTIONS WRAPPER (TOTP + Language) ====== */
.quick-actions {
    position: absolute;
    top: -36px;
    right: 30px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* внутри общего контейнера убираем абсолют для language-selector */
.quick-actions .language-selector {
    position: static;
    top: auto;
    right: auto;
}

/* ====== TOTP BUTTON (в стиле language-toggle) ====== */
.totp-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "EA Display", sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}



/* ====== MOBILE ====== */
@media (max-width:720px) {
    :root { --mobile-gutter: 12px; }

    .quick-actions {
        right: calc(50% - 50vw + var(--mobile-gutter));
        top: -40px;
        gap: 6px;
    }

    .totp-button {
        height: 40px;
        padding: 0 12px;
        border-radius: 14px 14px 0 0;
    }
}


.totp-button,
.language-toggle,
.language-dropdown {
  box-shadow: none !important;
}

/* И на ховере тоже без тени */
.totp-button:hover,
.language-toggle:hover,
.language-dropdown.show {
  box-shadow: none !important;
}