pre.language-txt {
    border-radius: 0;
}

code[class*="language-"],
pre[class*="language-"] {
    /* font-size: 12px; */
}

blockquote.trialuse {
    border-left: 5px solid #2196F3;
    background-color: #e7f3fe;
}

.stu-note.normative::before {
    content: "Proposed Normative Content\A ";
    display: flex;
    padding: 4px 0;
    margin-bottom: 4px;
    background-color: unset;
}

.stu-note::before {
    display: flex;
    padding: 4px;
    margin-bottom: 4px;
}

.stu-note.normative {
    border-left-color: green;
    border-left-style: double;
    background-color: #e0ffe0;
}

.stu.normative:after {
    border-left-color: green;
    border-left-style: double;
}

.stu-bg.normative {
    background-color: #e0ffe0;
}

table.grid th:has(.stu-bg.normative),
th:has(.stu-bg.normative),
td:has(.stu-bg.normative) {
    background-color: #e0ffe0;
}

.stu {
    /* border-left: 5px solid #2196F3;
    background-color: #e7f3fe;*/
    padding-left: 20px; 
    position: relative;
}

.stu:after {
    content: '';
    position: absolute;
    left: 5px;
    top: -5px;
    bottom: -7px;
    width: 4px;
    border-left: 5px solid var(--stu-note-border-left-color);
    /* background-color: #e7f3fe;
    background: linear-gradient(90deg, rgba(255,160,255,1) 0%, rgba(255,255,255,1) 100%); */
}

pre.language-fhirpath.stu {
    margin-left: 20px;
    overflow: unset;
}
pre.language-fhirpath.stu:after {
    left: -16px;
}

table.stu {
    margin-left: 20px;
}

table.stu:after {
    left: -15.5px;
}

td span.stu {
    display: block;
    margin-top: 4px;
    margin-bottom: 4px;
    padding-left: 12px;
}

td span.stu:after {
    left: 1px;
    top: -1px;
    bottom: -1px;
}

.stu.dragon {
    padding-left: 150px;
    margin-left: 24px;
}

.stu.dragon::before {
    width: 150px;
}

.stu.dragon::after {
    bottom: -18px;
}

code.formatted {
    font-weight: bold;
    color: blue;
    background-color: unset !important;
    border: none;
    border-radius: 4px;
    padding: 4px 4px;
    font-size: unset;
    white-space: nowrap !important;
}

blockquote.stu {
    padding-left: 32px;
    position: relative;
    margin-left: 20px;
}

/* HR styles to get a graduated background that fades to transaprent */
.hr-pre-approved-warning {
    height: 8px;
    width: 50%;
    padding: 0;
    margin: 0;
    border: none;
    background: linear-gradient(to right, rgb(195,164,207), transparent);
}

.pre-applied-warning {
    position: relative;
    margin-bottom: 0;
    border-left-color: rgb(195,164,207);
    border-left-width: 16px;
}

