/* Telegram + Install App floating buttons (shared) */

.telegram-float {
    position: fixed;
    width: 45px;
    height: 45px;
    bottom: 90px;
    right: 30px;
    border-radius: 50%;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    color: #fff;
    background: linear-gradient(145deg, #3fc3f7 0%, #2aabee 42%, #229ed9 100%);
    box-shadow:
        0 4px 14px rgba(34, 158, 217, 0.42),
        0 2px 6px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    animation: floatBtnFadeIn 1s ease, floatBtnBounce 2s infinite 1s;
}

.telegram-float:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 8px 22px rgba(34, 158, 217, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.telegram-float:active {
    transform: translateY(0) scale(0.98);
}

.telegram-float:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 3px;
}

.telegram-float img,
.telegram-float__icon {
    width: 35px;
    height: 35px;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0, 80, 120, 0.25));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.telegram-float:hover img,
.telegram-float:hover .telegram-float__icon {
    transform: scale(1.04);
}

html.dark .telegram-float {
    background: linear-gradient(145deg, #2aabee 0%, #1e8bc4 50%, #167aab 100%);
    box-shadow:
        0 4px 14px rgba(30, 139, 196, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html.dark .telegram-float:hover {
    box-shadow:
        0 8px 22px rgba(30, 139, 196, 0.55),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Install — paired with Telegram (green, white glyph) */
.ios-install-float {
    position: fixed;
    width: 45px;
    height: 45px;
    bottom: 150px;
    right: 30px;
    padding: 0;
    border: none !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none !important;
    z-index: 1000;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    animation: floatBtnFadeIn 1s ease, floatBtnBounce 2s infinite 1s;
}

.ios-install-float__glyph {
    width: 23px;
    height: 23px;
    display: block;
    flex-shrink: 0;
}

.ios-install-float:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 8px 20px rgba(16, 185, 129, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ios-install-float:active {
    transform: translateY(0) scale(0.98);
}

.ios-install-float:focus-visible {
    outline: 2px solid #6ee7b7 !important;
    outline-offset: 3px;
}

html.dark .ios-install-float {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow:
        0 4px 12px rgba(5, 150, 105, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

html.dark .ios-install-float:hover {
    box-shadow:
        0 8px 20px rgba(5, 150, 105, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

@media (max-width: 768px) {
    .ios-install-float {
        bottom: 150px;
        right: 32px;
        width: 40px;
        height: 40px;
    }

    .ios-install-float__glyph {
        width: 20px;
        height: 20px;
    }

    .telegram-float {
        bottom: 90px;
        right: 32px;
        width: 40px;
        height: 40px;
    }

    .telegram-float img {
        width: 30px;
        height: 30px;
    }

}

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

@keyframes floatBtnBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .telegram-float,
    .ios-install-float {
        animation: none;
    }

}
