:root {
    --scalar-custom-header-height: 50px;
}
.custom-header {
    height: var(--scalar-custom-header-height);
    box-shadow: inset 0 -1px 0 var(--scalar-border-color);
    color: var(--scalar-color-1);
    font-size: var(--scalar-font-size-2);
    padding: 0 18px;
    position: fixed;
    justify-content: space-between;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    border-bottom: 1px solid #e5e5e5;
}
/* Dark mode support */
[data-theme="dark"] .custom-header,
.dark-mode .custom-header,
.theme-dark .custom-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333333;
    color: #ffffff;
}
/* Additional dark mode check using Scalar's CSS variables */
@media (prefers-color-scheme: dark) {
    .custom-header {
        background-color: var(--scalar-background-1, #1a1a1a);
        border-bottom: 1px solid var(--scalar-border-color, #333333);
        color: var(--scalar-color-1, #ffffff);
    }
}
.custom-header,
.custom-header nav {
    display: flex;
    align-items: center;
    gap: 18px;
}
.custom-header a {
    color: inherit;
    text-decoration: none;
}
.custom-header a:hover {
    color: var(--scalar-color-2);
}
/* Dark mode link colors */
[data-theme="dark"] .custom-header a,
.dark-mode .custom-header a,
.theme-dark .custom-header a {
    color: #ffffff;
}
[data-theme="dark"] .custom-header a:hover,
.dark-mode .custom-header a:hover,
.theme-dark .custom-header a:hover {
    color: #cccccc;
}
/* Dark mode title color */
[data-theme="dark"] .header-title,
.dark-mode .header-title,
.theme-dark .header-title {
    color: var(--scalar-color-1, #ffffff);
}
/* Push the Scalar content down to account for fixed header */
#app {
    padding-top: var(--scalar-custom-header-height);
}
/* Ensure Scalar's own sticky elements don't overlap with our header */
.scalar-app [data-sticky] {
    top: var(--scalar-custom-header-height) !important;
}
/* Header logo section styling */
.header-logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}
/* Header title styling to match Scalar typography */
.header-title {
    font-family: var(--scalar-font, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: var(--scalar-font-size-3, 16px);
    font-weight: var(--scalar-font-weight-semibold, 600);
    color: var(--scalar-color-1);
    margin: 0;
    line-height: 1.2;
}
.header-logo {
    height: 30px;
    width: auto;
}
/* Logo is dark by default, so no filter needed in light mode */
.custom-header .header-logo {
    filter: none;
}
/* In dark mode, make the logo pure white */
[data-theme="dark"] .header-logo,
.dark-mode .header-logo,
.theme-dark .header-logo {
    filter: brightness(0) invert(1);
}
@media (prefers-color-scheme: dark) {
    .header-logo {
        filter: brightness(0) invert(1);
    }
}
/* Hide documentation tags ONLY in search results */
/* Target elements within the Scalar search modal body */
.scalar-modal-body [id*="tag/getting-started"],
.scalar-modal-body [id*="tag/authentication"],
.scalar-modal-body [id*="tag/user-agent-header"],
.scalar-modal-body [id*="tag/example-request"],
.scalar-modal-body [id*="tag/errors"],
.scalar-modal-body [id*="tag/common-workflows"],
.scalar-modal-body [id*="tag/api-endpoints"],
.scalar-modal-body [id*="tag/documentation"],
.scalar-modal-body [id*="description/introduction"] {
    display: none !important;
}

/* Hide the parent list items containing these documentation tags */
.scalar-modal-body li:has([id*="tag/getting-started"]),
.scalar-modal-body li:has([id*="tag/authentication"]),
.scalar-modal-body li:has([id*="tag/user-agent-header"]),
.scalar-modal-body li:has([id*="tag/example-request"]),
.scalar-modal-body li:has([id*="tag/errors"]),
.scalar-modal-body li:has([id*="tag/common-workflows"]) {
    display: none !important;
}
