/* =====================================================
   AI Chat Bot Styles
   ===================================================== */

#aiChatBot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-bot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1A1A2E 0%, #E8540A 100%);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(232, 93, 42, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(232, 93, 42, 0.4);
}

.chat-bot-toggle.dragging {
    transform: scale(1.05);
    opacity: 0.9;
    cursor: grabbing !important;
}

.chat-bot-modal {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
}

.chat-bot-header {
    background: linear-gradient(135deg, #1A1A2E 0%, #E8540A 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
    cursor: grab;
    user-select: none;
}

.chat-bot-header.dragging {
    cursor: grabbing;
}

.chat-bot-modal.dragging {
    opacity: 0.95;
    transition: none !important;
}

.chat-bot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-bot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.chat-message.user .message-content {
    background: #E8540A;
    color: white;
    border-bottom-right-radius: 5px;
}

.chat-message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-bot-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

#chatBotInput {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    font-size: 0.9rem;
}

#chatBotInput:focus {
    border-color: #E8540A;
}

.chat-bot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E8540A;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.chat-bot-send:hover {
    background: #d14b1f;
}

.chat-bot-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-bot-modal {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        bottom: 90px;
        right: 20px;
    }
}

/* Hide AI Chat Bot when mobile menu is open to prevent overlap with sidebar actions */
body:has(#mainNav.mobile-open) #aiChatBot {
    display: none !important;
}