/* FlowiseAI Chatbot Styles */

/* Unified Help Button */
.help-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: white;
    border: 3px solid #ff6b35;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.help-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
    background: #fff3ed;
}

.help-float img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Help Menu Dropdown */
.help-menu {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 10px;
    z-index: 999;
    min-width: 200px;
    animation: slideUp 0.2s ease-out;
}

.help-menu.hidden {
    display: none;
}

.help-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
    text-align: left;
}

.help-option:hover {
    background: #fff3ed;
}

.help-option i {
    font-size: 18px;
    color: #FF6B35;
}

/* Chat Window Container - REDUCED SIZE */
.flowise-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 450px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.flowise-chat-window.open {
    display: flex;
}

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

/* Chat Header */
.flowise-chat-header {
    background: linear-gradient(135deg, #FF6B35 0%, #E05A2C 100%);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.flowise-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flowise-chat-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    padding: 4px;
}

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

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

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

/* Chat Messages Area */
.flowise-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #F8F9FA;
}

.flowise-chat-message {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

.flowise-chat-message.user {
    flex-direction: row-reverse;
}

.flowise-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.flowise-message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.flowise-message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.4;
}

.flowise-chat-message.bot .flowise-message-bubble {
    background-color: white;
    color: #333;
    border: 1px solid #E0E0E0;
}

.flowise-chat-message.user .flowise-message-bubble {
    background-color: #FF6B35;
    color: white;
}

.flowise-message-time {
    font-size: 11px;
    color: #6C757D;
    margin-top: 4px;
}

/* Typing Indicator */
.flowise-typing-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.flowise-typing-indicator.active {
    display: flex;
}

.flowise-typing-dots {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background-color: white;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
}

.flowise-typing-dot {
    width: 8px;
    height: 8px;
    background-color: #FF6B35;
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite;
}

.flowise-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.flowise-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input Area */
.flowise-chat-input-area {
    padding: 16px;
    background-color: white;
    border-top: 1px solid #E0E0E0;
}

.flowise-chat-input-container {
    display: flex;
    gap: 8px;
}

.flowise-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E0E0E0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.flowise-chat-input:focus {
    border-color: #FF6B35;
}

.flowise-send-button {
    width: 40px;
    height: 40px;
    background-color: #FF6B35;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.flowise-send-button:hover {
    background-color: #E05A2C;
    transform: scale(1.05);
}

.flowise-send-button:disabled {
    background-color: #CCC;
    cursor: not-allowed;
    transform: none;
}

/* Scrollbar Styling */
.flowise-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.flowise-chat-messages::-webkit-scrollbar-track {
    background: #F8F9FA;
}

.flowise-chat-messages::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 3px;
}

.flowise-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #E05A2C;
}

/* Responsive Design */
@media (max-width: 768px) {
    .help-float {
        bottom: 15px;
        right: 15px;
    }

    .help-menu {
        bottom: 85px;
        right: 15px;
    }

    .flowise-chat-window {
        bottom: 15px;
        right: 15px;
        left: 15px;
        width: auto;
        height: 400px;
    }
}

/* Error Message */
.flowise-error-message {
    padding: 10px 14px;
    background-color: #FFE8E8;
    color: #D32F2F;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid #FFCDD2;
}

/* Welcome Message */
.flowise-welcome-message {
    text-align: center;
    padding: 20px;
    color: #6C757D;
}

.flowise-welcome-message h4 {
    color: #FF6B35;
    font-size: 18px;
    margin-bottom: 8px;
}

.flowise-welcome-message p {
    font-size: 14px;
    margin: 0;
}
