/* =================================================================
   UNREALITY3D DOCS STYLES
   Shared layout + components for documentation SUB-PAGES
   (the sidebar + content archetype, e.g. character-controller).

   Load AFTER /css/unreality3d-styles.css so the docs versions of
   .feature-icon / .feature-title / .feature-description intentionally
   win over the main sheet on docs pages.

   The docs INDEX is a different archetype (search + pill nav + card
   grid, no sidebar) and keeps its own page styles — it does not use
   this file.
   ================================================================= */

/* Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    min-width: 0
}

.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-bg);
}

.sidebar-nav {
    list-style: none;
}

    .sidebar-nav li {
        margin-bottom: 0.5rem;
    }

    .sidebar-nav a {
        color: var(--text-secondary);
        text-decoration: none;
        padding: 0.5rem 0;
        display: block;
        border-left: 3px solid transparent;
        padding-left: 1rem;
        transition: all 0.3s ease;
    }

        .sidebar-nav a:hover, .sidebar-nav a.active {
            color: var(--primary-blue);
            border-left-color: var(--primary-blue);
            background: var(--light-bg);
            border-radius: 0.5rem;
        }

.content {
    background: white;
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

    .content h2 {
        color: var(--primary-blue);
        margin-top: 3rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--light-bg);
    }

        .content h2:first-child {
            margin-top: 0;
        }

/* Feature Intro Block */
.intro-block {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

    .intro-block h2 {
        color: white;
        margin-bottom: 1rem;
        font-size: 1.5rem;
        border: none;
        margin-top: 0;
        padding-top: 0;
    }

    .intro-block p {
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.7;
        font-size: 1.1rem;
    }

/* Feature Showcase Grid */
.feature-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-highlight {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

    .feature-highlight:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.use-case {
    background: var(--light-bg);
    border-radius: 0.75rem;
    padding: 1rem;
    border-left: 3px solid var(--accent-cyan);
}

.use-case-title {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.use-case-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.setting-card {
    background: var(--light-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-blue);
    transition: transform 0.3s ease;
}

    .setting-card:hover {
        transform: translateY(-3px);
    }

.setting-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.setting-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--primary-blue));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
}

.setting-name {
    font-weight: 600;
    color: var(--text-primary);
}

