/* Contact Modal Widget */
.contact-modal {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: linear-gradient(135deg, #b6273e 0%, #004584 100%);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: Arial, sans-serif;
    color: white;
}

.contact-modal.active {
    transform: translateY(0);
    opacity: 1;
}

.contact-modal-header {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-align: center;
}

.contact-modal-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) rotate(90deg);
}

.contact-modal-body {
    padding: 20px;
}

.contact-call-to-action {
    margin: 0 0 20px 0;
    font-size: 14px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.contact-buttons {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.contact-btn:hover {
    transform: translateY(-3px) scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: white;
}

.contact-phone:hover {
    background: rgba(34, 197, 94, 0.8);
    border-color: #22c55e;
}

.contact-telegram:hover {
    background: rgba(0, 136, 204, 0.8);
    border-color: #0088cc;
}

.contact-shop:hover {
    background: rgba(148, 87, 238, 0.8);
    border-color: #3786fe;
}

/* Toggle Button */
.contact-modal-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #b6273e 0%, #004584 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    color: white;
    font-size: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    transform: scale(0);
    opacity: 0;
}

.contact-modal-toggle.active {
    transform: scale(1);
    opacity: 1;
}

/* Pulse Animation */
.contact-modal-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #b6273e 0%, #004584 100%);
    z-index: -1;
    animation: pulse 2s infinite;
}

.contact-modal-toggle::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    border: 2px solid rgba(182, 39, 62, 0.6);
    z-index: -2;
    animation: ripple 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    70% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.contact-modal-toggle:hover {
    transform: scale(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .contact-modal {
        width: 260px;
        left: 15px;
        bottom: 15px;
    }
    
    .contact-modal-toggle {
        width: 55px;
        height: 55px;
        left: 15px;
        bottom: 15px;
        font-size: 18px;
    }
    
    .contact-buttons {
        gap: 10px;
    }
    
    .contact-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .contact-modal {
        width: calc(100vw - 30px);
        max-width: 240px;
    }
    
    .contact-modal-header h4 {
        font-size: 14px;
    }
    
    .contact-call-to-action {
        font-size: 13px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .contact-modal {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
}
