/* Import Google Font Outfit */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600&display=swap');

/* Widget Container */
#custom-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

/* Toggle Button */
#chat-toggle {
    width: 60px;
    height: 60px;
    background: #2A6BB2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.chat-icon {
    font-size: 24px;
    color: white;
}

/* Chat Container */
#chat-container {
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
}

#chat-container.chat-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#chat-container.chat-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Chat Header */
#chat-header {
    background: #2A6BB2;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

#chat-close {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
    color: white;
}

#chat-close:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Messages Area */
#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f8f9fa;
    font-size: 18px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 18px;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bot-message .message-content {
    background: white;
    color: #333;
    border: 1px solid #e1e5e9;
}

/* Input Area */
#chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e1e5e9;
}

#typing-indicator {
    color: #888;
    font-style: italic;
    margin-bottom: 10px;
    font-size: 14px;
}

#typing-indicator.hidden {
    display: none;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    outline: none;
    font-size: 18px;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: #667eea;
}

#send-button {
    padding: 8px 20px;
    background: #F1B00A;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}

#send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 176, 10, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    #custom-chatbot-widget {
        bottom: 10px;
        right: 10px !important;
        left: auto !important;
    }
    
    #chat-container {
        width: calc(100vw - 20px);
        max-width: 350px;
        height: 70vh;
        max-height: 500px;
        bottom: 80px;
        right: 10px;
        left: auto;
        margin: 0;
    }
    
    #chat-header {
        padding: 15px 20px;
    }
    
    #chat-header h3 {
        font-size: 16px;
    }
    
    #chat-messages {
        padding: 15px;
        font-size: 16px;
    }
    
    .message-content {
        font-size: 16px;
        max-width: 85%;
    }
    
    #chat-input-container {
        padding: 15px;
    }
    
    #chat-input {
        font-size: 16px;
        padding: 10px 14px;
        flex: 1;
        max-width: calc(100% - 85px);
    }
    
    #send-button {
        font-size: 16px;
        padding: 6px 16px;
        flex-shrink: 0;
        min-width: 65px;
        margin-right: 5px;
    }
}

@media (max-width: 480px) {
    #chat-container {
        width: calc(100vw - 10px);
        height: 75vh;
        bottom: 75px;
        right: 5px;
        left: auto;
    }
    
    #custom-chatbot-widget {
        bottom: 5px;
        right: 5px !important;
        left: auto !important;
    }
    
    #chat-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chat-icon {
        font-size: 20px;
        color: white;
    }
    
    #chat-close {
        color: white;
    }
}