/**
 * Floating Chat Bot - Bottom-Right AI Assistant Styles
 * CSS styles for the persistent floating chat widget
 */

/* Chat widget container */
.chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Toggle button */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #2563eb; /* Tailwind blue-600 */
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
}

.chat-toggle-btn:hover {
    background-color: #1d4ed8; /* Tailwind blue-700 */
    transform: scale(1.05);
}

/* Chat window */
.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: none;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
    z-index: 10000;
}

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

/* Chat header */
.chat-header {
    background-color: #2563eb;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
    padding: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Chat messages container */
.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f9fafb;
}

/* Message bubbles */
.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

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

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

/* Chat input area */
.chat-input-area {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: white;
    display: flex;
    gap: 8px;
}

/* Chat input field */
.chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #2563eb;
}

/* Send button */
.chat-send-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    background-color: #1d4ed8;
}

.chat-send-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Typing indicator */
.typing-indicator {
    font-size: 12px;
    color: #6b7280;
    padding: 4px 16px;
    display: none;
    background-color: #f9fafb;
}

/* Responsive design */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
    
    .chat-widget-container {
        right: 20px;
    }
}

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

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Prose styling for markdown in bot messages */
.message.bot.prose {
    max-width: 80%;
}

.prose-sm {
    font-size: 0.875rem;
    line-height: 1.5;
}

.prose-invert {
    --tw-prose-body: #1f2937;
    --tw-prose-headings: #111827;
    --tw-prose-links: #2563eb;
    --tw-prose-bold: #111827;
}

.prose p {
    margin-bottom: 0.75em;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
}

.prose li {
    margin-bottom: 0.25em;
}

.prose strong {
    font-weight: 600;
    color: #111827;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
}

.prose a:hover {
    color: #1d4ed8;
}
