/* Restore Bootstrap 3 btn-success green (#5cb85c) — Bootstrap 5 uses a darker #198754 */
.btn-success {
    --bs-btn-bg: #5cb85c;
    --bs-btn-border-color: #4cae4c;
    --bs-btn-hover-bg: #449d44;
    --bs-btn-hover-border-color: #398439;
    --bs-btn-active-bg: #449d44;
    --bs-btn-active-border-color: #398439;
}

/* Bootstrap 5 defaults links to underlined; restore Bootstrap 3 behaviour */
a {
    text-decoration: none;
    color: var(--link-color);
}
a:hover:not(.btn):not(.dropdown-item) {
    text-decoration: underline;
}
.dropdown-menu a {
    color: var(--bs-dropdown-link-color);
}

/* Restore Bootstrap 3 button colours */
.btn-primary {
    --bs-btn-bg: #337ab7;
    --bs-btn-border-color: #2e6da4;
    --bs-btn-hover-bg: #286090;
    --bs-btn-hover-border-color: #204d74;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}
.btn-info {
    --bs-btn-bg: #5bc0de;
    --bs-btn-border-color: #46b8da;
    --bs-btn-hover-bg: #31b0d5;
    --bs-btn-hover-border-color: #269abc;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}

.btn-md {
    padding: 0.44rem 0.875rem;
    font-size: 1.1rem;
}

/* Restore Bootstrap 3 .caret — removed in Bootstrap 5 */
.caret {
    display: inline-block;
    width: 0;
    height: 0;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

/* Restore Bootstrap 3 blockquote styling — Bootstrap 5 reduces the element to a
   bottom margin and its .blockquote class only enlarges the font, which leaves
   quotes indistinguishable from body text. Bootstrap 5 already supplies
   .blockquote > :last-child { margin-bottom: 0 }. */
.blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
}

html {
    --primary-color: #3a7ab0;
    --link-color: #337ab7;

    scroll-padding-top: 4rem;
}

body {
    display: flex;
    flex-direction: column;
    min-block-size: 100svh;
}

.main-wrapper {
    flex-grow: 1;
}

#page-loader {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background: #fff;
    z-index: 9999;
    display: inline-flex;
    color: #fff;
}

#page-loader img {
    width: 20%;
    margin: 0 auto;
    display: block;
}

/* Override bootstrap font size */
h1 { font-size: 28px }
h2 { font-size: 25px }
h3 { font-size: 22px }
h4 { font-size: 19px }
h5 { font-size: 17.5px }

.form-control {
    text-transform: lowercase;
}

.form-control:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

.footer {
    background-color: #181919;
    color: #f2f2f2;
    display: grid;
    margin-block-start: 10px;
}

.footer-container {
    margin: auto!important;
    margin-top: 13px!important;
    margin-bottom: 36px!important;
}

.footer-container a {
    white-space: nowrap;
    color: rgb(0,191,230);
}

.footer-links {
    display: block;
    padding-bottom: 5px;
}

.footer-links a {
    display: block;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: .04em;
}

.copyright {
    clear: both;
    color: #919e9e;
    padding-right: 50px;
    padding-left: 50px;
    font-size: 14px;
}

.navbar {
    /* this is to emulate container fluid for now... */
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    padding-right: calc(var(--bs-gutter-x) * .5);
    padding-left: calc(var(--bs-gutter-x) * .5);

    a.navbar-brand {
        text-decoration: none;
        color: var(--dm-text);
    }

    .navbar-brand {
        display: flex;
        align-items: center;
        gap: 1rem;
        font-size: 1.87rem;

        svg {
            width: 50px;
            height: 50px;
            /* Brand spec: light-background icon color (#00729c) */
            color: hsl(196.2, 100%, 30.6%);
        }
    }

    .nav-link {
        color: var(--link-color) !important;
        font-size: 16px;
        font-weight: bold;
        padding-left: 5px !important;
        padding-right: 10px !important;
    }

    .nav-link:hover {
        text-decoration: underline !important;
    }

}

/* actions bar above every code block: snippet card headers and plain pre blocks alike */
.code-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-color: #ffffff;
    border-bottom: 0;
    padding: 2px 4px;
    min-height: 30px;
}

/* a standalone bar docks onto the pre that follows it */
.code-actions:has(+ pre) {
    border: 1px solid #ccc;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
}

.code-actions + pre {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.snippet h5.card-title {
    margin: 0 0 4px;
}

/* code block action buttons (copy / edit) */
menu.buttons {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 2px;

    svg {
        width: 20px;
        height: 20px;
    }
}

.code-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: #666;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.code-btn:hover,
.code-btn:focus-visible {
    color: var(--link-color);
    background-color: rgba(0, 0, 0, .06);
    border-color: #bbb;
    transform: translateY(-1px);
}

.code-btn:active {
    transform: translateY(0) scale(.92);
}

/* copy: clipboard tilts on hover, checkmark pops out when copied */
.btn-copy-code .icon-copy {
    transition: transform .2s ease;
}

.btn-copy-code:hover .icon-copy,
.btn-copy-code:focus-visible .icon-copy {
    transform: rotate(-6deg);
}

.btn-copy-code .check {
    opacity: 0;
}

.btn-copy-code.copied {
    color: #2e9e44;
    border-color: rgba(46, 158, 68, .35);
}

.btn-copy-code.copied .icon-copy {
    transform: none;
}

.btn-copy-code.copied .check {
    opacity: 1;
    transform-box: fill-box;
    transform-origin: center;
    animation: check-pop .45s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes check-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* edit: neutral at rest, link-colored + scribbling on hover */
.code-actions a.code-btn {
    color: #666;
}

.code-actions a.code-btn:hover,
.code-actions a.code-btn:focus-visible {
    color: var(--link-color);
}

.btn-edit-code .icon-pencil {
    transform-origin: 20% 80%;
}

.btn-edit-code:hover .icon-pencil,
.btn-edit-code:focus-visible .icon-pencil {
    animation: pencil-scribble .5s ease-in-out;
}

@keyframes pencil-scribble {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-12deg) translate(-.5px, .5px); }
    45% { transform: rotate(8deg) translate(.5px, 0); }
    70% { transform: rotate(-5deg); }
}

