/* Mobile Contact Widget Styles */
.chat-widget {
    display: none !important;
}

@media (max-width: 768px) {
    .chat-widget {
        display: block !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        width: auto !important;
        max-width: none !important;
        z-index: 9999 !important;
    }
}

.chat-button {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #8b3a45;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.chat-button::before {
    content: '';
    position: absolute;
    width: 95%;
    height: 95%;
    border-radius: 50%;
    background: #8b3a45;
    animation: ping 1.5s cubic-bezier(0, 0, 0.3, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.chat-button.active::before {
    animation: none;
    background: #555555;
}

.chat-buttons {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    transform-origin: bottom right;
}

.chat-buttons.active {
    visibility: visible;
    opacity: 1;
}

.messenger-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
    transform: translate(0, 60px);
    opacity: 0;
    transition: all 0.2s;
    z-index: 10000;
}

.chat-buttons.active .messenger-button {
    transform: translate(0);
    opacity: 1;
}

.messenger-button:hover {
    transform: scale(1.05);
}

.whatsapp {
    background: #57d163;
}

.telegram {
    background: #2ca8dd;
}

.vk {
    background: #4a76a8;
}

.phone {
    background: #996464;
}

.max {
    background: linear-gradient(45deg, #27c7ff 0%, #a246ec 100%);
}

.button-title {
    position: absolute;
    right: 60px;
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.messenger-button:hover .button-title {
    opacity: 1;
}

.chat-button img,
.messenger-button img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    z-index: 999;
}

.chat-button-text-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.chat-button.active .chat-button-text-svg {
    opacity: 0;
}

.chat-buttons.active .messenger-button:nth-child(1) {
    transition-delay: 0.25s;
}

.chat-buttons.active .messenger-button:nth-child(2) {
    transition-delay: 0.2s;
}

.chat-buttons.active .messenger-button:nth-child(3) {
    transition-delay: 0.15s;
}

.chat-buttons.active .messenger-button:nth-child(4) {
    transition-delay: 0.1s;
}

.chat-buttons.active .messenger-button:nth-child(5) {
    transition-delay: 0.05s;
}