.debug-sidebar-core {
    --debug-sidebar-accent: #01b2bf;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10020;
    width: min(350px, calc(100vw - 48px));
    color: #fff;
    background: #000;
    transform: translateX(-100%);
    transition: transform 350ms ease-in-out;
    font-family: system-ui, sans-serif;
    text-align: left;
}

.debug-sidebar-core.is-open {
    transform: translateX(0);
}

.debug-sidebar-core *,
.debug-sidebar-core *::before,
.debug-sidebar-core *::after {
    box-sizing: border-box;
}

.debug-sidebar-core__toggle {
    position: absolute;
    top: 58px;
    left: 100%;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 0 28px 28px 0;
    color: #fff;
    background: var(--debug-sidebar-accent);
    font-size: 26px;
    line-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .5;
    box-shadow: 2px 2px 14px -4px rgba(0, 0, 0, .25);
    transition: width 200ms ease, opacity 200ms ease;
    cursor: pointer;
}

.debug-sidebar-core__toggle-label { display: none; font-size: 14px; padding: 4px 12px; }
.debug-sidebar-core__toggle:hover,
.debug-sidebar-core__toggle:focus-visible { width: 140px; opacity: 1; }
.debug-sidebar-core__toggle:hover .debug-sidebar-core__toggle-label,
.debug-sidebar-core__toggle:focus-visible .debug-sidebar-core__toggle-label { display: block; }
.debug-sidebar-core.is-open .debug-sidebar-core__toggle { opacity: 1; }
.debug-sidebar-core.is-open .debug-sidebar-core__toggle i::before { content: "\e409"; }
.debug-sidebar-core.is-open .debug-sidebar-core__toggle i { transform: rotate(180deg); }

.debug-sidebar-core__inner {
    height: 100%;
    padding: 10px;
}

.debug-sidebar-core__header {
    padding-bottom: 15px;
    margin: 0 10px 15px;
    border-bottom: 1px solid #626262;
}

.debug-sidebar-core__header h2,
.debug-sidebar-core__header p {
    margin: 0;
    color: #fff;
}

.debug-sidebar-core__header h2 {
    font-size: 25px;
    line-height: 30px;
    font-variant: small-caps;
    font-family: system-ui, sans-serif;
    font-weight: 700;
}

.debug-sidebar-core__header p {
    font-size: 13px;
}

.debug-sidebar-core__scroll {
    height: calc(100% - 82px);
    padding: 0 0 28px;
    overflow-y: auto;
    scrollbar-color: #595959 transparent;
    scrollbar-width: thin;
}

.debug-sidebar-core__section {
    margin-bottom: 10px;
}

.debug-sidebar-core__section summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.debug-sidebar-core__section summary::-webkit-details-marker {
    display: none;
}

.debug-sidebar-core__section summary::after {
    content: "\e5cf";
    font-family: "cg-icons";
    margin-left: auto;
    font-size: 18px;
    transform: rotate(0);
}

.debug-sidebar-core__section[open] summary {
    background: #333;
}

.debug-sidebar-core__section[open] summary::after {
    transform: rotate(180deg);
}

.debug-sidebar-core__icon {
    width: 20px;
    color: var(--debug-sidebar-accent);
    text-align: center;
}

.debug-sidebar-core__content {
    padding: 12px 10px 8px;
}

.debug-sidebar-core__group {
    margin-bottom: 16px;
}

.debug-sidebar-core__group > strong {
    display: block;
    margin-bottom: 8px;
}

.debug-sidebar-core__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.debug-sidebar-core__speed-login {
    display: flex;
    margin: 0 0 12px;
}

.debug-sidebar-core__speed-login .debug-sidebar-core__button {
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.debug-sidebar-core__login-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin: 0 0 4px;
}

/* The blank login layout does not load Bootstrap's visually-hidden utility.
   Keep the accessible label out of the grid on every host layout. */
.debug-sidebar-core__login-form .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.debug-sidebar-core__input {
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #5a6375;
    border-radius: 3px;
    color: #fff;
    background: #4d5669;
    font-size: 13px;
}

.debug-sidebar-core__input::placeholder {
    color: #c7cad1;
}

.debug-sidebar-core__input:focus {
    border-color: var(--debug-sidebar-accent);
    outline: 2px solid color-mix(in srgb, var(--debug-sidebar-accent), transparent 45%);
    outline-offset: 1px;
}

.debug-sidebar-core__login-form .debug-sidebar-core__button {
    border-radius: 3px;
}

.debug-sidebar-core__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 2px;
    color: #fff !important;
    background: var(--debug-sidebar-accent);
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
}

.debug-sidebar-core__entry {
    margin-bottom: 8px;
    padding: 9px 10px;
    border-radius: 3px;
    background: #292929;
}

.debug-sidebar-core__entry strong,
.debug-sidebar-core__entry span {
    display: block;
    overflow-wrap: anywhere;
}

.debug-sidebar-core__entry strong {
    margin-bottom: 2px;
    font-size: 12px;
    color: #d7d7d7;
}

.debug-sidebar-core__entry span {
    font-size: 13px;
    color: #fff;
}

.debug-sidebar-core__note {
    margin: 8px 0 0;
    color: #d0d0d0;
    font-size: 12px;
    line-height: 1.45;
}

.debug-sidebar-core__message {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-left: 3px solid var(--debug-sidebar-accent);
    color: #fff;
    background: #292929;
    font-size: 12px;
    line-height: 1.4;
}

.debug-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(51, 51, 51, .56);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 350ms ease-in-out, visibility 350ms;
}

.debug-sidebar-scrim.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 600px) {
    .debug-sidebar-core__toggle {
        top: 92px;
    }
}

@supports (interpolate-size: allow-keywords) {
    .debug-sidebar-core__section { interpolate-size: allow-keywords; }
    .debug-sidebar-core__section::details-content {
        block-size: 0;
        overflow: hidden;
        transition: block-size 350ms ease, content-visibility 350ms allow-discrete;
    }
    .debug-sidebar-core__section[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .debug-sidebar-core,
    .debug-sidebar-core__toggle,
    .debug-sidebar-scrim,
    .debug-sidebar-core__section::details-content { transition: none; }
}