@media (prefers-reduced-motion: reduce) {
    .code-btn,
    .btn-copy-code .icon-copy {
        transition: none;
    }

    .btn-copy-code.copied .check,
    .btn-edit-code:hover .icon-pencil,
    .btn-edit-code:focus-visible .icon-pencil {
        animation: none;
    }
}

.scroll-to-top {
    position: fixed;
    cursor: pointer;
    bottom: 1em;
    right: 0;
    color: grey;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    bottom: 40px;
    font-size: 40px;
    padding-right: 1em;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
    z-index: 999;
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

/*
    Topics menu (left nav). One popover element, two modes:
    - Desktop (> 1300px): sticky grid column with its own scrollbar.
    - Mobile (<= 1300px): drawer sliding in from the left; the Popover API
      provides toggle, ESC, light dismiss and the top layer.
    Each query owns its positioning, overriding the UA [popover] styles
    (display, position, inset, margin, border, padding) where they don't
    fit the mode.
*/
.topics-menu {
    flex-direction: column;
    color: inherit;
}

.topics-menu-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: clip;
    overscroll-behavior: contain;
    padding: 15px 15px 0 15px;
    scrollbar-gutter: stable;
    /* both inherit into the menu items: wrap long titles nicely, break
       long unbreakable names instead of clipping them */
    text-wrap: pretty;
    overflow-wrap: break-word;
}

@media (min-width: 1301px) {
    .topics-menu {
        display: flex;
        position: sticky;
        top: 0;
        inset-block-end: auto;
        inset-inline: auto;
        align-self: start;
        max-height: 100dvh;
        width: auto;
        height: auto;
        margin: 0;
        border: 0;
        padding: 0;
        background-color: transparent;
    }

    .topics-menu-top,
    .menu-button {
        display: none;
    }
}

