/* Mega FAQ Chatbot Styles */

/* Chatbot Container */
.mega-faq-chatbot {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

/* Position variants */
.mega-faq-chatbot.bottom-right {
    bottom: 5rem;
    right: 5rem;
}

.mega-faq-chatbot.bottom-left {
    bottom: 5rem;
    left: 5rem;
}

.mega-faq-chatbot.top-right {
    top: 5rem;
    right: 5rem;
}

.mega-faq-chatbot.top-left {
    top: 5rem;
    left: 5rem;
}

/* Chatbot Button */
.chatbot-button {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    z-index: 10000;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.chatbot-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 1rem;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    z-index: 10001;
}

.chatbot-window.active {
    display: flex;
}

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

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

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

.chatbot-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Chatbot Body */
.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    min-height: 0; /* Important for flexbox */
}

.chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    max-height: 100%;
    flex: 1;
}

/* Message Styles */
.chatbot-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    animation: messageSlide 0.3s ease;
}

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

.chatbot-message.bot {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chatbot-message.user {
    background: #667eea;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Button Styles */
.chatbot-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.chatbot-option {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    display: block;
}

.chatbot-option:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-option:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Navigation Buttons */
.chatbot-nav {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.chatbot-nav-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.chatbot-nav-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.chatbot-nav-btn.primary {
    background: #667eea;
}

.chatbot-nav-btn.primary:hover {
    background: #5a6fd8;
}

.chatbot-nav-btn.whatsapp {
    background: #25d366;
}

.chatbot-nav-btn.whatsapp:hover {
    background: #20ba5a;
}

/* Answer Display */
.chatbot-answer {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-top: 10px;
    line-height: 1.6;
    color: #333;
}

/* Loading Animation */
.chatbot-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-style: italic;
}

.chatbot-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 2rem);
        height: 60vh;
        bottom: 5rem;
        right: 0.5rem;
        left: 0.5rem;
    }
    
    .mega-faq-chatbot.bottom-right,
    .mega-faq-chatbot.bottom-left {
        bottom: 0.5rem;
    }
    
    .mega-faq-chatbot.bottom-right {
        right: 0.5rem;
    }
    
    .mega-faq-chatbot.bottom-left {
        left: 0.5rem;
    }
    
    .chatbot-body {
        padding: 15px;
    }
    
    .chatbot-option {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .chatbot-input-container {
        padding: 10px 15px;
    }
    
    .chatbot-input {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .chatbot-send-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Accessibility */
.chatbot-button:focus,
.chatbot-option:focus,
.chatbot-nav-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .chatbot-button {
        border: 2px solid #000;
    }
    
    .chatbot-option {
        border: 2px solid #000;
    }
    
    .chatbot-message.bot {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .chatbot-button,
    .chatbot-option,
    .chatbot-nav-btn {
        transition: none;
    }
    
    .chatbot-window {
        animation: none;
    }
    
    .chatbot-message {
        animation: none;
    }
    
    .chatbot-loading::after {
        animation: none;
    }
}

/* Custom scrollbar for chatbot messages */
.chatbot-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Input Container */
.chatbot-input-container {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #f8f9fa;
}

.chatbot-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chatbot-input::placeholder {
    color: #6c757d;
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chatbot-send-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

/* Suggestions styling */
.chatbot-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.chatbot-suggestion-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-suggestion-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chatbot-suggestion-btn:active {
    transform: translateY(0);
}

/* Responsive suggestions */
@media (max-width: 480px) {
    .chatbot-suggestion-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
} 