@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* Quick Question Buttons */
.quick-question-btn {
    width: 100%;
    padding: 14px 16px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-align: left;
    font-weight: 400;
    font-size: 14px;
    color: #4b5563;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.quick-question-btn:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
    transform: translateX(2px);
}

.quick-question-btn:active {
    transform: translateY(0);
}

/* Typing Indicator Animation */
.typing-dots {
    display: flex;
    align-items: center;
    height: 17px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #9ca3af;
    border-radius: 50%;
    display: inline-block;
    animation: typing-dots 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-dots {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}


/* Chat Container Scrollbar */
#chat-messages {
    scroll-behavior: smooth;
}

#chat-messages::-webkit-scrollbar { width: 8px; }
#chat-messages::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
#chat-messages::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; border: 2px solid #f1f5f9; }
#chat-messages::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

/* Chat Message Content Styles */
.chat-message-content {
    white-space: pre-line;
    word-wrap: break-word;
    line-height: 1.6;
}

.chat-message-content strong {
    font-weight: 700;
    color: inherit;
}

.chat-message-content em {
    font-style: italic;
    color: inherit;
}

/* Message Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

/* Textarea Auto-resize */
#user-input {
    padding-right: 16px;
    transition: border-color 0.2s;
}

#user-input:focus {
    border-color: #fbbf24;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading Pulse Effect */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quick-question-btn {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    #chat-messages {
        padding: 1rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #fbbf24;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Toast Styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}


#suggestions-dropdown {
    max-height: 320px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    scroll-behavior: smooth;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#suggestions-dropdown::-webkit-scrollbar {
    width: 6px;
}

#suggestions-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

#suggestions-dropdown::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

#suggestions-dropdown::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

.suggestion-item:hover {
    background-color: #fef3c7;
}

/* Smooth Transitions */
button, a, input, textarea {
    transition: all 0.2s ease;
}

/* Accessibility */
:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header, footer, aside, .no-print {
        display: none;
    }
}