@media (max-width: 1300px) {
    /*
        The drawer box styles live on the base rule rather than :popover-open
        so they still apply while the close transition runs; display is left
        to the UA ([popover] { display: none }) so the closed drawer stays
        out of the layout and the accessibility tree.
    */
    .topics-menu {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(400px, 90vw);
        height: 100dvh;
        margin: 0;
        border: 0;
        padding: 0;
        background-color: var(--dm-surface, #fff);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transform: translateX(-100%);
        transition: transform 0.25s ease,
                    overlay 0.25s allow-discrete,
                    display 0.25s allow-discrete;
    }

    .topics-menu:popover-open {
        display: flex;
        transform: none;
    }

    @starting-style {
        .topics-menu:popover-open {
            transform: translateX(-100%);
        }
    }

    /* The panel slides in fully opaque; the menu tree fades in over the last ~25% of the slide */
    .topics-menu:popover-open .topics-menu-scroll {
        opacity: 1;
        transition: opacity 0.06s linear 0.19s;
    }

    @starting-style {
        .topics-menu:popover-open .topics-menu-scroll {
            opacity: 0;
        }
    }

    .topics-menu-top {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: space-between;
        padding-inline-start: 15px;
        font-size: 1rem;
        border-bottom: 1px solid var(--dm-border, #d3d3d3);

        .close-topics {
            font-size: 1.5em;
        }
    }

    .topics-menu::backdrop {
        background: rgb(0 0 0 / 0);
        transition: background 0.25s,
                    overlay 0.25s allow-discrete,
                    display 0.25s allow-discrete;
    }

    .topics-menu:popover-open::backdrop {
        background: rgb(0 0 0 / 0.4);
    }

    @starting-style {
        .topics-menu:popover-open::backdrop {
            background: rgb(0 0 0 / 0);
        }
    }
}

.menu-button {
    padding-right: 15px;
    padding-left: 0;
}

/*
    Left nav tree. Font size is a rem-based token so the menu follows the
    user's preferred browser font size, bumped on small screens for touch.
    Icons, chevrons and spacing are in em so they scale with the token and
    cannot misalign.
*/
.topics-menu {
    --nav-fs: 0.875rem;          /* 14px at browser default */
    --nav-fs-heading: 0.9375rem; /* 15px */
}

@media (max-width: 768px) {
    .topics-menu {
        --nav-fs: 1rem;          /* 16px: comfortable to tap */
        --nav-fs-heading: 1.0625rem;
    }
}

.sidenav-section {
    padding-block: 0.25rem;
}

.sidenav-product,
.sidenav-group-toggle {
    display: flex;
    left: -1.25em;
    align-items: center;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    text-align: start;
    cursor: pointer;
    user-select: none;
    color: var(--dm-text, #000);
}

.sidenav-product {
    gap: 0.6em;
    padding-block: 0.3em;
    font-size: var(--nav-fs-heading);
    font-weight: 600;

    img {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
}

.sidenav-product:hover span {
    text-decoration: underline;
}

.sidenav-section-body,
.sidenav-group-body {
    display: grid;
    grid-template-rows: 0fr;
    min-block-size: 0;
    transition: grid-template-rows 0.25s ease;

    > ul {
        min-block-size: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        list-style: none;
        opacity: 0;
        transition: opacity 0.2s ease 0s;
    }

    &.is-open {
        grid-template-rows: 1fr;
    }

    &.is-open > ul {
        opacity: 1;
        padding-block-end: 0.4em;
        transition: opacity 0.2s ease 0.25s;
    }
}

.sidenav-section-body > ul {
    padding-inline-start: 1.6em;
}

.sidenav-group-body > ul {
    padding-inline-start: 1.3em;
}

.sidenav-group-toggle {
    position: relative;
    gap: 0.3em;
    padding-block: 0.25em;
    font-size: var(--nav-fs);
    font-weight: 400;
    text-transform: uppercase;
}

.sidenav-group-toggle:hover {
    text-decoration: underline;
}

.sidenav-chevron {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    transition: transform 0.2s ease, opacity 0.5s ease;
}

.sidenav-group-toggle[aria-expanded="true"] .sidenav-chevron {
    transform: rotate(90deg);
}

.sidenav-group-toggle.is-loading .sidenav-chevron {
    opacity: 0;
    transition-delay: 0s, 0.2s;
}

.sidenav-group-toggle::before {
    content: "";
    position: absolute;
    inset-inline-start: 0.075em;
    top: calc(50% - 0.425em);
    box-sizing: border-box;
    width: 0.85em;
    height: 0.85em;
    border: 0.15em solid currentColor;
    border-inline-start-color: transparent;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sidenav-group-toggle.is-loading::before {
    opacity: 1;
    transition-delay: 0.2s;
    animation: sidenav-spin 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .sidenav-group-toggle.is-loading::before {
        border-inline-start-color: currentColor;
        animation: sidenav-spinner-pulse 1.2s ease-in-out 0.4s infinite;
    }
}

@keyframes sidenav-spin {
    to {
        transform: rotate(1turn);
    }
}

@keyframes sidenav-spinner-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.sidenav-link {
    display: block;
    font-size: var(--nav-fs);
    padding-block: 0.15em;
    color: var(--link-color);
    text-decoration: none;
}

a.sidenav-link:hover {
    text-decoration: underline;
}

.sidenav-link-static {
    color: var(--dm-text-muted, #777);
    cursor: default;
}

.sidenav-link[aria-current="page"] {
    font-weight: bold;
    color: var(--dm-text, #000);
    pointer-events: none;
    position: relative;

    &:before {
        position: absolute;
        left: -12px;
        top: 50%;
        transform: translateY(-50%);
        content: '●';
        font-size: .6em;
    }
}

.sidenav-topic-link {
    padding-block: 0.25em;
}

li.indented > .sidenav-link {
    margin-inline-start: 0.9em;
}

/* stop images from overlapping */
img{
    max-width:100%;
}

.article-content a > img.img-fluid {
    cursor: zoom-in;
}

.searchLocation {
    font-size: 80%;
    color: #adb7be;
}
.searchSummary {
    font-size: 80%;
}

.versionedSearchResults {
    font-size: 80%;
}

.searchResults {
    margin-top: 1rem;
}

.searchResults > li{
    padding-bottom: 5px;
}

div.code-panel-body {
     position: relative;
}
div.snippet-button-group {
    display: block;
    position: absolute;
    top: -2px;
    right: 0;
}

/* make the alert color black */
.alert {
    color: black !important;
    --bs-alert-padding-y: 0.5rem;
}

.article-content .alert p {
    margin-bottom: 0.25rem;
}

.article-content .alert ul,
.article-content .alert ol {
    margin-bottom: 0;
}

a.anchor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    outline-offset: 3px;
}

/* On larger screens, allow heading link icon to appear in gutter */
@media (min-width: 1301px) {
    .contentArea :is(h1, h2, h3, h4, h5, h6) {
        position: relative;
    }

    a.anchor {
        position: absolute;
        inset-inline-start: -1.15em;
        top: 0.15em;
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    .contentArea :is(h1, h2, h3, h4, h5, h6):hover > a.anchor,
    .contentArea :is(h1, h2, h3, h4, h5, h6) > a.anchor:focus-visible {
        opacity: 1;
    }

    /* But show always on non-hoverable touch screens */
    @media (hover: none) {
        a.anchor {
            opacity: 1;
        }
    }
}

.main-container {
    --sidenav-width: 320px;
    --toc-width: 300px;

    position: relative;
    display: grid;
    grid-template-areas: "sidenav article toc";
    grid-template-columns: var(--sidenav-width) 1fr var(--toc-width);

    .topics-menu {
        grid-area: sidenav;
    }
    .tocColumn {
        grid-area: toc;
        margin-inline-end: 2rem;
    }
    .contentArea {
        grid-area: article;
        margin-inline: 2rem;
    }

    @media (max-width: 1300px) {
        grid-template-areas: "article toc";
        grid-template-columns: 1fr var(--toc-width);

        .contentArea {
            margin-inline: 1rem;
        }

        .tocColumn {
            margin-inline-end: 1rem;
        }
    }

    @media (max-width: 900px) {
        grid-template-areas: "article";
        grid-template-columns: 1fr;

        .tocColumn {
            display: none;
        }

        .container-actions {
            display: flex;
        }

        .article-toc-inline-container {
            display: block;
        }
    }
}

.article-toc-inline-container {
    display: none;
    /* Lets descendants query scroll-state(stuck) for the pinned shadow */
    container-type: scroll-state;
}

.container-actions {
    display: none;
    gap: 0.5rem;
    margin-block: 10px;
}

/* format the content area */
.contentArea {
    background-color: #fefefe;
    font-size: 17px;
}

.contentArea h1,
.contentArea h2,
.contentArea h3,
.contentArea h4,
.contentArea h5 {
    font-weight: bold;
}

.contentArea h2,
.contentArea h3,
.contentArea h4,
.contentArea h5 {
    margin-top: 20px;
}

.contentArea h2 {
    border-bottom: 1px solid #d9edf7;
    padding-bottom: 5px;
}

.contentArea .image-container {
    text-align: center;
    padding: 15px;
}

img.center {
    display: block;
    padding: 15px;
    margin: 15px auto;
}

table img.center {
    border: none;
    padding: 6px;
}

.tab-pane {
    position: relative;
}

/** Styles for code snippets **/
.snippet {
    margin-bottom: 20px;
}

code {
    color: inherit !important;
    font-size: 95% !important;
    margin: 0 !important;
    padding: 2px 4px !important;
    background-color: #f5f5f5;
    border-radius: 3px;
}

pre code {
    padding: 0 !important;
    background-color: transparent;
    border-radius: 0;
}

pre {
    font-size: 90% !important;
    line-height: 19px !important;
    overflow: auto !important;
    padding: 4px 6px !important;
    white-space: pre-wrap !important;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.snippet pre {
    margin-bottom: 0;
}

pre > code {
    word-break: break-all !important;
    background: transparent !important;
}

.ab-variant {
    display: none;
}

/* add glyph to external links */
.article-content a[href^="http"]:not([href^="https://particular.net"]):not(.no-glyphicon):after,
.article-content a[href^="github-windows"]:not(.no-glyphicon):after {
    white-space: nowrap;
    font-family: "bootstrap-icons";
    content: "\2009\f1c5";
    font-size: 50%;
    display: inline;
    text-decoration: none;
    vertical-align: text-top;
}

/* but not in a button */
.article-content a.btn:after {
    content: none !important;
}

.article-content {
    margin-top: 15px;
}

.page-info {
    margin: 10px 0 0 0;
    font-size: 13px;
    border: none;
    border-radius: 0;
    --bs-card-bg: #f5f5f5;
}
.page-info a {
    color: #3773a7;
}
.page-info>div{
    padding: 5px 15px 5px;
}

.page-info > div > div {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.page-info .btn-link {
    font-size: 13px;
}

.page-info .dropdown-toggle {
    margin-left: 8px !important;
}

.warning-in-component {
    margin-top: 10px;
    margin-bottom: 0;
    padding: 10px;
}

.nugets-accordion {
    --bs-accordion-bg: none;
    --bs-accordion-active-bg: none;
    --bs-accordion-btn-icon-width: 0.8rem;
    --bs-accordion-btn-icon-height: 0.8rem;

    .accordion-button {
        width: unset;
        text-decoration: none;
    }

    /* caret before */
    .accordion-button::after {
        margin-left: 0;
        margin-right: 0.5rem;
        order: -1;
    }

    .nugetlist {
        padding:10px;
        padding-top: 0;
        padding-bottom: 0;
        margin:5px;
        list-style: none;
    }
}


.selected-version {
    font-weight: bold;
    color: black;
}

/* Max Width of the popover */
.popover {
    max-width: 100%;
}

.popover-body ul {
    list-style: none;
    padding: 0;
}

.button-wrapper .btn {
    margin-bottom:5px;
}

img.nuget
{
    vertical-align: top;
    padding-top: 1px;
}


.video-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;
    margin-bottom: 10px;
}

    .video-container iframe,
    .video-container object,
    .video-container embed {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

.tutorial-actions {
    margin-top: 1.5em;
    justify-content: center;
    flex-flow: wrap;
    gap: 0.8em;
    align-items: center;
}

/* Samples & Tutorials */
.inline-download {
    margin: 2em 0;
}

.inline-download .btn:nth-child(2) {
    margin-left: 20px;
}

.docs-download-btn.dropdown-toggle::after {
    align-self: center;
}

.btn-outline-secondary {
    color: #000;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: #c0cdd9;
    color: #000;
    border-color: #6c757d;
}

/* mermaid */
.messageText {
    font-size: 12px !important;
}

div.mermaid {
    text-align: center;
    border: 1px solid lightgray;
    border-radius: 4px;
    margin: 5px;
}

/* Click-to-zoom dialog for images and mermaid diagrams (see wireLightbox) */
dialog.lightbox {
    padding: 0;
    border: none;
    border-radius: 6px;
    background: var(--bs-body-bg);
    /* the close button hangs outside the corner */
    overflow: visible;
}

dialog.lightbox .lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    padding: 10px;
    overflow: auto;
}

dialog.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.8);
}

dialog.lightbox img {
    display: block;
    max-width: 85vw;
    max-height: 85vh;
}

/* SVGs usually ship without intrinsic dimensions and would collapse to the
   300px default object size — give them an explicit one */
dialog.lightbox img[src$=".svg" i] {
    width: min(85vw, 1200px);
    height: auto;
}

dialog.lightbox .btn-close {
    position: absolute;
    top: -14px;
    right: -14px;
    padding: 8px;
    /* Fixed white chip + black ✕ in both themes. Bootstrap's dark mode
       styles .btn-close with an invert filter on the whole element, which
       would turn the chip white-on-white — neutralize it. */
    background-color: #fff;
    filter: none;
    border: 1px solid rgb(0 0 0 / 15%);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgb(0 0 0 / 40%);
    z-index: 1;
}

dialog.lightbox .mermaid {
    width: 85vw;
}

div.mermaid .message {
    fill: #f1d592;
}

div.mermaid .event {
    fill: #f1d592;
    stroke-dasharray: 2, 2;
}

.note {
    stroke: black !important;
    fill: white !important;
}

@media screen and
    (-ms-high-contrast: active),
    (-ms-high-contrast: none),
    (-ms-accelerator:none) {
    /* IE-specific styles go here */
    .mermaid {
        height: 0;
        padding-top: 40%;
        position: relative;
        margin: 0;
    }

    svg {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.alert a {
    font-weight: bold;
}

#new-user-quickstart-alert {
    position: fixed;
    top: -80px;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 40px;
    width: fit-content;
    max-width: 90%;
    margin: 20px auto;
    z-index: 3;
    border-color: #abd6ab;
    box-shadow: 0px 3px 10px #ccc;
    animation: quickstart-slide-in 1s ease forwards;
}

@keyframes quickstart-slide-in {
    to {
        top: 0;
    }
}

#new-user-quickstart-alert a {
    color: #3c763d;
    text-decoration: underline;
}

#new-user-quickstart-alert a:hover {
    color: #2a602b;
}

.article-content .alert-success {
    background-color: #D0E7DE;
    border-color: #BBDBCC;
}

.article-content .alert-success:before {
    content: 'TIP ';
    color: darkgreen;
}

.alert-primary {
    background-color: #d9edf7;
    border-color: #bce8f1;
}

.alert:before {
    font-weight: bold;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

.article-content .alert-info:before {
    content: 'IMPORTANT ';
    color: #19526f;
}
.article-content .alert-primary:before {
    content: 'NOTE ';
    color: #19526f;
}

.article-content .alert-warning {
    --bs-alert-bg: #fcf8e3;
    --bs-alert-border-color: #faebcc;
}

.article-content .alert-warning:before {
    content: 'WARNING ';
    color: #8a6d3b;
}

.article-content .alert-danger:before {
    content: 'DANGER ';
    color: #a94442;
}

@media screen and (max-width: 768px) {
    #new-user-quickstart-alert {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
}

.article-content kbd {
    display: inline-block;
    padding: 3px 5px;
    font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;
    font-size: 11px;
    line-height: 10px;
    color: #444d56;
    vertical-align: middle;
    background-color: #fafbfc;
    border: solid 1px #c6cbd1;
    border-bottom-color: #959da5;
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 #f5f5f5;
}

.no-border {
    border: none;
}

.btn-default-blue {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: #ffffff;
    --bs-btn-hover-bg: #e6e6e6;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-border-color: #adadad;
    --bs-btn-active-bg: #e6e6e6;
    --bs-btn-active-color: #000000;
    --bs-btn-active-border-color: #adadad;
}

#callsToAction {
    margin-block-end: 14px;
}



.full-width {
    width: calc(100% - 8px);
    left: -25px;
    position: relative;
}

.full-viewport-height {
    height: 100vh;
    padding: 5px 0 0 1px;
}

.full-height {
    height: 100%;
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    row-gap: 0.4em;
}

.article-actions .btn-group {
    margin-right: 10px;
}

#contentHeaders {
    position: relative;
    overflow-y: auto;
    height: calc(100vh - 200px);
    top: 14px;
}

#contentHeaders ul.nav {
    display: block; /* default flex forces horizontal scroll */
}

.headers-container ul {
    list-style-type: none;
    padding-left: 12px;
}

.headers-container ul li,
.headers-container ul li a {
    white-space: normal;
    width: 100%;
    height: auto;
    word-wrap: break-word;
}

.headers-container ul>li {
    display: list-item;
    margin-bottom: 2px;
    position: relative;
}

.headers-container ul>li>a {
    padding: 0;
    font-size: 13px;
    background-color: #ffffff;
    color: var(--link-color);
}

.headers-container ul>li>a:hover {
    text-decoration: underline;
    background-color: #ffffff;
}

.headers-container ul li.nav-item a.nav-link.active {
    color: #000;
    font-weight: bold;
    background-color: #ffffff;
}

a.nav-link.active::before {
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    content: '●';
    font-size: 8px;
}

/*Scrollspy - floating banner*/
#dropdownHeaders {
    padding: 10px 15px 10px 25px;
    max-height: 480px;
}

#contentHeadersBanner {
    z-index: 1;
}

.bannerContainer {
    padding: 10px 20px 16px;
    background-color: #ffffff;
}

/* Shadow only while the banner is actually stuck; browsers without
   scroll-state queries just never show it */
@container scroll-state(stuck: top) {
    .bannerContainer {
        box-shadow: 0px 8px 6px 0px rgb(0 0 0 / 20%);
    }
}

.bannerContainer .btn:active, .btn:focus {
    background-image: none;
    outline: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.flex-parent {
    display: flex;
    align-items: center;
    width: 100%
}

.flex-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.flex-child > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

#bannerDisplay {
    padding-left: 0;
    width: 100%;
    color: var(--primary-color);
    font-size: 17px;
    font-weight: bold;
    text-align: left;
    border-radius: 0px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
    height: 30px;
}

#bannerDisplay:hover {
    text-decoration: underline;
}

