/**
 * WhatsApp Chat Widget Styles
 */

/* WhatsApp Contact Card Enhancement */
.whatsapp-contact-card {
    cursor: pointer;
}

.whatsapp-contact-card:hover {
    transform: translateY(-4px) !important;
}

.whatsapp-contact-card .fab.fa-whatsapp {
    font-size: 2rem !important;
    color: #ffffff !important;
}

/* WhatsApp Chat Widget */
.whatsapp-chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    max-height: 600px;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.whatsapp-chat-widget:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

.whatsapp-chat-widget.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.whatsapp-chat-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

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

.whatsapp-chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.whatsapp-chat-header p {
    margin: 4px 0 0 0;
}

.whatsapp-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

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

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

.whatsapp-welcome-message {
    margin-bottom: 20px;
}

.message-bubble {
    background: #E5E5EA;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    margin-bottom: 8px;
    position: relative;
}

.message-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    bottom: 12px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #E5E5EA transparent transparent;
}

.message-bubble p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

/* Quick Actions */
.whatsapp-quick-actions {
    margin-top: 16px;
}

.quick-action-btn {
    background: #F0F0F0;
    border: 1px solid #E0E0E0;
    padding: 10px 16px;
    border-radius: 8px;
    text-align: left;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

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

.quick-action-btn:active {
    transform: translateX(2px);
}

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

.whatsapp-chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    width: 100%;
}

.whatsapp-chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    color: white;
}

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

/* Responsive */
@media (max-width: 640px) {
    .whatsapp-chat-widget {
        right: 10px;
        bottom: 80px;
        width: calc(100vw - 20px);
        max-width: 380px;
    }
    
    #whatsapp-button {
        bottom: 4rem !important;
        right: 1rem !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .whatsapp-chat-widget {
        background: #1F2937;
    }
    
    .message-bubble {
        background: #374151;
        color: #F3F4F6;
    }
    
    .message-bubble::before {
        border-color: transparent #374151 transparent transparent;
    }
    
    .message-bubble p {
        color: #F3F4F6;
    }
    
    .whatsapp-quick-actions p {
        color: #D1D5DB;
    }
    
    .quick-action-btn {
        background: #374151;
        border-color: #4B5563;
        color: #F3F4F6;
    }
    
    .whatsapp-chat-footer {
        background: #111827;
        border-color: #374151;
    }
}

/* Scrollbar styling */
.whatsapp-chat-body::-webkit-scrollbar {
    width: 6px;
}

.whatsapp-chat-body::-webkit-scrollbar-track {
    background: #F0F0F0;
    border-radius: 3px;
}

.whatsapp-chat-body::-webkit-scrollbar-thumb {
    background: #C0C0C0;
    border-radius: 3px;
}

.whatsapp-chat-body::-webkit-scrollbar-thumb:hover {
    background: #A0A0A0;
}

