/* EVL AI Chatbot Styles */

#evl-chatbot-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    z-index: 999999;
}

/* Chat Button */
#evl-chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000000;
}

#evl-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#evl-chatbot-button svg {
    width: 28px;
    height: 28px;
}

/* Chat Window */
#evl-chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
#evl-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#evl-chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#evl-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

#evl-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Messages Container */
#evl-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f7f7f7;
}

#evl-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#evl-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#evl-chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#evl-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Message Bubbles */
.evl-chat-message {
    margin-bottom: 16px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.evl-chat-message.user {
    justify-content: flex-end;
}

.evl-chat-message.bot {
    justify-content: flex-start;
}

.evl-chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
}

.evl-chat-message.user .evl-chat-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.evl-chat-message.bot .evl-chat-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Typing Indicator */
.evl-typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: fit-content;
}

.evl-typing-indicator span {
    height: 8px;
    width: 8px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.evl-typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.evl-typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

.evl-typing-indicator span:last-child {
    margin-right: 0;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input Container */
#evl-chatbot-input-container {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e5e5e5;
    gap: 10px;
}

#evl-chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#evl-chatbot-input:focus {
    border-color: #667eea;
}

#evl-chatbot-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    outline: none;
}

#evl-chatbot-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#evl-chatbot-send:active {
    transform: translateY(0);
}

#evl-chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Welcome Message */
.evl-welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.evl-welcome-message h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.evl-welcome-message p {
    margin: 0;
    font-size: 14px;
}

/* Email Prompt */
.evl-email-prompt {
    display: flex;
    gap: 8px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 12px;
    margin: 10px 0;
    animation: fadeIn 0.3s ease;
}

.evl-email-prompt input[type="email"] {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

.evl-email-prompt input[type="email"]:focus {
    border-color: #667eea;
}

.evl-email-prompt button {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.evl-email-prompt button:hover {
    background: #5568d3;
}

.evl-email-prompt button#evl-skip-email {
    background: #999;
}

.evl-email-prompt button#evl-skip-email:hover {
    background: #777;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #evl-chatbot-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    #evl-chatbot-button {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }

    #evl-chatbot-button svg {
        width: 24px;
        height: 24px;
    }

    .evl-chat-bubble {
        max-width: 85%;
    }
}

/* Error Message */
.evl-error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 3px solid #c33;
}
