/* ─────────────────────────────────────────────────────────────────────────
   ChemistryLab.jl — custom stylesheet
   Extends the default Documenter theme without overriding its structure.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Layout ─────────────────────────────────────────────────────────────── */

/* Limit content width for comfortable reading on wide screens */
.content {
    max-width: 860px;
}

/* ── Typography ──────────────────────────────────────────────────────────── */

/* Slightly more breathing room between lines */
.content p,
.content li {
    line-height: 1.7;
}

/* Section separators: replace the default thin line with a subtle gradient */
.content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #aaa 20%, #aaa 80%, transparent);
    margin: 2rem 0;
}

/* ── Headings ────────────────────────────────────────────────────────────── */

/* Extra spacing above h2/h3 to visually separate major sections */
.content h2 {
    margin-top: 2.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #4a90d9;
}

.content h3 {
    margin-top: 1.8rem;
    color: #2a6496;
}

/* ── Code blocks ─────────────────────────────────────────────────────────── */

/* Scroll long @example outputs instead of expanding the page */
pre.documenter-example-output {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre;
    border-left: 3px solid #4a90d9;
    padding-left: 0.8rem;
}

/* Inline code: slightly tinted background for chemistry names */
code:not([class]) {
    background-color: rgba(74, 144, 217, 0.08);
    border-radius: 3px;
    padding: 0.1em 0.35em;
    font-size: 0.92em;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

/* Output tables from @example blocks */
.output table {
    font-size: 0.88rem;
    border-collapse: collapse;
    margin: 0.5rem 0;
}

/* All content tables */
.content table {
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
    margin: 1rem 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.content table thead tr {
    background-color: #4a90d9;
    color: #fff;
}

.content table thead th {
    padding: 0.5rem 0.9rem;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.content table tbody tr:nth-child(even) {
    background-color: rgba(74, 144, 217, 0.06);
}

.content table tbody td {
    padding: 0.4rem 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Admonition boxes ────────────────────────────────────────────────────── */

/* Slightly more compact and rounded admonitions */
.admonition {
    border-radius: 4px;
    margin: 1.2rem 0;
}

.admonition .admonition-header {
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 4px 4px 0 0;
    padding: 0.45rem 0.9rem;
}

.admonition .admonition-body {
    padding: 0.6rem 0.9rem;
}

/* ── Dark-mode adjustments ───────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .content h2 {
        border-bottom-color: #5ba4e8;
    }
    .content h3 {
        color: #7ec8e3;
    }
    pre.documenter-example-output {
        border-left-color: #5ba4e8;
    }
    code:not([class]) {
        background-color: rgba(91, 164, 232, 0.12);
    }
    .content table thead tr {
        background-color: #2a5a8a;
    }
    .content table tbody tr:nth-child(even) {
        background-color: rgba(91, 164, 232, 0.08);
    }
}
