/* support dark mode */
:root {
    color-scheme: light dark;
}

/*** Overall page ***/

body {
    font-family: -apple-system;
    font-size: 11px /* IDEInspectorBasicStringProperty.xib */;
    /* Prevent the user from selecting most of the page. */
    -webkit-user-select: none; user-select: none;
    background-color: transparent;
}

.Library body {
    margin: 0px 11px; /* Library detail view margins. */
}

/* Inspector specific margins */
html.Inspector > body {
    margin: 0 0 0 2px;
}

html.Inspector .slice td {
    /*
        the padding here allows for the section lines in the
        inspector to flow beyond the content.
    */
    padding: 0 8px 10px 10px;
}

/* Popover specific margins */
html.OneShot > body {
    margin: 0 20px 20px 20px;
}

/*** Common elements ***/

p {
    margin: 0;
    margin-bottom: 5px;
}
p:last-child {
    margin-bottom: 0;
}

pre, code {
    font-size: 11px;
    font-family: 'SF Mono', 'Menlo', monospace;
}

.Library pre {
    font-size: 13px;
}

a, a:active {
    color: #0088cc;
    text-decoration: none;
}

a:hover, a:hover span {
    color: #0088cc;
    text-decoration: underline;
}

.exit-link {
    width: 100%;
    text-align: right;
}

@supports (color: -apple-system-label) {
    /* system appearance is supported */
    
    a, a:active {
        color: -webkit-link;
    }

    a:hover, a:hover span {
        color: -webkit-link;
    }
}

td, th {
    padding: 0;
}

tr {
    vertical-align: top;
}

th[scope=row] {
    font-weight: normal;
    text-align: right;
}

figure {
    margin-left: 0px;
    margin-right: 0px;
}

.code-listing > pre {
    margin: 0;
}

/* Forcefully broken camel case words */
span.camelCase, span.camelCase > span {
    display: inline-block;
}

/*** Inspector-like slices ***/

#slices {
    border-collapse: collapse;
    /* Restrict the table to the page width even when a long word may put pressure on the table to expand. */
    table-layout: fixed;
    width: 100%;
}

.slice > th {
    width: 90px;
    padding-right: 11px;
    color: #A1A1A1;
    color: -apple-system-secondary-label;
    cursor: default;
}

.slice > td {
    color: #000;
    color: -apple-system-label;
    word-wrap: break-word;
    /* Let the user select actual content. */
    -webkit-user-select: text; user-select: text;
}

.Library .slice > td {
    padding-bottom: 17px;
}

/* This CSS selector refers to the titles of code listing sections */

html.OneShot .slice:last-child > * {
    padding-bottom: 0;
}

/* Headers should have the same size. */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 6px;
    margin-top: 12px;
    font-weight: 620;
    font-size: 11px;
}

.Library h3 {
    font-weight: 700;
    margin-bottom: 2px;
    margin-top: 10px;
}

.Library .slice:not(#title) h3 {
    margin-top: 0px;
}

html.Inspector tr:first-of-type h3 {
    /* the top section of the inspector should be close to the title  */
    margin-top: 4px;
}

.slice > td > h4 {
    margin: 2px 5px 4px 6px;
    font-weight: 500;
}

/* Only add a margin to the slice bodies when we are next to H4s (only in the inspector) */
.slice > td > h4 + .slice-body {
    margin: 0px 5px 0px 15px;
}

/* reduce the left padding for unordered lists. */
.slice-body > ul, .slice-body > ol {
    padding-left: 21px;
}

.slice-body > ul > li > *, .slice-body > ol > li > * {
    margin-left: -1px;
}

.Library #title > td > h3 {
    font-size: 15px;
}

.Library #title > td > .slice-body {
    color: -apple-system-secondary-label;
}

/*** Abstract slice ***/
html.buildSetting #Abstract > td {
    white-space: pre-wrap;
}

/*** Parameters slice (table in popover, definition list in inspector) ***/

.parameter > * {
    padding-bottom: 5px;
}
.parameter:last-child > * {
    padding-bottom: 0;
}

.parameter > th[scope="row"] {
    text-align: left;
}

.parameter > td {
    padding-left: 12px;
}

#Parameters > td > table {
    border-collapse: collapse;
}

#Parameters dl {
    margin: 0;
}

#Parameters dd {
    margin: 0;
    margin-bottom: 5px;
    padding: 0;
}

#Parameters dd:last-child {
    margin: 0;
}

#Properties > td > table {
    border-collapse: collapse;
}

#Properties p {
    margin-top: 12px;
}

#Properties dl {
    margin: 0;
}

