/* LantBot Custom Styles */

/* Smooth scrolling for chat */
#chat-messages {
    scroll-behavior: smooth;
}

/* Message animations */
.message-enter {
    animation: fadeIn 0.3s ease-out;
}

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

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #9ca3af;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* User message styling */
.user-message {
    background-color: #2563eb;
    color: white;
}

/* Assistant message styling */
.assistant-message {
    background-color: white;
    border: 1px solid #e5e7eb;
}

/* Input focus state */
#message-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button hover effects */
#send-button:not(:disabled):hover {
    transform: translateY(-1px);
}

#send-button:not(:disabled):active {
    transform: translateY(0);
}

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

#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .max-w-\[85\%\] {
        max-width: 90%;
    }

    #message-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Error message styling */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

/* Loading state for button */
#send-button.loading {
    position: relative;
    color: transparent;
}

#send-button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
