/* ============================================================
   КНОПКИ В СТИЛЕ MAX — УПРОЩЁННАЯ ВЕРСИЯ
   ============================================================ */

/* Контейнер для кнопок в навигации */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Базовый стиль для кнопок-иконок */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 22px;
    text-decoration: none;
    /* Было transition: all — стало только GPU-friendly свойства */
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    position: relative;
    will-change: transform;
}

/* Кнопка Telegram */
.icon-btn-telegram {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: visible !important;
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn-telegram svg {
    width: 48px;
    height: 48px;
    display: block;
    border-radius: 50%;
    transition: filter 0.3s ease;
    pointer-events: none;
}

.icon-btn-telegram:hover {
    transform: translateY(-3px) scale(1.05);
}

.icon-btn-telegram:hover svg {
    filter: brightness(1.08) drop-shadow(0 4px 12px rgba(34, 158, 217, 0.35));
}

/* Кнопка "Заказать звонок" — белая */
.icon-btn-phone {
    background: #fff;
    color: var(--blue);
    /* Убрал постоянную box-shadow — заменяю на border для объёма */
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Если очень хочется тень — оставьте, но она даёт нагрузку на рендер */
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); */
}

.icon-btn-phone:hover {
    /* Убрал box-shadow и scale — оставил только translateY */
    transform: translateY(-3px);
    background: #fff;
    color: var(--blue-l);
}

/* Кнопка MAX — только логотип, без рамки и фона */
.icon-btn-max {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: visible !important;
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn-max svg {
    width: 48px;
    height: 48px;
    display: block;
    border-radius: 12px;
    /* Убрал transition на filter — он давал основной лаг */
    pointer-events: none;
}

.icon-btn-max:hover {
    transform: translateY(-3px);
}

/* Убрал filter: brightness + drop-shadow — это самая дорогая часть */
/* Заменил на лёгкое изменение через opacity родителя */
.icon-btn-max:hover svg {
    /* Никаких фильтров — иконка остаётся как есть */
}

/* ============================================================
   ПОДПИСИ (TOOLTIP)
   ============================================================ */

.icon-btn .tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(20, 26, 40, 0.96);           /* плотнее фон — blur больше не нужен */
    /* Убрал backdrop-filter: blur(12px) — главный источник лагов */
    color: #fff;
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    /* Анимируем только transform и opacity — это GPU-friendly */
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    /* Убрал box-shadow: 0 10px 40px — очень дорогая тень */
    /* Заменил на лёгкий border снизу + небольшую тень */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    will-change: transform, opacity;
}

.icon-btn .tooltip .highlight {
    color: var(--blue);
}

.icon-btn .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(20, 26, 40, 0.96);
}

.icon-btn:hover .tooltip {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

.icon-btn.active .tooltip {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Разделитель */
.nav-actions .sep {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

/* ============================================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ============================================================ */

@media (max-width: 820px) {
    .icon-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
        border-radius: 10px;
    }

    .icon-btn-max svg {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .icon-btn .tooltip {
        font-size: 12px;
        padding: 5px 14px;
        bottom: calc(100% + 10px);
    }
}

@media (max-width: 600px) {
    .nav-actions {
        gap: 8px;
        flex-wrap: wrap;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 8px;
    }

    .icon-btn-max svg {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }

    .nav-actions .sep {
        height: 24px;
    }
}