/*
 * HydraLink Help - Supplemental Styles
 * Extends main.css for help/documentation pages
 */

/* ==================== Help Layout ==================== */
.help-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 2rem;
    min-height: 60vh;
}

.help-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    max-height: calc(100vh - var(--header-height) - 4rem);
    overflow-y: auto;
}

.help-main {
    min-width: 0;
    max-width: 900px;
}

/* ==================== Help Banner ==================== */
.help-content .help-banner {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: 0 0 1.5rem;
    border: none;
    box-shadow: var(--shadow-md);
}

/* ==================== Help Content Typography ==================== */
.help-content h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.help-content h2 {
    font-size: 1.375rem;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.help-content h3 {
    font-size: 1.125rem;
    margin-top: 1.75rem;
}

.help-content h4 {
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.help-content p {
    margin: 0.5rem 0 0.75rem;
}

.help-content ul,
.help-content ol {
    padding-left: 1.25rem;
}

.help-content li {
    margin-bottom: 0.25rem;
}

.help-content a {
    color: var(--color-primary-light);
}

.help-content a:hover {
    color: var(--color-accent);
}

/* ==================== Help Tables ==================== */
.help-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.75rem 0;
    font-size: 0.875rem;
}

.help-content th,
.help-content td {
    border: 1px solid var(--color-border);
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.help-content th {
    background-color: var(--color-surface);
    font-weight: 600;
    color: var(--color-text);
}

.help-content tr:nth-child(even) td {
    background: #FAFBFD;
}

/* ==================== Code ==================== */
.help-content code {
    background: var(--color-surface);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.help-content pre {
    background: var(--color-surface);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 0.8125rem;
}

/* ==================== Callouts ==================== */
.help-content .note {
    background: var(--color-warning-bg);
    border-left: 4px solid var(--color-warning);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.help-content .note p {
    margin: 0;
}

.help-content .warning {
    background: var(--color-error-bg);
    border-left: 4px solid var(--color-error);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.help-content .warning p {
    margin: 0;
}

.help-content .tip-box {
    background: var(--color-info-bg);
    border-left: 4px solid var(--color-info);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.help-content .tip-box h3 {
    margin-top: 0;
    color: var(--color-info);
}

.help-content .tip-box ul {
    margin-bottom: 0;
}

/* ==================== Formulas ==================== */
.help-content .formula {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    margin: 0.75rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-align: center;
    color: var(--color-primary);
}

/* ==================== Definition Lists ==================== */
.help-content dl.roles dt {
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 0.5rem;
}

.help-content dl.roles dd {
    margin-left: 1.25rem;
    margin-bottom: 0.25rem;
}

/* ==================== Screenshot Placeholders ==================== */
.help-content .screenshot-placeholder {
    background: var(--color-surface);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
    margin: 1.25rem 0;
    font-size: 0.875rem;
}

/* ==================== Images ==================== */
.help-content img {
    max-width: 100%;
    margin: 1rem 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

/* ==================== Help Cards ==================== */
.help-content .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.help-content .card-grid .card {
    padding: 1.25rem;
}

.help-content .card-grid .card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.help-content .card-grid .card ul {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
}

/* ==================== Element List ==================== */
.help-content .element-list {
    list-style: none;
    padding: 0;
    margin-top: 0.75rem;
}

.help-content .element-list li {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border);
}

.help-content .element-list li:last-child {
    border-bottom: none;
}

.help-content .element-list li a {
    font-weight: 600;
}

/* ==================== Workflow Steps ==================== */
.help-content ol.workflow {
    padding-left: 1.25rem;
    margin-top: 0.75rem;
}

.help-content ol.workflow li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

/* ==================== Audience Section ==================== */
.help-content .audience {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.help-content .audience p {
    margin: 0;
}

/* ==================== Step Numbers ==================== */
.help-content .step-number {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    text-align: center;
    line-height: 1.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* ==================== Hero (index page) ==================== */
.help-content .hero {
    margin-bottom: 1.5rem;
    text-align: center;
}

.help-content .hero .subtitle {
    font-size: 1.0625rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem;
    font-weight: 400;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .help-layout {
        grid-template-columns: 1fr;
    }

    .help-sidebar {
        position: static;
        max-height: none;
    }
}
