/* ===== WHATSAPP CHAT WIDGET STYLES ===== */

.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.whatsapp-button:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-button.pulse {
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.whatsapp-popup-header {
    background: #25D366;
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whatsapp-popup-header .company-info {
    display: flex;
    align-items: center;
}

.whatsapp-popup-header .company-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.whatsapp-popup-header .company-name {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.whatsapp-popup-header .company-status {
    font-size: 12px;
    opacity: 0.9;
    margin: 2px 0 0 0;
}

.whatsapp-popup-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

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

.whatsapp-popup-body {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.whatsapp-welcome-message {
    background: #f0f0f0;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.whatsapp-welcome-message::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #f0f0f0;
}

.whatsapp-schedule {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
}

.whatsapp-schedule .schedule-icon {
    color: #25D366;
    margin-right: 6px;
}

.whatsapp-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whatsapp-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

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

.whatsapp-option .option-icon {
    margin-right: 12px;
    font-size: 16px;
    min-width: 20px;
}

.whatsapp-option .option-text {
    flex: 1;
}

.whatsapp-option .option-arrow {
    font-size: 12px;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.whatsapp-option:hover .option-arrow {
    transform: translateX(4px);
}

/* Status indicators */
.status-online {
    color: #25D366;
}

.status-offline {
    color: #ff9500;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .whatsapp-popup {
        width: calc(100vw - 40px);
        right: 20px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .whatsapp-popup {
        background: #2a2a2a;
    }
    
    .whatsapp-popup-body {
        background: #2a2a2a;
    }
    
    .whatsapp-welcome-message {
        background: #3a3a3a;
        color: #e0e0e0;
    }
    
    .whatsapp-welcome-message::before {
        border-right-color: #3a3a3a;
    }
    
    .whatsapp-option {
        background: #3a3a3a;
        border-color: #4a4a4a;
        color: #e0e0e0;
    }
    
    .whatsapp-option:hover {
        background: #25D366;
        color: white;
    }
}

/* Animation classes */
.whatsapp-widget.animate-in {
    animation: whatsapp-slide-in 0.5s ease-out;
}

@keyframes whatsapp-slide-in {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.whatsapp-popup.animate-bounce {
    animation: whatsapp-bounce 0.6s ease-out;
}

@keyframes whatsapp-bounce {
    0% {
        transform: translateY(20px) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Notification badge */
.whatsapp-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3333;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    animation: whatsapp-badge-pulse 2s infinite;
}

@keyframes whatsapp-badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}