/**
 * WhatsApp Popup Widget
 * Modern floating WhatsApp button with popup message
 */

.whatsapp-popup-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* WhatsApp Toggle Button */
.whatsapp-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: none;
    position: relative;
}

.whatsapp-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-toggle:active {
    transform: scale(1.05);
}

.whatsapp-toggle svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Pulse Animation */
.whatsapp-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: pulse 2s infinite;
}

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

/* Popup Message Box */
.whatsapp-popup-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.whatsapp-popup-box.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Popup Header */
.whatsapp-popup-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    padding: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-popup-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-popup-avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.whatsapp-popup-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.whatsapp-popup-info p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.9;
}

.whatsapp-popup-close {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.whatsapp-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.whatsapp-popup-close svg {
    width: 16px;
    height: 16px;
    stroke: white;
    stroke-width: 2;
}

/* Popup Body */
.whatsapp-popup-body {
    padding: 16px;
}

.whatsapp-popup-message {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Service Options */
.whatsapp-popup-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.whatsapp-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: left;
}

.whatsapp-option:hover {
    background: #25D366;
    border-color: #25D366;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-option:active {
    transform: translateY(0);
}

.whatsapp-option span:first-child {
    font-size: 16px;
    flex-shrink: 0;
}

.whatsapp-option span:last-child {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-popup-container {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-toggle {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-toggle svg {
        width: 26px;
        height: 26px;
    }
    
    .whatsapp-popup-box {
        width: 280px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .whatsapp-popup-container {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-popup-box {
        width: calc(100vw - 30px);
        right: -5px;
    }
}