.pre-applied-warning::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -12px;
    width: 12px; /* border + shadow spill */
    background: linear-gradient(to right, transparent 50%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

span.fhir-approved {
    background-color: rgba(173, 212, 160, 0.5);
}

span.fhir-highlight {
    background-color: rgba(195,164,207, 0.5);
}

.strikeout {
    text-decoration: line-through;
}

.fhir-approved,
.fhir-highlight {
    position: relative;
}

p:has(+ pre.language-fhirpath) {
    padding-bottom: 0;
    margin-top: 10px;
    margin-bottom: 0;
}

.fhir-approved::before {
    background-color: rgb(173, 212, 160);
    opacity: 0.5;
}

.fhir-highlight::before {
    background-color: rgb(195,164,207);
    opacity: 0.5;
}

.fhir-approved::before,
.fhir-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

p.fhir-approved.stu::before,
p.fhir-highlight.stu::before {
    left: 16px;
}

blockquote.fhir-approved.stu::before,
blockquote.fhir-highlight.stu::before {
    width: unset;
}

blockquote.stu:after {
    left: -20px;
}

blockquote.stu:before {
    left: 0.5px;
    top: 0;
    bottom: 0;
    width: 4px;
    position: absolute;
}

ul.stu {
    padding-left: 32px;
}

table.grid th:has(.stu-bg),
th:has(.stu-bg),
td:has(.stu-bg) {
    background-color: var(--stu-note-background-color);
}

/* STU background */
.stu-bg {
    background-color: var(--stu-note-background-color);
}

/* Include a color on the table headers as was in the original normative release */
table.grid th {
    background-color: #D9E6FC;
}

table.grid {
    min-width: 70vw;
}

/* overload the section numbering to be consistent with the original published version of the specification */
body {
    counter-reset: section appendix
}

h2:before {
    color: silver;
    counter-increment: section;
    content: counter(section) ". ";
}

h3:before {
    color: silver;
    counter-increment: sub-section;
    content: counter(section) "." counter(sub-section) ". ";
}

h4:before {
    color: silver;
    counter-increment: composite;
    content: counter(section) "." counter(sub-section) "." counter(composite) ". ";
}

h5:before {
    color: silver;
    counter-increment: detail;
    content: counter(section) "." counter(sub-section) "." counter(composite) "." counter(detail) ". ";
}

h6:before {
    color: silver;
    counter-increment: more-detail;
    content: counter(section) "." counter(sub-section) "." counter(composite) "." counter(detail) "." counter(more-detail) ". ";
}

h2.appendix {
    counter-reset: sub-section;
    counter-increment: appendix;
}

h3.appendix {
    counter-reset: composite
}

h2.appendix:before {
    color: silver;
    counter-increment: section;
    content: "Appendix " counter(appendix, upper-alpha) ": ";
}

h3.appendix:before {
    color: silver;
    counter-increment: sub-section;
    content: "Appendix " counter(appendix, upper-alpha) "." counter(sub-section) ": ";
}

h4.appendix:before {
    color: silver;
    counter-increment: composite;
    content: "Appendix " counter(appendix, upper-alpha) "." counter(sub-section) "." counter(composite) ": ";
}

h5.appendix:before {
    color: silver;
    counter-increment: detail;
    content: "Appendix " counter(appendix, upper-alpha) "." counter(sub-section) "." counter(composite) "." counter(detail) ": ";
}

h6.appendix:before {
    color: silver;
    counter-increment: more-detail;
    content: "Appendix " counter(appendix, upper-alpha) "." counter(sub-section) "." counter(composite) "." counter(detail) "." counter(more-detail) ": ";
}

/* override the fhir label formatting inside the ANTLR code formatted block */
.language-antlr4 .token.label {
    font-size: unset;
    background-color: unset;
}

/* Accessibility tweaks */
:root {
    --link-color: #3470a2; /* 13. Hyperlink text color */
    --toc-box-bg-color: #ffff8a; /* 14. Table of Contents box background color */
    --footer-hyperlink-text-color: #94daff; /* 15. Footer hyperlink text color */
}
        
a {
    font-weight: 500;
}

code.language-typescript, code.language-regex, code.language-txt {
    white-space: pre-wrap;
    overflow: unset;
    word-break: break-word;
}

.language-antlr4 .token.punctuation {
    color: #6e6e6e;
}

@media (min-width: 768px) {
    div.markdown-toc {
        margin: 8px;
        margin-right: calc(384px - 50vw);
    }
}

@media (min-width: 992px) {
    div.markdown-toc {
        margin: 8px;
        margin-right: calc(496px - 50vw);
    }
}

@media (min-width: 1100px) {
    div.markdown-toc {
        margin: 8px;
        margin-right: calc(550px - 50vw + 20px);
    }
}

@media (min-width: 1810px) {
    div.markdown-toc {
        position: sticky;
        right: 0;
        top: 12px;
        bottom: 12px;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }
}

/* 
Over-ride the new-content styling for spans
span's are inline content, just want the fancy background coloring
not interfering with other layout and spacing of the content.
*/
span.new-content {
    margin: -8px;
    padding: 8px;
    color: unset;
    background-color: rgba(0,255,0,0.3);
    border: unset;
}
/* don't want "New Content" label splatted in the middle of narrative content*/
span.new-content::before {
    content: unset;
    display: none;
}