#Properties dd {
    margin: 0;
    margin-top: 6px;
    margin-left: 6px;
    margin-bottom: 5px;
    padding: 0;
}

#Properties dd:last-child {
    margin: 0;
    margin-top: 6px;
    margin-left: 6px;
}

#PossibleValues dd {
    margin-left: 6px;
}

#Attributes dt {
    float: left;
    margin-right: 4px;
}

#Attributes dd {
    clear: right;
}

/*** Other slices ***/

/* Declaration */
pre.declaration {
    margin: 0;
    white-space: pre-wrap;
}
html.deprecated pre.declaration, html.deprecated pre.declaration span.camelCase {
    color: red;
}
html.deprecated pre.declaration, html.deprecated pre.declaration span {
    text-decoration: line-through;
}
html.deprecated pre.declaration, html.deprecated pre.declaration span {
    color: -webkit-text;
}

/* Hide Declaration slices for kinds of symbols that tend to have verbose declarations. */
html.kind-Class #Declaration,
html.kind-Protocol #Declaration {
    display: none;
}

/* "Deprecated" in Availability slice */
strong.warning {
    color: red;
    font-weight: normal;
}

/* Code listings */
.code-listing {
    word-wrap: normal;
    overflow-x: auto;
    width: auto;
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
    padding: 4px;
    line-height: 1.5em;
}

.Library .code-listing {
    padding: 0 5px; /* No top/bottom padding in the Library */
}

pre.code-source {
    min-height: 1em;
}

.parameter > td pre {
    white-space: pre-wrap;
}

.placeholder-marker {
    width: 0;
    display: inline-block;
    color: transparent;
}

.syntax-color-literal {
    width: 1.25em;
    height: 1.25em;
    vertical-align: center;
    color: transparent;
    border-radius: 3px;
    border: 1px solid;
    display: inline-block;
}

/* Tables */
.slice:not(#Parameters) > td > table,
.parameter table {
    border-collapse: collapse;
    margin: 8px auto;
}

.slice:not(#Parameters) > td > table td,
.parameter table td {
    border: 1px solid rgb(153, 153, 153) /* headerSliceTopStrokeColor = headerSliceBottomStrokeColor */;
    padding: 4px;
}

/*** Quick Help messages (indexing, no results, etc.) ***/

html.message {
    height: 80px;
}

/* Vertically center the message contents within the page, with or without the search link. */
html.message > body {
    text-align: center;
    max-height: 64px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: -webkit-box;
    -webkit-box-pack: center;
    -webkit-box-align: center;
}

#badge {
    display: block;
    cursor: default;
    margin-left: auto;
    margin-right: auto;
}

#badge > svg {
    display: inline-block;
    white-space: nowrap;
    width: 100%;
}

/* The “Search Documentation” link block */
#actions {
    list-style-type: none;
    margin: 0;
    margin-top: 6px;
    padding: 0;
}

/*** Inspector ***/

html.Inspector {
    /* Prevent nested scroll views. */
    overflow-y: hidden;
    line-height: 14px;
}

html.Inspector .slice > th {
    color: #666 /* inspectorSliverLabelColor */;
    color: -apple-system-secondary-label;
    width: 77px /* IDESliverLabelSize.width - IDEInspectorSliverLabelXOrigin + 1 */;
    font-size: 10px /* inspectorSliverLabelFont */;
    padding-left: 3px /* IDEInspectorSliverLabelXOrigin */;
    padding-right: 0;
}

html.Inspector .slice > * {
    padding-bottom: 5px;

    /* show separators in the inspector within each slice */
    border-top: 1px solid #d6d6d6;
    border-top-color: -apple-system-quaternary-label;
}

html.Inspector .slice > td.hidden-separator {
    /* hide the separator for this section */
    border: 0px solid transparent;
}

html.Inspector .slice:first-child > * {
    /* don't show separator line on the top slice because the inspector will draw it by itself */
    border-top: 0px solid transparent;
}

html.Inspector .slice:last-child > * {
    padding-bottom: 0;
}

html.Inspector figure,
html.Inspector figure > pre {
    margin-left: 0;
    margin-right: 0;
}

.Library figure:last-child {
    margin-bottom: 0; /* Do not add a bottom margin if it's the last figure in the slice. */
}

.special-section {
    margin-bottom: 7px;
    margin-top: 10px;
}

.special-section > p:first-of-type {
    /* Give the special section heading some breathing room */
    margin-top: 3px;
}

html.OneShot .exit-link {
    /* The "exit-link" should have even space above and below it. */
    margin-top: 15px;
}
