/* Custom styles for PM1 Companion Prototype */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #18181b;
}

::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

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

/* Message animations */
@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 dotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
    }
    40% {
        opacity: 1;
    }
}

.loading-dot {
    animation: dotPulse 1.4s infinite;
}

.loading-dot:nth-child(1) {
    animation-delay: 0s;
}

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

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

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

/* Disable outline for mouse users */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    outline: none;
}

/* Code blocks styling */
/* background-color: #27272a; */
code {
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    text-wrap: wrap;
}

pre code {
    display: block;
    padding: 12px;
    overflow-x: auto;
    border-radius: 8px;
}

/* Link styles in messages */
.message-content a {
    color: #60a5fa;
    text-decoration: underline;
}

.message-content a:hover {
    color: #93c5fd;
}

/* Auto-resize textarea */
textarea {
    field-sizing: content;
}
