/* Custom styles for NetSuite CRM Agent */

/* Smooth scrolling for messages */
#app [ref="messagesContainer"] {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
#app [ref="messagesContainer"]::-webkit-scrollbar {
    width: 8px;
}

#app [ref="messagesContainer"]::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#app [ref="messagesContainer"]::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#app [ref="messagesContainer"]::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Fade-in animation for messages */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-enter {
    animation: fadeIn 0.3s ease-out;
}

/* Loading dots animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-dots span {
    animation: pulse 1.4s ease-in-out infinite;
}

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

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    /* Adjust header padding on mobile */
    header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Make messages container shorter on mobile */
    #app [ref="messagesContainer"] {
        height: 400px;
    }

    /* Stack buttons vertically on very small screens */
    @media (max-width: 480px) {
        form button[type="submit"] {
            min-width: 80px;
        }
    }
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Prevent layout shift */
img, video {
    max-width: 100%;
    height: auto;
}

/* Toast animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.fixed.bottom-4.right-4 {
    animation: slideInRight 0.3s ease-out;
}
