/* Documentation Independent Styling */
:root {
    --doc-bg: #ffffff;
    --doc-text: #1e293b;
    --doc-text-muted: #64748b;
    --doc-primary: #3b82f6;
    --doc-primary-hover: #2563eb;
    --doc-border: #e2e8f0;
    --doc-sidebar-width: 260px;
    --doc-header-height: 50px;
    --doc-max-width: 1100px;
    /* The "Box" size */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Scrollbar Colors */
    --scrollbar-thumb: rgba(121, 121, 121, 0.4);
    --scrollbar-thumb-hover: rgba(100, 100, 100, 0.7);
}

/* --- GLOBAL SCROLLBAR UNIFICATION --- */
/* 1. WEBKIT (Chrome, Edge, Safari) - High Priority */
/* By defining these, Webkit SHOULD ignore scrollbar-width on these elements, 
   but recent spec changes might have inverted this. */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 4px;
    border: 1px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}
::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}
::-webkit-scrollbar-corner {
    background: transparent;
}

/* 2. FIREFOX ONLY (Targeting via Feature Query hack or simple override) */
/* We want to avoid setting this on Chrome. */
@supports (-moz-appearance: none) {
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--scrollbar-thumb) transparent;
    }
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--doc-text);
    background-color: var(--doc-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.doc-content a:link,
.doc-content a:visited,
.doc-content a:hover,
.doc-content a:active {
  color: #0000EE;
}

/* --- HEADER (Centered & Perfectly Aligned) --- */
.doc-header {
    height: var(--doc-header-height);
    border-bottom: 1px solid var(--doc-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f2f5f8;
    z-index: 100;
    width: 100%;
}
.doc-header-inner {
    max-width: var(--doc-max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 
       Padding removed to align content with 
       the outer edges of the doc-container below. 
    */
    padding: 0 20px;
}
.doc-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    font-size: 18px;
}
.doc-logo svg {
    width: 20px;
    height: 20px;
}
.doc-nav-link {
    text-decoration: none;
    color: var(--doc-text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.doc-nav-link:hover {
    color: var(--doc-primary);
}

/* --- MAIN CONTAINER (Centered & Perfectly Aligned) --- */
.doc-container {
    display: flex;
    margin: var(--doc-header-height) auto 0 auto;
    max-width: var(--doc-max-width);
    width: 100%;
    min-height: calc(100vh - var(--doc-header-height));
    position: relative;
    /* No horizontal padding to allow sidebar/main to touch max-width bounds */
    padding: 0;
}

/* --- SIDEBAR --- */
.doc-sidebar {
    width: var(--doc-sidebar-width);
    border-right: 1px solid var(--doc-border);
    padding: 10px 20px 20px 20px;
    position: sticky;
    top: var(--doc-header-height);
    height: calc(100vh - var(--doc-header-height));
    overflow-y: auto;
    flex-shrink: 0;
}
.doc-menu-category {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--doc-text-muted);
    font-weight: 700;
    margin-top: 15px;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}
.doc-menu-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}
.doc-menu-item {
    margin-bottom: 2px;
}
.doc-menu-link {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: var(--doc-text);
    font-size: 14px;
    border-radius: 6px;
    transition: background-color 0.1s, color 0.1s;
}
.doc-menu-link:hover {
    background-color: #e9ecf1bf;
}
.doc-menu-link.active {
    background-color: #e9ecf1bf;
    font-weight: 600;
}

/* --- MAIN CONTENT --- */
.doc-main {
    flex-grow: 1;
    padding: 30px 0 60px 60px;
    /* Removed max-width to allow content to fill the remaining 1200px box space */
    min-width: 0;
}
.doc-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--doc-text);
}
.doc-subtitle {
    font-size: 18px;
    color: var(--doc-text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}
.doc-content h2 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--doc-border);
    padding-bottom: 8px;
}
.doc-content h3 {
    font-size: 18px;
    margin-top: 30px;
    margin-bottom: 12px;
}
.doc-content p {
    line-height: 1.7;
    margin-bottom: 16px;
}
.doc-content ul {
    margin-bottom: 20px;
    padding-left: 24px;
}
.doc-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}
.doc-content code {
    background-color: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: #0f172a;
    border: 1px solid #d3dae3;
}
.doc-content pre {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Tables */
.doc-content table {
    width: 100%;
    border-collapse: collapse;
}
.doc-content th {
    background-color: var(--doc-sidebar-bg);
    padding: 12px;
    border: 1px solid var(--doc-border);
    text-align: left;
}
.doc-content td {
    padding: 12px;
    border: 1px solid var(--doc-border);
}
.issue-block {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--doc-border);
    border-radius: 8px;
    background-color: #f8fafc;
}
.issue-title {
    margin: 10px 0 25px 0 !important;
}
.issue-section {
    margin-top: 15px;
}
.issue-section-label {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--doc-text-muted);
    margin-bottom: 5px;
    display: block;
}
.tip-box {
    background-color: #f0fdf4ab;
    border: 1px solid var(--doc-border);
    padding: 0 20px;
    margin: 15px 0;
    border-radius: 8px;
}
.info-box {
    background-color: #f8fafc;
    border: 1px solid var(--doc-border);
    padding: 0 20px;
    margin: 15px 0;
    border-radius: 8px;
}
.warning-box {
    background-color: #fff9ef;
    border: 1px solid var(--doc-border);
    padding: 0 20px;
    margin: 15px 0;
    border-radius: 8px;
}
.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 40px;
}
.framework-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: var(--doc-bg);
    border: 1px solid var(--doc-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--doc-text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.framework-pill:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
}
.app-block h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.app-block h2 span {
    font-size: 14px;
    font-weight: 500;
    color: var(--doc-text-muted);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
}
.config-card {
    background: #f8fafc;
    border: 1px solid var(--doc-border);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.config-item label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--doc-text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}
.config-item code {
    font-size: 13px;
    background: #ffffff;
    border: 1px solid #d1d5db;
}

/* --- GLOBAL DOCS & LEGAL FOOTER --- */
.doc-footer {
    margin-top: auto; /* Pushes the footer to the bottom if content is short */
    padding: 24px 20px;
    text-align: center;
    border-top: 1px solid var(--doc-border);
    background-color: var(--doc-bg);
    width: 100%;
}
.doc-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.doc-footer-links a {
    color: var(--doc-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.doc-footer-links a:hover {
    color: var(--doc-primary);
}

/* Responsive */
@media (max-width: 1240px) {
    /* Add a bit of safety padding when the screen is roughly the same size as the box */
    .doc-header-inner {
        padding: 0 20px;
    }
    .doc-container {
        padding: 0 20px;
    }
}
@media (max-width: 768px) {
    .doc-sidebar {
        display: none;
    }
    .doc-main {
        margin-left: 0;
        padding: 30px;
    }
}