/* Site-wide additions to the theme. Colors come from the variant. */

/* Notices: a colored edge and a light tint instead of a filled box. */
#R-body .box.notices { --xn-box: var(--INTERNAL-PRIMARY-color); }
#R-body .box.notices.note { --xn-box: var(--INTERNAL-ACCENT-color); }
#R-body .box.notices.info { --xn-box: var(--INTERNAL-PRIMARY-color); }
#R-body .box.notices.tip { --xn-box: rgba( 62, 155, 110, 1 ); }
#R-body .box.notices.warning,
#R-body .box.notices.caution { --xn-box: rgba( 200, 85, 61, 1 ); }

#R-body .box.notices {
    margin: 1.5rem 0;
    border: 0;
    border-left: 3px solid var(--xn-box);
    border-radius: 4px;
    background: color-mix(in srgb, var(--xn-box) 7%, transparent);
}
#R-body .box.notices > .box-label {
    margin: 0;
    padding: 0.65rem 1rem 0;
    background: none;
    color: var(--INTERNAL-MAIN-TITLES-TEXT-color);
    font-weight: 600;
}
#R-body .box.notices > .box-label i { color: var(--xn-box); }
#R-body .box.notices > .box-content {
    padding: 0.35rem 1rem 0.8rem;
    background: none;
    color: var(--INTERNAL-MAIN-TEXT-color);
}
#R-body .box.notices > .box-content > :first-child { margin-top: 0; }
#R-body .box.notices > .box-content > :last-child { margin-bottom: 0; }

/* Sidebar drop-down lists: the theme's focus outline gets clipped to a
   thick line under the label. Show focus by color instead. */
#R-sidebar .menu-control select:focus,
#R-sidebar .menu-control select:active { outline: none; }
#R-sidebar .menu-control:focus-within,
#R-sidebar .menu-control:focus-within select { color: var(--INTERNAL-MENU-SECTIONS-LINK-HOVER-color); }

/* Code block titles: the theme draws them as tabs. Match the code
   block below them instead of the generic box colors. */
#R-body .tab-nav-button.active {
    background-color: var(--INTERNAL-CODE-BLOCK-BG-color);
    border-color: var(--INTERNAL-CODE-BLOCK-BORDER-color);
    color: var(--INTERNAL-MAIN-TEXT-color);
}
#R-body .tab-nav-button.active > .tab-nav-text { background-color: var(--INTERNAL-CODE-BLOCK-BG-color); }


/* License and copyright, at the bottom of every page. */
#R-body .xn-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: color-mix(in srgb, var(--INTERNAL-MAIN-TEXT-color) 68%, transparent);
}
#R-body .xn-footer span { flex: 1 1 30rem; }
#R-body .xn-footer img { display: block; }

/* Diagrams drawn with the theme colors (assets/diagrams). */
.xd-frame { fill: none; stroke: color-mix(in srgb, var(--INTERNAL-MAIN-TEXT-color) 28%, transparent); stroke-width: 1.5; }
.xd-oob { fill: color-mix(in srgb, var(--INTERNAL-ACCENT-color) 16%, var(--INTERNAL-MAIN-BG-color)); stroke: var(--INTERNAL-ACCENT-color); stroke-width: 1.5; }
.xd-link { fill: var(--INTERNAL-PRIMARY-color); }
.xd-inband { fill: color-mix(in srgb, var(--INTERNAL-MAIN-TITLES-TEXT-color) 8%, var(--INTERNAL-MAIN-BG-color)); stroke: color-mix(in srgb, var(--INTERNAL-MAIN-TITLES-TEXT-color) 45%, transparent); stroke-width: 1.5; }
.xd-text { fill: var(--INTERNAL-MAIN-TEXT-color); font-size: 14px; }
.xd-title { fill: var(--INTERNAL-MAIN-TITLES-TEXT-color); font-size: 16px; font-weight: 600; }
.xd-strong { font-weight: 600; }
.xd-small { fill: color-mix(in srgb, var(--INTERNAL-MAIN-TEXT-color) 70%, transparent); font-size: 12px; }
.xd-label { fill: color-mix(in srgb, var(--INTERNAL-MAIN-TEXT-color) 80%, transparent); font-size: 12px; font-style: italic; }
.xd-on-link { fill: var(--INTERNAL-MAIN-BG-color); font-size: 12.5px; font-weight: 600; }
.xd-dev { fill: color-mix(in srgb, var(--INTERNAL-PRIMARY-color) 14%, var(--INTERNAL-MAIN-BG-color)); stroke: var(--INTERNAL-PRIMARY-color); stroke-width: 1.5; }
.xd-line { fill: none; stroke: color-mix(in srgb, var(--INTERNAL-MAIN-TEXT-color) 70%, transparent); stroke-width: 1.5; }
.xd-dashed { stroke-dasharray: 5 4; }
.xd-dotted { stroke-dasharray: 2 3; }
.xd-arrowhead { fill: color-mix(in srgb, var(--INTERNAL-MAIN-TEXT-color) 70%, transparent); }
.xd-plain { fill: var(--INTERNAL-MAIN-BG-color); stroke: color-mix(in srgb, var(--INTERNAL-MAIN-TEXT-color) 45%, transparent); stroke-width: 1.5; }
.xd-code { fill: var(--INTERNAL-MAIN-TEXT-color); font-family: var(--INTERNAL-CODE-font, monospace); font-size: 12px; white-space: pre; }
#R-body .xd-figure { max-width: 40rem; margin: 1rem auto 1.5rem; }
#R-body .xd-figure svg { width: 100%; height: auto; display: block; }
