/* Плавающие кнопки связи (WhatsApp / Telegram).
   Разметка — Views/Shared/Components/ContactWidget/Default.cshtml.
   Сторона и отступ снизу приходят из админки: класс .is-left/.is-right и --cw-bottom. */

.cw-dock {
    position: fixed;
    bottom: var(--cw-bottom, 24px);
    z-index: 1070;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .cw-dock.is-left {
        left: 18px;
        align-items: flex-start;
    }

    .cw-dock.is-right {
        right: 18px;
        align-items: flex-end;
    }

.cw-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .38);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .cw-btn:hover,
    .cw-btn:focus-visible {
        color: #fff;
        transform: scale(1.07);
        box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
    }

    .cw-btn svg {
        width: 30px;
        height: 30px;
        display: block;
        fill: currentColor;
    }

.cw-whatsapp {
    background: linear-gradient(135deg, #4be07a 0%, #25d366 55%, #128c7e 100%);
}

.cw-telegram {
    background: linear-gradient(135deg, #56c1ee 0%, #229ed9 55%, #1b7fb0 100%);
}

/* Пульсирующее кольцо — чтобы кнопку замечали, но без дёрганья макета. */
.cw-btn::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: .55;
    animation: cw-pulse 2.4s ease-out infinite;
}

@keyframes cw-pulse {
    0% {
        transform: scale(1);
        opacity: .5;
    }

    70% {
        transform: scale(1.45);
        opacity: 0;
    }

    100% {
        transform: scale(1.45);
        opacity: 0;
    }
}

/* Подпись выезжает при наведении; на тач-экранах её прячем (см. media ниже). */
.cw-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: #10161f;
    background: #f4f6fa;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.is-left .cw-label {
    left: calc(100% + 12px);
}

.is-right .cw-label {
    right: calc(100% + 12px);
}

.cw-btn:hover .cw-label,
.cw-btn:focus-visible .cw-label {
    opacity: 1;
}

@media (hover: none) {
    .cw-label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cw-btn::before {
        animation: none;
    }

    .cw-btn {
        transition: none;
    }
}

@media (max-width: 575.98px) {
    .cw-dock {
        gap: 10px;
    }

        .cw-dock.is-left {
            left: 12px;
        }

        .cw-dock.is-right {
            right: 12px;
        }

    .cw-btn {
        width: 48px;
        height: 48px;
    }

        .cw-btn svg {
            width: 26px;
            height: 26px;
        }
}