.setting-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Location callout */
.location-callout {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid var(--accent-orange);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

    .location-callout h3 {
        color: var(--text-primary);
        margin-bottom: 0.75rem;
        font-weight: 600;
        margin-top: 0;
    }

    .location-callout p {
        color: var(--text-primary);
        margin: 0;
    }

.location-path {
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* Warning Box */
.warning-box {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left: 4px solid #dc2626;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

    .warning-box h4 {
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    .warning-box p {
        color: var(--text-primary);
        margin: 0;
    }

/* Highlighted callout card (e.g. camera control modes) */
.camera-mode-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 2px solid var(--accent-cyan);
    margin: 1rem 0;
}

.camera-mode-title {
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-indicator {
    background: var(--accent-cyan);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
}

/* Capability Categories */
.capability-section {
    margin: 3rem 0;
}

.capability-intro {
    background: var(--light-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

    .capability-intro h3 {
        color: var(--primary-blue);
        margin-bottom: 1rem;
        margin-top: 0;
    }

/* Tab System */
.tab-container {
    margin: 2rem 0;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

    .tab-button.active {
        color: var(--primary-blue);
        border-bottom-color: var(--primary-blue);
    }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

/* Navigation between docs */
.doc-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-bg);
}

.doc-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .doc-nav-link:hover {
        color: var(--primary-purple);
        transform: translateX(5px);
    }

    .doc-nav-link.prev:hover {
        transform: translateX(-5px);
    }

/* Responsive */
@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .content {
        padding: 2rem;
    }

    .feature-showcase {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
   ADDED: tool catalog cards + troubleshooting callout
   Shared across tool-catalog sub-pages (interactivity-tools,
   game-systems, media-tools, monetization-tools, etc.).
   Live/Planned status badges + the hover card grid + the yellow
   troubleshooting box embedded near the bottom of those pages.
   ================================================================= */

/* Tool catalog cards */
.tool-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-type {
    background: white;
    border: 2px solid var(--light-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

    .tool-type:hover {
        border-color: var(--primary-blue);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

.tool-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tool-type h4 {
    margin-top: 0;
    color: var(--primary-blue);
}

.tool-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.status-live {
    background: var(--success-green);
    color: white;
}

.status-planned {
    background: var(--accent-pink);
    color: white;
}

/* Troubleshooting callout */
.troubleshooting {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

    .troubleshooting h3 {
        color: #b8860b;
        margin-top: 0;
    }

/* Mobile: collapse tool cards to a single column */
@media (max-width: 768px) {
    .tool-types {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
   ADDED: base content typography
   The sheet only styled .content h2; long-form sub-pages also use
   raw h1/h3/h4/p/lists/strong inside .content and were relying on
   each page's (now-removed) inline block for heading rhythm. These
   restore that spacing for every sub-page. (.content h2 is left
   alone above — its blue-text + bottom-border treatment is the
   intended docs design.)
   ================================================================= */

.content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content ul, .content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Cascade fix: .content p above has equal specificity to .intro-block p but
   lands later in the file, overriding the white text. Re-assert here. */
.intro-block p {
    color: rgba(255, 255, 255, 0.9);
}

/* =================================================================
   ADDED: inline code styling
   Used wherever <code> appears inside .content. Shared across all
   sub-pages that include command-line examples or field names.
   ================================================================= */

.content code {
    background: var(--light-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--primary-blue);
}

/* =================================================================
   ADDED: simplicity-highlight callout
   Green gradient "Event-Driven by Design" style callout blocks.
   Used on tool-catalog pages (media-tools, game-systems, etc.).
   ================================================================= */

.simplicity-highlight {
    background: linear-gradient(135deg, var(--success-green), #059669);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
    text-align: center;
}

    .simplicity-highlight h3 {
        color: white;
        margin-top: 0;
        font-size: 1.5rem;
    }

    .simplicity-highlight p {
        color: white;
        margin-top: 0;
        font-size: 1rem;
    }

    .simplicity-highlight strong {
        color: white;
        font-weight: 600;
        font-size: 1.5rem;
    }

    .simplicity-highlight .highlight-text {
        font-size: 2.5rem;
        font-weight: 800;
        display: block;
        margin: 1rem 0;
    }

/* =================================================================
   ADDED: step cards (Getting Started grids)
   Numbered step card pattern used on tool guide pages.
   ================================================================= */

.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-card {
    background: var(--light-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-blue);
}

.step-number {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    text-align: center;
    line-height: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* =================================================================
   ADDED: use-cases block (inside tool catalog cards)
   "Perfect for:" subsection within .tool-type cards.
   ================================================================= */

.use-cases {
    background: var(--light-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

    .use-cases h5 {
        margin: 0 0 1rem 0;
        color: var(--text-primary);
    }

/* =================================================================
   ADDED: tips / best practices section
   Grid of tip cards at the bottom of tool guide pages.
   ================================================================= */

.tips-section {
    background: linear-gradient(135deg, var(--light-bg), #e2e8f0);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tip-category {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

    .tip-category h4 {
        color: var(--primary-blue);
        margin-top: 0;
    }

/* Mobile: collapse step and tips grids */
@media (max-width: 768px) {
    .step-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
   ADDED: warning-callout and info-callout
   Named-callout variants used on template-customization and other
   pages where .location-callout (yellow) and .warning-box (red)
   aren't the right semantic fit.
   warning-callout = yellow/orange, same palette as location-callout
   info-callout    = light blue, cyan border
   ================================================================= */

.warning-callout {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid var(--accent-orange);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

    .warning-callout h3 {
        color: var(--text-primary);
        margin-bottom: 0.75rem;
        font-weight: 600;
        margin-top: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .warning-callout p {
        color: var(--text-primary);
        margin: 0.5rem 0;
    }

.info-callout {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid var(--accent-cyan);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

    .info-callout h3 {
        color: var(--text-primary);
        margin-bottom: 0.75rem;
        font-weight: 600;
        margin-top: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .info-callout p {
        color: var(--text-primary);
        margin: 0.5rem 0;
    }

/* =================================================================
   ADDED: setting-example, info-box, implementation-note
   Components from avatar-animation conversion; likely shared across
   other long-form doc sub-pages.
   setting-example     = mono code-style tag at bottom of setting cards
   info-box            = compact light-blue callout with h4 headline
   implementation-note = purple gradient box for technical detail callouts
   ================================================================= */

.setting-example {
    background: var(--light-bg);
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    border-left: 3px solid var(--accent-cyan);
}

.info-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid var(--accent-cyan);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

    .info-box h4 {
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    .info-box p {
        color: var(--text-primary);
        margin: 0;
    }

.implementation-note {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    border-left: 4px solid var(--primary-purple);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

    .implementation-note h3 {
        color: var(--text-primary);
        margin-bottom: 0.75rem;
        font-weight: 600;
        margin-top: 0;
    }

    .implementation-note p {
        color: var(--text-primary);
        margin: 0;
    }