[x-cloak] {
    display: none !important;
}

#nav-chatbot {
    font-family: 'Satoshi', 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* Navigation Chatbot Button */
#nav-chatbot button {
    transition: color 150ms ease-in-out;
}

/* Active state when chatbot is open */
#nav-chatbot button.active {
    color: #6366f1;
}

#nav-chatbot button.active:hover {
    color: #4f46e5;
}

/* Chatbot Window */
#nav-chatbot .bg-white.rounded-lg.shadow-2xl {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    /* Ensure proper positioning context */
    position: absolute;
    z-index: 9999;
}

/* Ensure chatbot window is always visible */
#nav-chatbot .chatbot-window {
    /* Fallback positioning for very small screens */
    max-width: 90vw;
    min-width: 280px;
    /* Ensure the window doesn't overflow the viewport */
    overflow: hidden;
    /* Prevent horizontal scrolling */
    max-height: 90vh;
}

/* Ensure the chatbot container doesn't cause layout issues */
#nav-chatbot {
    position: relative;
    z-index: 1000;
}

/* Message Bubbles */
#nav-chatbot .bg-gray-100 {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

#nav-chatbot .bg-gradient-to-r.from-blue-500.to-indigo-600 {
    background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

#nav-chatbot .bg-gradient-to-r.from-indigo-500.to-purple-600 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

/* Input Area */
#nav-chatbot textarea {
    transition: all 0.2s ease-in-out;
    border: 1px solid #d1d5db;
    min-height: 36px;
    max-height: 80px;
    resize: none;
    overflow-y: auto;
}

#nav-chatbot textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Send Button */
#nav-chatbot button[type="submit"] {
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
    flex-shrink: 0;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
}

#nav-chatbot button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.4);
}

#nav-chatbot button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

/* Loading Animation */
@keyframes chatbot-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

#nav-chatbot .animate-bounce {
    animation: chatbot-bounce 1.4s ease-in-out infinite both;
}

/* Notification Badge */
#nav-chatbot .bg-red-500 {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.4);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Scrollbar Styling */
#nav-chatbot #chat-messages {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

#nav-chatbot #chat-messages::-webkit-scrollbar {
    width: 8px;
}

#nav-chatbot #chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#nav-chatbot #chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

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

#nav-chatbot .text-sm {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.5;
    hyphens: manual;
}

#nav-chatbot .max-w-xs {
    max-width: 20rem;
    min-width: 8rem;
}

#nav-chatbot .bg-gray-100,
#nav-chatbot .bg-gradient-to-r {
    max-width: 100%;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 640px) {
    #nav-chatbot .w-96 {
        width: calc(100vw - 2rem);
        max-width: 24rem;
        min-width: 20rem;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
    
    #nav-chatbot .h-\[500px\] {
        height: calc(100vh - 8rem);
        max-height: 32rem;
    }
    
    #nav-chatbot svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
        stroke-width: 1.2;
    }

    #nav-chatbot .absolute.-top-1.-right-1 {
        width: 1rem !important;
        height: 1rem !important;
        font-size: 0.625rem !important;
        top: -0.125rem !important;
        right: -0.125rem !important;
    }
    
    /* Ensure chatbot window doesn't overflow on very small screens */
    #nav-chatbot .chatbot-window {
        position: fixed !important;
        top: 4rem !important;
        left: 1rem !important;
        right: 1rem !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
    }
    
    /* Mobile send button adjustments */
    #nav-chatbot button[type="submit"] {
        padding: 0.5rem 0.75rem;
        height: 36px;
        min-width: 36px;
    }
    
    #nav-chatbot button[type="submit"] span {
        display: none;
    }
}

/* Extra small screens (phones in portrait mode) */
@media (max-width: 480px) {
    #nav-chatbot .chatbot-window {
        top: 3rem !important;
        left: 0.5rem !important;
        right: 0.5rem !important;
        height: calc(100vh - 6rem) !important;
    }
    
    #nav-chatbot .w-96 {
        width: calc(100vw - 1rem) !important;
        min-width: auto !important;
    }
}

/* Ultra small screens (very narrow phones) */
@media (max-width: 360px) {
    #nav-chatbot .chatbot-window {
        left: 0.25rem !important;
        right: 0.25rem !important;
        width: calc(100vw - 0.5rem) !important;
        max-width: none !important;
    }
}

/* Focus States */
#nav-chatbot button:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

#nav-chatbot button:focus:not(:focus-visible) {
    outline: none;
}

/* Basic Markdown Styling */
#nav-chatbot .text-sm h1,
#nav-chatbot .text-sm h2,
#nav-chatbot .text-sm h3 {
    font-weight: 600;
    margin: 0.5rem 0;
    color: #1f2937;
}

#nav-chatbot .text-sm p {
    margin: 0.5rem 0;
}

#nav-chatbot .text-sm ul,
#nav-chatbot .text-sm ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

#nav-chatbot .text-sm code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

#nav-chatbot .text-sm a {
    color: #6366f1;
    text-decoration: underline;
}

#nav-chatbot .text-sm a:hover {
    color: #4f46e5;
}

/* User message white text */
#nav-chatbot .bg-gradient-to-r.from-blue-500.to-indigo-600 .text-sm h1,
#nav-chatbot .bg-gradient-to-r.from-blue-500.to-indigo-600 .text-sm h2,
#nav-chatbot .bg-gradient-to-r.from-blue-500.to-indigo-600 .text-sm h3,
#nav-chatbot .bg-gradient-to-r.from-blue-500.to-indigo-600 .text-sm p,
#nav-chatbot .bg-gradient-to-r.from-blue-500.to-indigo-600 .text-sm li {
    color: white;
}

#nav-chatbot .bg-gradient-to-r.from-blue-500.to-indigo-600 .text-sm code {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

#nav-chatbot .bg-gradient-to-r.from-blue-500.to-indigo-600 .text-sm a {
    color: #e0e7ff;
}

/* Responsive Icon Sizing */
#nav-chatbot svg {
    transition: all 150ms ease-in-out;
}

@media (min-width: 641px) and (max-width: 768px) {
    #nav-chatbot svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
        stroke-width: 1.3;
    }

    #nav-chatbot .absolute.-top-1.-right-1 {
        width: 1.125rem !important;
        height: 1.125rem !important;
        font-size: 0.6875rem !important;
    }
}

@media (min-width: 769px) {
    #nav-chatbot svg {
        width: 2rem !important;
        height: 2rem !important;
        stroke-width: 1.4;
    }
} 
