/*override margins set by design system*/
/* reset bottom margin for last child paragraph */
p:last-child {
    margin-bottom: 18px;
}

/* only remove bottom margin for last direct child of a container */
.container-sm > p:last-child {
    margin-bottom: 0;
}

/* override showing nav placeholder in header as search isn't using a header nav at all */
nav#header-nav {
    display: none;
}

/* limit size of images in rendered HTML content */
img {
    max-width: 100%;
}

/* override design system headings */
h1, h2, h3, h4, h5, h6 {
    max-width: 100%;
}

h1 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

h4 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* prevent long lines (usually urls) */
.wrap-anywhere, .reading-width {
    overflow-wrap: anywhere;
}

/* Styling for external-html only */
/* Styling for blockquotes */

.external-html blockquote {
    position: relative;
    margin: 1rem;
    padding-left: 2rem;
    font-size: 1.25rem;
}

.external-html blockquote::before {
    content: open-quote;
    position: absolute;
    left: 0.5rem;
    top: -0.1rem;
    font-size: 3rem;
    line-height: 1;
    color: #717171;
}

.external-html blockquote p:last-of-type:after {
    content: close-quote;
    color: #717171;
}

.markdown-content blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-left: 3px solid #dee2e6;
    color: #495057;
    line-height: 2;

    p {
        margin-bottom: 0;
    }
}

.font-size-epsilon {
    line-height: 1.25;
}

.doc-list.doc-list-small li {
    font-size: medium;
    margin-top: 2px;
}

.help-toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

/* Override design system container padding, with the exception of the header and nav below the smallest breakpoint */
.container {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 575px) {
    header .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .context-nav .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    body {
        overflow-x: scroll;
        min-width: 575px;
    }
}