/* Основные стили кнопки */
.telegram-mobile-button {
    /* Позиционирование - ЛЕВАЯ СТОРОНА */
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;

    /* Размер и форма */
    width: 60px;
    height: 60px;
    border-radius: 50%;

    /* Фон с использованием CSS переменной */
    background-color: var(--blue, var(--tmb-blue, #34b7f1));
    background: linear-gradient(135deg,
        var(--blue, var(--tmb-blue, #34b7f1)) 0%,
        color-mix(in srgb, var(--blue, var(--tmb-blue, #34b7f1)) 90%, #000) 100%);

    /* Тень */
    box-shadow: 0 4px 15px rgba(52, 183, 241, 0.4);

    /* Центрирование иконки */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Анимация */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Убираем стандартные стили ссылки */
    text-decoration: none;
    border: none;
    cursor: pointer;
    outline: none;
}

/* Иконка PNG */
.telegram-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* Иконка SVG (fallback) */
.telegram-icon-svg {
    width: 24px;
    height: 24px;
    fill: white;
    transition: transform 0.3s ease;
}

/* Эффекты при наведении (для устройств с hover) */
@media (hover: hover) {
    .telegram-mobile-button:hover {
        background: linear-gradient(135deg,
            color-mix(in srgb, var(--blue, var(--tmb-blue, #34b7f1)) 90%, #000) 0%,
            color-mix(in srgb, var(--blue, var(--tmb-blue, #34b7f1)) 80%, #000) 100%);
        box-shadow: 0 6px 20px rgba(52, 183, 241, 0.6);
        transform: scale(1.05);
    }

    .telegram-mobile-button:hover .telegram-icon,
    .telegram-mobile-button:hover .telegram-icon-svg {
        transform: scale(1.1);
    }
}

/* Эффект при нажатии */
.telegram-mobile-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(52, 183, 241, 0.4);
}

/* Фокус для accessibility */
.telegram-mobile-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Показываем только на мобильных устройствах */
@media screen and (max-width: 576px) {
    .telegram-mobile-button {
        animation: tmb-fade-in 0.5s ease-out;
    }

    /* Адаптивные отступы для очень маленьких экранов */
    @media screen and (max-width: 360px) {
        .telegram-mobile-button {
            bottom: 20px;
            left: 20px;
            width: 56px;
            height: 56px;
        }

        .telegram-icon,
        .telegram-icon-svg {
            width: 22px;
            height: 22px;
        }
    }
}

/* Анимация появления */
@keyframes tmb-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
