/**
 * VLD Documentation Website - Custom Styles
 */

/* Base */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

.dark ::-webkit-scrollbar-thumb {
    background: #3f3f46;
}

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

/* Code blocks */
pre[class*="language-"],
pre:has(code[class*="language-"]) {
    margin: 0;
    background: transparent !important;
}

code[class*="language-"] {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Prism theme overrides for dark mode */
.dark code[class*="language-"],
.dark pre[class*="language-"] {
    color: #e4e4e7;
}

/* Alpine collapse transition */
[x-collapse] {
    overflow: hidden;
}

[x-collapse].x-collapse-enter-active,
[x-collapse].x-collapse-leave-active {
    transition: height 0.2s ease-out;
}

/* Playground textarea */
textarea.font-mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    line-height: 1.6;
    tab-size: 2;
}

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

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

/* Selection */
::selection {
    background: #3b82f6;
    color: white;
}

/* Gradient text (if needed) */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Shimmer animation for performance bars */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 2s infinite;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.dark .badge-success {
    background-color: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    #playground,
    button {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    pre {
        white-space: pre-wrap;
        word-wrap: break-word;
    }
}
