/* Wiltkey Developer Documentation CSS */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;700&family=Outfit:wght@300;400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500&family=Spectral:ital,wght@0,300;0,400;0,500;1,400&display=swap');

:root {
    --bg-primary: #020617;
    --bg-secondary: #0b0f19;
    --bg-card: rgba(7, 10, 19, 0.75);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-dim: rgba(255, 255, 255, 0.05);
    --border-accent: rgba(6, 182, 212, 0.15);
    
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-yellow: #eab308;
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --font-code: 'IBM Plex Mono', monospace;
    --font-serif: 'Spectral', serif;
    
    --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
    line-height: 1.25;
}

h1 {
    font-size: 2.25rem;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 0.5rem;
    margin-top: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding-bottom: 0.25rem;
}

h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #22d3ee;
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
}

code {
    font-family: var(--font-code);
    font-size: 0.85em;
    background: rgba(30, 41, 59, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.03);
    color: #e2e8f0;
}

/* Layout */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.docs-sidebar {
    width: 300px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-dim);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    transition: transform var(--transition-normal);
}

.docs-content {
    margin-left: 300px;
    flex: 1;
    padding: 2.5rem 3.5rem;
    max-width: 1000px;
    position: relative;
}

/* Header Component */
.docs-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 1.5rem;
}

.docs-header-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Navigation Links */
.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: block;
    padding: 0.35rem 0.5rem;
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(6, 182, 212, 0.08);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-link.active {
    border-left: 2px solid var(--accent-cyan);
    border-radius: 0 6px 6px 0;
    font-weight: 500;
}

/* Cards & Panels */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 15px rgba(6, 182, 212, 0.02);
}

.glass-card.warning {
    border-color: rgba(234, 179, 8, 0.25);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 15px rgba(234, 179, 8, 0.02);
}

.glass-card.pink {
    border-color: rgba(236, 72, 153, 0.25);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 15px rgba(236, 72, 153, 0.02);
}

.glass-card-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Callouts / Alerts */
.callout {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 4px solid;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.5);
}

.callout-info {
    border-left-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.03);
    color: #e0f2fe;
}

.callout-warning {
    border-left-color: var(--accent-yellow);
    background: rgba(234, 179, 8, 0.03);
    color: #fef9c3;
}

.callout-danger {
    border-left-color: var(--accent-pink);
    background: rgba(236, 72, 153, 0.03);
    color: #fce7f3;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.2);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-dim);
}

th {
    background-color: rgba(15, 23, 42, 0.8);
    color: var(--text-primary);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Code Blocks */
.code-block-container {
    background: #05070f;
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.code-block-header {
    background: #0a0d16;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.code-block-lang {
    color: var(--text-muted);
}

pre {
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Diagrams */
.diagram-container {
    background: #02050c;
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagram-container svg {
    max-width: 100%;
    height: auto;
}

/* Grid Layouts */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Search Box styling */
.search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    background-color: #05070f;
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* Footer Stamp */
.docs-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border-dim);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile Sidebar Toggle */
.mobile-header {
    display: none;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-dim);
    padding: 1rem;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .docs-sidebar {
        transform: translateX(-100%);
        width: 250px;
    }
    
    .docs-sidebar.open {
        transform: translateX(0);
    }
    
    .docs-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .mobile-header {
        display: flex;
    }
}
