/* RootReal Visualization Showcase Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

/* Tailwind-like utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation */
.nav-link {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.mobile-nav-link:hover {
    background-color: #f3f4f6;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #2563eb;
    text-decoration: none;
    border: 2px solid #2563eb;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    color: #2563eb;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.2s;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Code blocks */
pre {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

code {
    font-family: 'Fira Code', 'Courier New', monospace;
}

/* Prose */
.prose {
    color: #374151;
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111827;
}

.prose p {
    margin-bottom: 1rem;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
}

.prose a:hover {
    color: #1d4ed8;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Utility classes */
.hidden {
    display: none;
}

.min-h-screen {
    min-height: 100vh;
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-gray-50 {
    --tw-gradient-from: #f9fafb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 250, 251, 0));
}

.to-gray-100 {
    --tw-gradient-to: #f3f4f6;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .md\\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

/* Spacing */
.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-20 {
    margin-top: 5rem;
}

/* Text */
.text-center {
    text-align: center;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.font-bold {
    font-weight: 700;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-900 {
    color: #111827;
}

/* Backgrounds */
.bg-white {
    background-color: white;
}

.bg-gray-900 {
    background-color: #111827;
}

/* Shadows */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Rounded */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

/* Transitions */
.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Hover */
.hover\\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover\\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover\\:-translate-y-1:hover {
    transform: translateY(-0.25rem);
}

.group:hover .group-hover\\:text-blue-600 {
    color: #2563eb;
}

.group:hover .group-hover\\:-translate-y-1 {
    transform: translateY(-0.25rem);
}


/* ═══════════════════════════════════════════════════════════════════════
   /viz/overview/sidebar-nav — the Rust runtime's demo surface
   (the JS runtimes' `.frame`/`.surface`/`.content` demo column, plan
   `sidebar-nav-rust-js-visual-config-parity`). The COMPOUND's chrome comes
   from crates/ux/compound/sidebar-nav/styles/sidebar-nav.css; these rules
   style only the ENTRY DEMO column around it.
   ═══════════════════════════════════════════════════════════════════════ */
.rr-viz-sidebar-nav-preview {
    display: grid;
    gap: 0.75rem;
}

.rr-viz-sidebar-nav-surface {
    display: flex;
    gap: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    padding: 1rem;
    min-height: 28rem;
}

/* Embedded demo consumer: neutralize the compound's platform-leftbar
   placement (--fixed pins to the viewport edge at (0,0); --dvh spans the
   viewport height) so the demo sidebar renders IN this flex surface — the
   `.rr-design-sidebar .rr-sidebar-nav` precedent (round-2 embedded-consumer
   placement neutralization). Without this the demo nav stacked BEHIND the
   shell's z-100 leftbar and the surface showed only the content column —
   the 2026-08-25 "Rust runtime renders EMPTY" report (post-r2 plan item 2);
   visible with ANY store, including the aged `collapsed: true` 56px rail
   (valid persisted data — it must render as the in-surface icon rail, JS
   parity). The inline `width` keeps sizing the column; flex stretch gives
   it the surface height. */
.rr-viz-sidebar-nav-surface .rr-sidebar-nav {
    position: static;
    height: auto;
    flex-shrink: 0;
}

/* Side-placement arrangements (plan
 `viz-sidebar-nav-side-placement-and-design-rail-parity`, item 3.2): the
 arrangement is carried by DOM ORDER (Left: [rail][content]; Right:
 [content][rail]; Both: [rail][content][rail] — the miniature of a real
 /viz/overview page: shell leftbar + config rail). The compound's own
 `rr-sidebar-nav--right` class marks the right-edge instance; these
 surface modifiers are the stable consumer/probe hooks + the flex safety
 for the two-rail row. The embedded `position: static` neutralization
 above applies to EVERY mounted instance (including the Both mirror). */
.rr-viz-sidebar-nav-surface--both .rr-viz-sidebar-nav-content {
    /* Two fixed-width rails + this column: let the content column shrink
       below its intrinsic width instead of blowing out the surface row. */
    min-width: 0;
}

.rr-viz-sidebar-nav-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rr-viz-sidebar-nav-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rr-viz-sidebar-nav-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.rr-viz-sidebar-nav-detail {
    font-size: 0.75rem;
    color: #475569;
}

.rr-viz-sidebar-nav-config-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.rr-viz-sidebar-nav-config-badge {
    background: #e2e8f0;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    color: #334155;
}

.rr-viz-sidebar-nav-content-body {
    flex: 1;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.85rem;
}
