/* Documentation View Styles */

/* Override Workspace View defaults for full bleed */
/* Override Workspace View defaults for full bleed */
#helpView {
    padding: 0 !important;
    background-color: transparent;
    /* Blend with canvas */
    min-height: 100%;
}

/* 
   Documentation Wrapper
   Simple container to center the content.
   No height constraints - lets the document flow naturally.
*/
.documentation-wrapper {
    width: 100%;
    padding: 0 20px 40px 20px;
    /* Removed top padding completely */
}

/* 
   Content Column
   Centered, max-width text column.
   No borders, no shadows - just text on the "page".
*/
.documentation-content {
    max-width: 850px;
    /* Optimal reading width */
    margin: 0 auto;
    color: var(--theme-text-primary);
    line-height: 1.7;
    font-size: 1rem;
}

/* Force the first element to have no top margin to prevent whitespace */
.documentation-content> :first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* --- Typography & Markdown Elements --- */

.documentation-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-top: 0 !important;
    /* Force removal of top margin */
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--theme-border-color);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Fix for markdown-it-anchor wrapping headers in links */
.documentation-content h1 a,
.documentation-content h2 a,
.documentation-content h3 a,
.documentation-content h4 a {
    color: inherit;
    text-decoration: none;
    pointer-events: none;
    /* Optional: disable link behavior for the title itself if desired, or keep it for deep linking */
}

.documentation-content h1 a:hover,
.documentation-content h2 a:hover,
.documentation-content h3 a:hover,
.documentation-content h4 a:hover {
    text-decoration: none;
    border-bottom: none;
}

.documentation-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.documentation-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-gray-800);
    margin-top: 2.25rem;
    margin-bottom: 1rem;
}

.documentation-content h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-gray-800);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.documentation-content p {
    margin-bottom: 1.5rem;
    color: var(--theme-text-secondary);
}

.documentation-content ul,
.documentation-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--theme-text-secondary);
}

.documentation-content li {
    margin-bottom: 0.5rem;
}

.documentation-content li::marker {
    color: var(--theme-text-muted);
}

.documentation-content a {
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.documentation-content a:hover {
    border-bottom-color: var(--theme-primary);
}

.documentation-content blockquote {
    border-left: 4px solid var(--theme-primary);
    background-color: color-mix(in srgb, var(--theme-primary), transparent 95%);
    padding: 1.25rem 1.75rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--theme-text-secondary);
}

.documentation-content code {
    font-family: 'Fira Code', 'Roboto Mono', monospace;
    font-size: 0.9em;
    background-color: var(--theme-bg-tertiary);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: var(--theme-primary);
}

.documentation-content pre {
    background-color: #1e293b;
    /* Slate 800 */
    color: #f1f5f9;
    /* Slate 100 */
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'Fira Code', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: var(--theme-card-shadow);
}

.documentation-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    border-radius: 0;
}

.documentation-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    border: 1px solid var(--theme-border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    /* For border radius on table */
}

.documentation-content th,
.documentation-content td {
    padding: 1rem;
    border-bottom: 1px solid var(--theme-border-color);
    text-align: left;
}

.documentation-content th {
    background-color: var(--theme-bg-secondary);
    font-weight: 600;
    color: var(--theme-text-primary);
    border-bottom: 2px solid var(--theme-border-color);
}

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

.documentation-content hr {
    border: 0;
    height: 1px;
    background-color: var(--theme-border-color);
    margin: 3rem 0;
}

/* Loading State */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 100px;
    color: var(--theme-text-muted);
    font-size: 1.1rem;
}