/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Code block styling */
pre {
    background: #f8fafc;
    border-radius: 6px;
    padding: 1rem;
    margin: 0.5rem 0;
    overflow-x: auto;
}
code {
    font-family: ui-monospace, monospace;
    font-size: 0.9em;
}

/* Chat container styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 2rem;
    max-width: 5xl;
    margin: 0 auto;
    width: 100%;
}

.input-container {
    position: sticky;
    bottom: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
    width: 100%;
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.05);
}

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

.thinking {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.thinking::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    background-color: currentColor;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.thinking-dots span {
    animation: pulse 1.5s ease-in-out infinite;
    display: inline-block;
    margin-right: 2px;
}

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

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

/* Update the messages spacing */
.message-wrapper {
    margin: 0 auto 1.5rem;
    max-width: 5xl;
    padding: 0 1rem;
}

.message-wrapper:last-child {
    margin-bottom: 2rem;
}

/* Special spacing for consecutive messages */
.message-wrapper + .message-wrapper {
    margin-top: 1.5rem;
}

/* Update the primary color to Tailwind black */
.ai-avatar {
    background-color: #111827; /* Tailwind black-900 */
}

/* Add to your existing CSS */
.tool-usage {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
}

.tool-usage::before {
    content: '🔧';
    font-size: 1rem;
}

/* Add responsive container styles */
@media (max-width: 640px) {
    .input-container {
        padding: 0.75rem 0;
    }
    
    .messages-container {
        padding: 0.75rem;
    }
}

/* Add these styles to your existing CSS */
.token-usage-container {
    position: sticky;
    bottom: 80px;
    background-color: white;
    padding: 0.5rem 0;
    border-top: 1px solid #e5e7eb;
    z-index: 10;
}

.token-bar-container {
    flex: 1;
    height: 8px;
    background-color: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.token-bar {
    height: 100%;
    background-color: #10b981; /* Green by default */
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.token-bar.warning {
    background-color: #f59e0b; /* Yellow for warning */
}

.token-bar.danger {
    background-color: #ef4444; /* Red for danger */
}

.token-count {
    min-width: 160px;
}

.token-percentage {
    min-width: 48px;
    text-align: right;
}

/* Add these styles to your existing CSS */
.message-wrapper .prose p {
    color: #18181B;
    font-size: 14px;
    line-height: 1.5;
}

/* For user messages */
.message-wrapper .prose {
    color: #18181B;
    font-size: 14px;
    line-height: 1.5;
}

.command-code {
    background-color: #e7f3ed;
    color: #0a3622;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}
  