/*
 * The grid-container component indents `.grid-title h1` by 26px, which lines up
 * with the 20px padding of a `.grid-section` card. Help pages render their
 * markdown directly instead of inside a card, so that indent leaves the title
 * out of line with the breadcrumbs and the body text. Align them all at 0.
 * Scoped here because help.css is only loaded on the help pages.
 */
.grid-container-component .grid-title h1 {
    margin-left: 0;
}

/*
 * Permalink icon next to each heading: dim by default, lights up on hover, and
 * turns green for a moment once the link has been copied (see help-anchors.js).
 */
.mdviewer h2,
.mdviewer h3,
.mdviewer h4,
.mdviewer h5,
.mdviewer h6 {
    /* Keep the heading clear of the fixed navbar when jumping to an anchor. */
    scroll-margin-top: 90px;
}

.help-anchor {
    margin-left: 0.45rem;
    font-size: 0.62em;
    color: #adb5bd;
    opacity: 0.3;
    text-decoration: none;
    vertical-align: middle;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.help-anchor:hover,
.help-anchor:focus {
    opacity: 1;
    color: #0d6efd;
}

.help-anchor.copied {
    opacity: 1;
    color: #198754;
}

/*
 * Tailwind's preflight resets `ol`/`ul` to `list-style: none; padding: 0`, which
 * strips the numbers and bullets from markdown lists. Restore them for the
 * rendered help content (the nav lists below opt out again on purpose).
 */
.mdviewer ol,
.mdviewer ul {
    padding-left: 1.6rem;
    margin-bottom: 1rem;
}

.mdviewer ol {
    list-style: decimal;
}

.mdviewer ul {
    list-style: disc;
}

.mdviewer li {
    margin-bottom: 0.35rem;
}

.help-breadcrumbs {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.help-breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}

.help-breadcrumbs a:hover {
    text-decoration: underline;
}

.help-breadcrumbs .sep {
    margin: 0 0.4rem;
    color: #adb5bd;
}

.help-breadcrumbs .current {
    color: #343a40;
    font-weight: 600;
}

.help-breadcrumbs .muted {
    color: #adb5bd;
}

.help-index {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-index li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
}

.help-index li a {
    font-size: 1.1rem;
    text-decoration: none;
}

.help-children {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.help-children h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}

.help-children ul {
    list-style: none;
    padding: 0;
}

.help-children li {
    padding: 0.4rem 0;
}