#bannerHeaders-list {
    background-color: #ffffff;
    max-height: 480px;
    overflow-y: auto;
    padding-top: 5px;
    border-top: solid;
    border-top-color: #d3d3d3;
    border-top-width: 2px;
    position: absolute;
    box-shadow: 0px 8px 6px 0px rgb(0 0 0 / 20%);
    font-size: 80%;
    width: 100%;
    left: 0;
    top: 56px;
}

.center-wrapper {
    margin-inline: auto;
    max-width: 1550px;
    width: 100%;
}

.global-nav {
    background-color: #f2f6f7;
    padding: 5px 0 4px;

    ul {
        display: flex;
        justify-content: end;
        padding-right: 16px;
        margin-bottom: 4px;
        padding-left: 0;

        li {
            display: inline-block;
            margin-left: 30px;

            a {
                text-transform: uppercase;
                font-weight: normal;
                color: #00729C;
                padding-left: 20px;
                font-size: 12px;
                background-position: left 0px center;
                background-size: 14px 14px;
                background-repeat: no-repeat;
            }
        }
    }

    .bg-home {
        background-image: url(/https/docs.particular.net/content/images/home.svg);
    }

    .bg-blog {
        background-image: url(/https/docs.particular.net/content/images/blog.svg);
    }

    .bg-learn {
        background-image: url(/https/docs.particular.net/content/images/course.svg);
    }
}

