/**
 * WhatsApp Chat Widget Styles
 * Modern, mobile-friendly design
 */

/* Floating WhatsApp Button */
.whatsapp-float-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #25D366;
    color: white;
    border-radius: 60px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.whatsapp-float-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: #128C7E;
}

.whatsapp-button-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-button-icon svg {
    width: 100%;
    height: 100%;
}

.whatsapp-button-text {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

/* Status Indicator */
.whatsapp-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    border: 2px solid white;
}

.whatsapp-status-indicator.online {
    background: #4FCE5D;
}

.whatsapp-status-indicator.offline {
    background: #FFC107;
}

/* Quick Action Menu */
.whatsapp-quick-menu {
    position: fixed;
    bottom: 110px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    z-index: 9998;
    transition: all 0.3s ease;
    transform-origin: bottom right;
}

.whatsapp-quick-menu.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Menu Header */
.whatsapp-menu-header {
    background: #128C7E;
    color: white;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.whatsapp-menu-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    padding: 8px;
}

.whatsapp-menu-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.whatsapp-status-text {
    margin: 4px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.whatsapp-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.whatsapp-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Menu Body */
.whatsapp-menu-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.whatsapp-welcome-message {
    background: #F0F0F0;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.whatsapp-welcome-message p {
    margin: 0;
    font-size: 15px;
    color: #333;
}

/* Quick Actions */
.whatsapp-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.whatsapp-quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #F8F9FA;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-size: 15px;
    color: #333;
}

.whatsapp-quick-action:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
    transform: translateX(4px);
}

.whatsapp-action-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

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

/* Custom Message Input */
.whatsapp-custom-message {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #F8F9FA;
    border-radius: 24px;
    border: 1px solid #E0E0E0;
}

.whatsapp-custom-message input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 15px;
    padding: 4px 8px;
}

.whatsapp-custom-message button {
    background: #25D366;
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.whatsapp-custom-message button:hover {
    background: #128C7E;
}

/* Menu Footer */
.whatsapp-menu-footer {
    padding: 16px 20px;
    background: #F8F9FA;
    border-top: 1px solid #E0E0E0;
    border-radius: 0 0 16px 16px;
}

.whatsapp-menu-footer p {
    margin: 0;
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .whatsapp-float-button {
        bottom: 16px;
        right: 16px;
        padding: 14px;
    }
    
    .whatsapp-button-text {
        display: none;
    }
    
    .whatsapp-quick-menu {
        bottom: 80px;
        right: 16px;
        left: 16px;
        width: auto;
    }
    
    .whatsapp-menu-body {
        max-height: 300px;
    }
}

/* Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .whatsapp-quick-menu {
        background: #1F1F1F;
        color: white;
    }
    
    .whatsapp-welcome-message {
        background: #2A2A2A;
    }
    
    .whatsapp-welcome-message p {
        color: #E0E0E0;
    }
    
    .whatsapp-quick-action {
        background: #2A2A2A;
        border-color: #3A3A3A;
        color: #E0E0E0;
    }
    
    .whatsapp-custom-message {
        background: #2A2A2A;
        border-color: #3A3A3A;
    }
    
    .whatsapp-custom-message input {
        color: white;
    }
    
    .whatsapp-menu-footer {
        background: #2A2A2A;
        border-color: #3A3A3A;
    }
    
    .whatsapp-menu-footer p {
        color: #999;
    }
}