
/* Enhanced WhatsApp and Chatbot Buttons */

/* Common styles for both buttons */
.whatsapp-button,
.chatbot-toggle {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 999;
    border: none;
    overflow: hidden;
}

/* Hover effect for both buttons */
.whatsapp-button:hover,
.chatbot-toggle:hover {
    transform: translateY(-5px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.25);
}

/* Active effect for both buttons */
.whatsapp-button:active,
.chatbot-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* WhatsApp button specific styles */
.whatsapp-button {
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-button:hover::before {
    opacity: 1;
}

.whatsapp-button i {
    font-size: 30px;
    position: relative;
    z-index: 2;
}

/* Chatbot toggle button specific styles */
.chatbot-toggle {
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chatbot-toggle:hover::before {
    opacity: 1;
}

.chatbot-toggle i {
    font-size: 28px;
    position: relative;
    z-index: 2;
}

/* Pulse animation for both buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

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

/* Apply pulse animation */
.chatbot-toggle {
    animation: pulse 2s infinite;
}

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

/* Add labels to buttons */
.whatsapp-button::after,
.chatbot-toggle::after {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-button::after {
    content: 'WhatsApp Chat';
    background-color: #25d366;
    color: white;
}

.chatbot-toggle::after {
    content: 'Chat Assistant';
    background-color: #0d6efd;
    color: white;
}

.whatsapp-button:hover::after,
.chatbot-toggle:hover::after {
    opacity: 1;
    bottom: -30px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .whatsapp-button,
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-button i,
    .chatbot-toggle i {
        font-size: 24px;
    }
    
    .whatsapp-button::after,
    .chatbot-toggle::after {
        display: none; /* Hide labels on mobile */
    }
}

/* When chatbot is open, move WhatsApp button to top left with style */
body:has(.veridex-chatbot-container.open) .whatsapp-button,
.veridex-chatbot-container.open ~ .whatsapp-button {
    bottom: auto !important;
    top: 20px !important;
    left: 20px !important;
    transform: scale(0.8) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    animation: none !important; /* Disable pulse when moved */
}






/* Enhanced Chatbot Container */
.veridex-chatbot-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.veridex-chatbot-container.open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Enhanced Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    padding: 15px 20px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.chatbot-title {
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.chatbot-title i {
    margin-right: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chatbot-controls button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.chatbot-controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Enhanced Message Styling */
.chatbot-message {
    margin-bottom: 15px;
    animation: fadeInUp 0.3s ease;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-content {
    border-radius: 18px;
    padding: 12px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bot-message .message-content {
    background-color: #f0f2f5;
    border-top-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-top-right-radius: 4px;
}

/* Enhanced Input Area */
.chatbot-input-area {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px;
    background-color: #fff;
}

.chatbot-input {
    border: 1px solid #e1e4e8;
    border-radius: 20px;
    padding: 10px 15px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chatbot-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    outline: none;
}

.chatbot-send {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Enhanced Suggested Questions */
.chatbot-suggestions {
    margin: 15px 0;
}

.chatbot-suggestions p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.suggestion-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}



.suggested-question {
    background-color: #f0f2f5;
    border: none;
    border-radius: 18px;
    padding: 8px 16px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.suggested-question:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Typing indicator animation */
.typing-dots {
    display: flex;
    padding: 8px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #0d6efd;
    border-radius: 50%;
    display: inline-block;
    opacity: 0.6;
}

.typing-dots span:nth-child(1) {
    animation: dot-pulse 1.5s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation: dot-pulse 1.5s infinite ease-in-out 0.2s;
}

.typing-dots span:nth-child(3) {
    animation: dot-pulse 1.5s infinite ease-in-out 0.4s;
}

@keyframes dot-pulse {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .veridex-chatbot-container {
        border-radius: 12px;
    }
    
    .chatbot-header {
        padding: 12px 15px;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }
    
    .message-content {
        padding: 10px 15px;
    }
    
    .chatbot-input {
        padding: 8px 12px;
    }
    
    .suggested-question {
        padding: 6px 12px;
        font-size: 13px;
    }
}





/* Professional Scrollbar for Chatbot */
.chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatbot-body::-webkit-scrollbar-thumb {
    background: #c1c9d6;
    border-radius: 10px;
}

.chatbot-body::-webkit-scrollbar-thumb:hover {
    background: #a8b2c1;
}

/* Branding Element */
.chatbot-branding {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 10px;
    color: #adb5bd;
    opacity: 0.7;
    pointer-events: none;
}

/* Add subtle pattern to chatbot body */
.chatbot-body {
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f0f0f0' fill-opacity='0.4' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}