.article-navigation {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: normal;
    margin-top: 0;
    margin-bottom: 8px;
}

.side-cta {
    background: #f4f9fc;
    padding: 10px 15px 15px;
    margin-top: 22px;
    font-weight: bold;
    color: #1a1a1a;
    border: 1px solid #c8e4f0;
    border-left: 3px solid rgb(0, 191, 230);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.side-cta p {
    margin-bottom: 0.35rem;
}

.btn-arrow {
    color: var(--link-color);
}

.btn-arrow a {
    color: var(--link-color);
}

.btn-arrow-dark {
    color: rgb(0,191,230);
}

.btn-arrow-dark a {
    color: rgb(0,191,230);
}


.alert-cookies {
    position: relative;
    padding: 0.75rem 1.25rem;
    color: #fff !important;
    border: none;
    border-bottom: 3px solid var(--primary-color);
    background-color: #1a1a2e;
    margin-bottom: 0;
    border-radius: 0;
}

.alert-cookies .container {
    padding: 16px 100px 16px 16px;
    position: relative;
    top: 0;
    width: 100%;
}
.alert-cookies.alert-dismissible {
    padding: 0;
}

.alert-cookies.alert-dismissible .container {
    max-width: 1140px;
}

.alert-cookies.alert-dismissible button {
    font-size: 12px;
    opacity: 1;
    font-weight: normal;
    background-color: var(--primary-color);
    text-shadow: none;
    border: none;
    padding: 7px 20px 9px;
    padding: 0.4375rem 1.25rem 0.5625rem;
    margin-top: 23px;
    margin-top: 1.4375rem;
    position: absolute;
    top: 0;
    margin-right: 50px;
}

.alert-dismissible {
    padding-right: 4rem;
}

.fade {
    transition: opacity .15s linear!important;
}

@media screen and (max-width:768px) {
    html {
        font-size: 16px;
    }

    .global-nav ul li a,
    .contentArea .page-info,
    .main .form-control,
    .main .btn,
    .main .dropdown-menu,
    .headers-container ul > li > a {
        font-size: 1rem;
    }

    .headers-container ul > li > a {
        line-height: 2rem;
    }

    .global-nav .container ul li a {
        background-position: 0 0;
        background-size: 1rem 1rem;
    }
}

.card-header:has(div:nth-child(2) .component-header-label) .component-header-label {
    min-width: 120px;
    display: inline-block;
}

.cookie-notice-banner {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    color: hsl(0, 0%, 100%);
    border: none;
    border-bottom: 3px solid var(--primary-color);
    background-color: hsl(240, 28%, 14%);
    padding: 1rem;

    button {
        background-color: var(--primary-color);
    }
}

.table {
    thead {
        th {
            background-color: hsl(0, 0%, 93%);
        }
    }
}

.article-content .alert {
    position: unset;
}

.sticky {
    position: sticky;
    top: 0;
}

/* ============================================
   Dark mode
   ============================================ */
html[data-bs-theme="dark"]  {
    background-color: #1b1b1b;
    --primary-color: #5a9fd4;
    --link-color: #6db3f2;
    --dm-bg: #1b1b1b;
    --dm-surface: #252525;
    --dm-surface-alt: #2d2d2d;
    --dm-text: #d8d8d8;
    --dm-text-muted: #999;
    --dm-border: #444;

    body {
        background-color: var(--dm-bg);
        color: var(--dm-text);
        color-scheme: dark;
    }

    .navbar {
        background-color: var(--dm-bg);
        border-color: transparent;
    }

    a.navbar-brand {
        color: var(--dm-text);
    }

    .navbar-brand svg {
        /* Brand spec: dark-background icon color (#00a3c4) */
        color: hsl(190.1, 100%, 38.4%);
    }

    /* Global nav bar */
    .global-nav {
        background-color: #111;
    }

    .global-nav .container ul li a {
        color: var(--link-color);
    }

    /* Search box */
    .form-control {
        background-color: var(--dm-surface-alt);
        border-color: var(--dm-border);
        color: var(--dm-text);
    }

    .form-control::placeholder {
        color: var(--dm-text-muted);
    }

    .btn-outline-secondary {
        background-color: var(--dm-surface-alt);
        border-color: var(--dm-border);
        color: var(--dm-text);
    }

    /* Content area — match page bg so home page blocks stand out */
    .contentArea {
        background-color: var(--dm-bg);
    }

    .contentArea h2 {
        border-bottom-color: var(--dm-border);
    }

    .contentArea h2 .glyphicon-link,
    .contentArea h3 .glyphicon-link,
    .contentArea h4 .glyphicon-link,
    .contentArea h5 .glyphicon-link {
        color: var(--dm-text);
    }

    /* Links */
    a {
        color: var(--link-color);
    }

    .article-content a {
        color: var(--link-color);
    }

    /* Code blocks */
    pre {
        background-color: #1e1e1e !important;
        border-color: var(--dm-border) !important;
        color: #d4d4d4 !important;
    }

    code {
        background-color: rgba(255, 255, 255, 0.12) !important;
        color: #e0e0e0;
    }

    pre > code {
        background-color: transparent !important;
        color: inherit !important;
    }

    .code-actions {
        background-color: var(--dm-surface-alt);
        border-color: var(--dm-border);
        color: var(--dm-text);
    }

    .code-btn {
        color: var(--dm-text-muted);
        border-color: var(--dm-border);
    }

    .code-btn:hover,
    .code-btn:focus-visible {
        color: var(--link-color);
        background-color: rgba(255, 255, 255, .08);
        border-color: #666;
    }

    .code-actions a.code-btn {
        color: var(--dm-text-muted);
    }

    .code-actions a.code-btn:hover,
    .code-actions a.code-btn:focus-visible {
        color: var(--link-color);
    }

    .btn-copy-code.copied {
        color: #6cbf6c;
        border-color: rgba(108, 191, 108, .4);
    }

    /* Navigation panels */
    .panel {
        background-color: var(--dm-surface);
        border-color: var(--dm-border);
    }

    .panel-body {
        color: var(--dm-text);
    }

    /* Alerts */
    .alert {
        color: var(--dm-text) !important;
    }

    .alert-success,
    .article-content .alert-success {
        background-color: #1a2e1a;
        border-color: #2a4a2a;
    }

    .article-content .alert-success:before {
        color: #6cbf6c;
    }

    .alert-info,
    .alert-primary {
        background-color: #1a2a3e;
        border-color: #2a4060;
    }

    .article-content .alert-info:before,
    .article-content .alert-primary:before {
        color: #6db3f2;
    }

    .alert-warning {
        background-color: #3e3520;
        border-color: #5a4d30;
    }

    .article-content .alert-warning:before {
        color: #e0c070;
    }

    .alert-danger {
        background-color: #3e1a1a;
        border-color: #5a2a2a;
    }

    .article-content .alert-danger:before {
        color: #f08080;
    }

    /* Topics menu / sidebar. Tree colors come from the var(--dm-*, fallback)
       tokens in the main sidenav section, so only the surface needs a rule. */
    .topics-menu {
        background-color: var(--dm-surface);
    }

    /* Content headers / scrollspy */
    .headers-container ul > li > a {
        background-color: transparent;
        color: var(--link-color);
    }

    .headers-container ul > li > a:hover {
        background-color: transparent;
    }

    .headers-container ul li.nav-item a.nav-link.active {
        color: var(--dm-text);
        background-color: transparent;
    }

    /* Banner container */
    .bannerContainer {
        background-color: var(--dm-surface);
    }

    @container scroll-state(stuck: top) {
        .bannerContainer {
            box-shadow: 0px 8px 6px 0px rgb(0 0 0 / 50%);
        }
    }

    #bannerHeaders-list {
        background-color: var(--dm-surface);
        border-top-color: var(--dm-border);
    }

    #bannerHeaders-list .card {
        background-color: transparent;
        border: none;
    }

    #bannerDisplay {
        color: var(--link-color);
    }

    /* Page info */
    .page-info {
        color: var(--dm-text-muted);
        --bs-card-bg: var(--dm-surface-alt);
    }

    .page-info a {
        color: var(--link-color);
    }

    .side-cta .btn-arrow-dark,
    .side-cta .btn-arrow-dark a {
        color: var(--link-color);
    }

    /* Side CTA */
    .side-cta {
        background: var(--dm-surface);
        border: 1px solid var(--dm-border);
        border-left: 3px solid rgb(0, 191, 230);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        color: var(--dm-text);
    }

    .side-cta .btn-arrow-dark,
    .side-cta .btn-arrow-dark a {
        color: rgb(0, 191, 230);
    }

    /* kbd */
    .article-content kbd {
        color: var(--dm-text);
        background-color: #333;
        border-color: #555;
        border-bottom-color: #666;
        box-shadow: inset 0 -1px 0 #444;
    }

    /* Mermaid diagrams */
    div.mermaid {
        border-color: var(--dm-border);
        background-color: hsl(0, 0%, 90%);
    }

    /* Dropdown menus */
    .dropdown-menu {
        background-color: var(--dm-surface);
        border-color: var(--dm-border);
    }

    .dropdown-menu > li > a {
        color: var(--dm-text);
    }

    .dropdown-menu > li > a:hover,
    .dropdown-menu > li > a:focus {
        background-color: var(--dm-surface-alt);
        color: var(--dm-text);
    }

    /* Popover */
    .popover {
        background-color: var(--dm-surface);
        border-color: var(--dm-border);
    }

    .popover-content {
        color: var(--dm-text);
    }

    /* Page loader */
    #page-loader {
        background: var(--dm-bg);
    }

    /* Images — slightly reduce brightness */
    .article-content img:not(.mermaid img) {
        opacity: 0.9;
        background-color: hsl(0, 0%, 90%);
    }

    /* Search */
    .searchLocation {
        color: var(--dm-text-muted);
    }

    .selected-version {
        color: var(--dm-text);
    }

    /* Component header label */
    .component-header-label {
        color: var(--dm-text);
    }

    /* Scroll-to-top */
    .scroll-to-top {
        color: var(--dm-text-muted);
    }

    /* Quick start alert */
    #new-user-quickstart-alert {
        background-color: #1a2e1a;
        border-color: #2a4a2a;
        box-shadow: 0px 3px 10px #000;
    }

    /* Buttons */
    .btn-info {
        background-color: #1a7a8a;
        border-color: #15636f;
        color: #fff !important;
    }

    .btn-primary {
        background-color: #2a6496;
        border-color: #1f4f78;
        color: #fff !important;
    }

    .btn-default-blue {
        color: var(--link-color);
        border-color: var(--link-color);
        background-color: transparent;
    }

    .table {
        thead {
            th {
                background-color: hsl(0, 0%, 24%);
            }
        }
    }

    /* Footer — already dark, minimal changes needed */
    .footer {
        background-color: #111;
    }
}

/* Cookie consent — dark mode inherits light mode treatment, no override needed */

/* Dark mode toggle dropdown in global nav */

.navbar-header-dark-mode-toggle {
    float: right;
    margin: 10px 8px 8px 0;
}

.theme-toggle {
    margin-left: 10px;
}

.dark-mode-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    display: inline-flex;
    align-items: center;
    color: var(--dm-text, #000);
}

/* Masked glyphs shared by the trigger and the menu items */
.theme-toggle-icon,
.theme-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    -webkit-mask-image: var(--theme-button-icon);
    mask-image: var(--theme-button-icon);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: currentColor;
}

/* The trigger inherits its glyph from the active-mode class set by JS;
   menu icons declare their own. Shared so each SVG lives in one place. */
.dark-mode-toggle-btn.system,
.theme-icon.system {
    --theme-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 18a6 6 0 0 0 0-12v12z'/%3E%3C/svg%3E");
}

.dark-mode-toggle-btn.sun,
.theme-icon.sun {
    --theme-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2'/%3E%3Cpath d='M12 20v2'/%3E%3Cpath d='m4.93 4.93 1.41 1.41'/%3E%3Cpath d='m17.66 17.66 1.41 1.41'/%3E%3Cpath d='M2 12h2'/%3E%3Cpath d='M20 12h2'/%3E%3Cpath d='m6.34 17.66-1.41 1.41'/%3E%3Cpath d='m19.07 4.93-1.41 1.41'/%3E%3C/svg%3E");
}

.dark-mode-toggle-btn.moon,
.theme-icon.moon {
    --theme-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401'/%3E%3C/svg%3E");
}

/* Collapsed navbar: smaller brand, and theme selector on its own line
   below the nav links as "Appearance:" label + icon-only dropdown */
@media (max-width: 991.98px) {
    .navbar .navbar-brand {
        gap: 0.75rem;
        font-size: 1.4rem;

        svg {
            width: 40px;
            height: 40px;
        }
    }

    .navbar-theme-row {
        margin-top: 8px;
    }

    .navbar-header-dark-mode-toggle {
        float: none;
        margin: 0 0 0 2px;
    }
}

/* Search trigger in the navbar + slide-down search panel (Popover API) */

.search-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 12px;
    font-size: 20px;
    line-height: 1;
    color: var(--dm-text, #000);

    &:hover svg, &:focus-visible svg {
        animation: search-shake 0.9s ease-out forwards;
        transform-origin: bottom right;
    }

    @media (prefers-reduced-motion: reduce) {
        &:hover svg, &:focus-visible svg {
            animation: none;
        }
    }
}

@keyframes search-shake {
    0% {
        transform: scale(1) rotate(0deg);
    }

    10% {
        transform: scale(1.05) rotate(-3deg);
    }

    25% {
        transform: scale(1.12) rotate(7deg);
    }

    40% {
        transform: scale(1.16) rotate(-10deg);
    }

    55% {
        transform: scale(1.16) rotate(8deg);
    }

    68% {
        transform: scale(1.13) rotate(-5deg);
    }

    80% {
        transform: scale(1.08) rotate(2deg);
    }

    92% {
        transform: scale(1.03) rotate(-1deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.search-panel {
    position: fixed;
    inset: 0 0 auto 0;
    margin: 0 auto;
    width: min(40rem, 100%);
    border: none;
    border-radius: 0 0 10px 10px;
    padding: 24px 28px;
    background-color: var(--dm-surface, #fff);
    color: var(--dm-text, inherit);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
    translate: 0 0;
    opacity: 1;
    transition: translate .35s ease, opacity .35s ease,
                display .35s allow-discrete, overlay .35s allow-discrete;
}

/* Slide back up when dismissed (ESC, click outside, or the close button).
   No fade here: the panel leaves the viewport anyway, and staying opaque
   keeps the motion visible */
.search-panel:not(:popover-open) {
    translate: 0 -110%;
}

/* Entry: start above the viewport, slide down */
@starting-style {
    .search-panel:popover-open {
        translate: 0 -110%;
        opacity: 0;
    }
}

.search-panel::backdrop {
    background-color: rgba(0, 0, 0, .35);
    transition: background-color .35s ease,
                display .35s allow-discrete, overlay .35s allow-discrete;
}

/* Fade the dimmed backdrop out alongside the exit slide instead of
   snapping to clear when the panel finishes hiding */
.search-panel:not(:popover-open)::backdrop {
    background-color: rgba(0, 0, 0, 0);
}

@starting-style {
    .search-panel:popover-open::backdrop {
        background-color: rgba(0, 0, 0, 0);
    }
}

/* Reduced motion: open and close the panel instantly, no slide or fade */
@media (prefers-reduced-motion: reduce) {
    .search-panel,
    .search-panel::backdrop {
        transition: none;
    }
}

/* Browsers without the Popover API render [popover] as a plain block;
   keep the panel out of the page flow there */
@supports not selector(:popover-open) {
    .search-panel {
        display: none;
    }
}

.search-panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    color: inherit;
}

.search-panel-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 28px;
    border-bottom: 2px solid var(--link-color);
    font-size: 20px;
}

.search-panel-input input {
    flex: 1;
    min-width: 0;
    padding: 6px 0;
    border: none;
    outline: none;
    background: transparent;
    color: inherit;
    font-size: 16px;
    text-transform: lowercase;
}

.search-panel-hint {
    margin: 14px 0 0;
    text-align: center;
    font-style: italic;
    font-size: 14px;
    color: var(--dm-text-muted, #6c757d);
}

/* Menu item layout: icon, label, trailing check on the active mode */
.theme-menu > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-menu .theme-check {
    margin-left: auto;
    font-size: 20px;
    visibility: hidden;
}

.theme-menu > li.active .theme-check {
    visibility: visible;
}
/* ============================================
   404 page
   ============================================ */
.page-not-found {
    /* Brand spec: light-background icon color */
    --notfound-accent: #00729c;
    --notfound-grid: rgba(0, 0, 0, 0.07);
    position: relative;
    isolation: isolate;
    padding: 3rem 1rem;
    text-align: center;
}

html[data-bs-theme="dark"] .page-not-found {
    /* Brand spec: dark-background icon color (#00a3c4) */
    --notfound-accent: hsl(190.1, 100%, 38.4%);
    --notfound-grid: rgba(255, 255, 255, 0.07);
}

/* The construction grid from the logo sketch, kept as a backdrop that fades at the edges */
.page-not-found::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(var(--notfound-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--notfound-grid) 1px, transparent 1px);
    background-size: 2rem 2rem;
    background-position: center;
    mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
}

/* "404" with the logo mark standing in for the zero */
.notfound-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.06em;
    font-size: clamp(5rem, 16vw, 9rem);
    font-weight: 700;
    line-height: 1;
}

.notfound-mark {
    height: 0.74em;
    width: auto;
    color: var(--notfound-accent);
    animation: notfound-spin 24s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .notfound-mark {
        animation: none;
    }
}

@keyframes notfound-spin {
    to {
        transform: rotate(1turn);
    }
}

.notfound-title {
    margin: 1.5rem 0 0.5rem;
}

.notfound-lead {
    max-width: 34rem;
    margin: 0 auto 1.5rem;
    color: var(--dm-text-muted, #6c757d);
}
