/**
 * Shufflrr API Docs Manager — documentation reader.
 *
 * Full-width documentation shell under the existing site header.
 * Visual language matches How-To / Books (navy sidebar + light content)
 * but this file is independent. Side chevrons switch previous/next sections.
 */

html:has(body.sadm-is-reader) {
	background: #ffffff !important;
	background-color: #ffffff !important;
	--sadm-admin-bar: 0px;
	--sadm-site-header: 70px;
	--sadm-crumbbar-height: 44px;
	--sadm-sticky-top: calc(var(--sadm-admin-bar) + var(--sadm-site-header));
	scroll-padding-top: calc(var(--sadm-sticky-top) + var(--sadm-crumbbar-height) + 16px);
}

html:has(body.sadm-is-reader.admin-bar) {
	--sadm-admin-bar: 32px;
}

@media screen and (max-width: 782px) {
	html:has(body.sadm-is-reader.admin-bar) {
		--sadm-admin-bar: 46px;
	}
}

body.sadm-is-reader {
	--sadm-sidebar-width: 300px;
	--sadm-content-max-width: 1000px;
	--sadm-admin-bar: 0px;
	--sadm-site-header: 70px;
	--sadm-crumbbar-height: 44px;
	--sadm-sticky-top: calc(var(--sadm-admin-bar) + var(--sadm-site-header));
	--sadm-available-height: calc(100dvh - var(--sadm-sticky-top));
	--sadm-sidebar-bg: #000130;
	--sadm-sidebar-fg: #ffffff;
	--sadm-sidebar-muted: rgba(255, 255, 255, 0.62);
	--sadm-sidebar-active: #0088cc;
	--sadm-accent: #0078ff;
	--sadm-accent-soft: #e8f4fa;
	--sadm-text: #1f2937;
	--sadm-muted: #6b7280;
	--sadm-border: #e6e6e6;
	--sadm-content-bg: #ffffff;
	--global--color-background: #ffffff;
	background: #ffffff;
	background-color: #ffffff;
	scroll-padding-top: calc(var(--sadm-sticky-top) + var(--sadm-crumbbar-height) + 16px);
}

body.sadm-is-reader.admin-bar {
	--sadm-admin-bar: 32px;
}

@media screen and (max-width: 782px) {
	body.sadm-is-reader.admin-bar {
		--sadm-admin-bar: 46px;
	}
}

@media (max-width: 1024px) {
	html:has(body.sadm-is-reader),
	body.sadm-is-reader {
		--sadm-site-header: 80px;
	}
}

@media (max-width: 767px) {
	html:has(body.sadm-is-reader),
	body.sadm-is-reader {
		--sadm-site-header: 90px;
	}
}

/* Keep the site header above the reader. Do not force position — Elementor sticky uses fixed. */
body.sadm-is-reader .ekit-template-content-header,
body.sadm-is-reader .elementor-location-header {
	z-index: 300;
	overflow: visible !important;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

/*
 * Elementor sticky clones the header into .elementor-sticky__spacer.
 * Hide the clone visually but keep its height so the reader is not
 * pulled up under the fixed header.
 */
body.sadm-is-reader .elementor-sticky__spacer {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
	user-select: none !important;
	overflow: hidden !important;
}

body.sadm-is-reader .elementor-sticky__spacer,
body.sadm-is-reader .elementor-sticky__spacer * {
	visibility: hidden !important;
	pointer-events: none !important;
}

body.sadm-is-reader .elementor-sticky__spacer *::before,
body.sadm-is-reader .elementor-sticky__spacer *::after {
	content: none !important;
	visibility: hidden !important;
	display: none !important;
}

/* Only collapse a duplicate spacer when the real header is already in document flow. */
body.sadm-is-reader.sadm-header-in-flow .elementor-sticky__spacer {
	height: 0 !important;
	min-height: 0 !important;
	max-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.sadm-is-reader .entry-header,
body.sadm-is-reader .wp-block-post-title,
body.sadm-is-reader h1.page-title,
body.sadm-is-reader .entry-header.alignwide,
body.sadm-is-reader .entry-footer,
body.sadm-is-reader .posted-by,
body.sadm-is-reader .posted-on,
body.sadm-is-reader .post-thumbnail {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
}

body.sadm-is-reader #page,
body.sadm-is-reader .site,
body.sadm-is-reader #content,
body.sadm-is-reader .site-content,
body.sadm-is-reader #primary,
body.sadm-is-reader .content-area,
body.sadm-is-reader #main,
body.sadm-is-reader .site-main,
body.sadm-is-reader article,
body.sadm-is-reader .entry-content,
body.sadm-is-reader .wp-block-post-content,
body.sadm-is-reader .alignwide,
body.sadm-is-reader .alignfull,
body.sadm-is-reader .site-main > *,
body.sadm-is-reader .site-main > article > * {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

body.sadm-is-reader .sadm-documentation,
body.sadm-is-reader .sadm-documentation.alignfull,
body.sadm-is-reader .sadm-main,
body.sadm-is-reader .sadm-content,
body.sadm-is-reader .sadm-crumbbar {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	background: #ffffff !important;
}

body.sadm-is-reader .sadm-main,
body.sadm-is-reader .sadm-content,
body.sadm-is-reader .sadm-crumbbar {
	padding: 0 !important;
}

/* Overlay header with no working spacer: push the reader below it. */
body.sadm-is-reader.sadm-header-needs-offset #content,
body.sadm-is-reader.sadm-header-needs-offset .site-content,
body.sadm-is-reader.sadm-header-needs-offset #primary,
body.sadm-is-reader.sadm-header-needs-offset .content-area,
body.sadm-is-reader.sadm-header-needs-offset #main,
body.sadm-is-reader.sadm-header-needs-offset .site-main {
	padding-top: var(--sadm-site-header) !important;
}

body.sadm-is-reader .sadm-documentation,
body.sadm-is-reader .sadm-documentation.alignfull {
	padding-top: 0 !important;
	padding-right: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 0 !important;
}

.sadm-documentation .screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.sadm-documentation {
	display: block;
	width: 100%;
	min-height: var(--sadm-available-height);
	margin: 0;
	padding: 0;
	color: var(--sadm-text);
	font-size: 17px;
	line-height: 1.55;
	position: relative;
	background: var(--sadm-content-bg) !important;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

.sadm-documentation *,
.sadm-documentation *::before,
.sadm-documentation *::after {
	box-sizing: border-box;
}

.sadm-sidebar {
	background: var(--sadm-sidebar-bg);
	color: var(--sadm-sidebar-fg);
	width: var(--sadm-sidebar-width);
	overflow: hidden;
	z-index: 20;
}

.sadm-sidebar__scrollbox {
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior-y: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #8f8f8f var(--sadm-sidebar-bg);
}

.sadm-sidebar__scrollbox::-webkit-scrollbar {
	width: 8px;
	background: var(--sadm-sidebar-bg);
}

.sadm-sidebar__scrollbox::-webkit-scrollbar-thumb {
	background: #8f8f8f;
	border-radius: 4px;
	border: 2px solid var(--sadm-sidebar-bg);
}

.sadm-sidebar__inner {
	padding: 14px 14px 32px 16px;
}

.sadm-sidebar__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
}

.sadm-sidebar__brand {
	margin: 0;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.4;
	color: var(--sadm-sidebar-fg) !important;
}

.sadm-sidebar__toc-label {
	margin: 1rem 0 0.45rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sadm-sidebar-muted);
}

.sadm-sidebar__toc-label a {
	color: inherit;
	text-decoration: none;
}

.sadm-sidebar__toc-label a:hover,
.sadm-sidebar__toc-label a:focus {
	color: var(--sadm-sidebar-fg);
}

.sadm-sidebar__close {
	display: none;
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: var(--sadm-sidebar-fg);
}

.sadm-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sadm-nav__list .sadm-nav__list {
	padding-left: 0.85rem;
	margin-left: 0.15rem;
	border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.sadm-nav__item {
	margin: 0 0 0.12rem;
}

.sadm-nav__row {
	display: flex;
	align-items: flex-start;
	gap: 0.15rem;
}

.sadm-nav__toggle,
.sadm-nav__spacer {
	width: 1.15rem;
	flex: 0 0 1.15rem;
	height: 1.4rem;
}

.sadm-nav__toggle {
	border: 0;
	background: transparent !important;
	box-shadow: none !important;
	cursor: pointer;
	padding: 0;
	position: relative;
	appearance: none;
}

.sadm-nav__toggle::before {
	content: "";
	position: absolute;
	top: 0.42rem;
	left: 0.18rem;
	border: 5px solid transparent;
	border-top-color: var(--sadm-sidebar-muted);
	transform: rotate(-90deg);
	transform-origin: 5px 2px;
}

.sadm-nav__item.is-open > .sadm-nav__row .sadm-nav__toggle::before,
.sadm-nav__item:not(.is-collapsed) > .sadm-nav__row .sadm-nav__toggle::before {
	transform: rotate(0deg);
	top: 0.52rem;
}

.sadm-nav__item.is-collapsed > .sadm-nav__list {
	display: none;
}

.sadm-nav__link {
	display: block;
	padding: 0.18rem 0.35rem;
	border-radius: 0;
	color: #ffffff !important;
	text-decoration: none !important;
	font-size: 0.9rem;
	line-height: 1.4;
	opacity: 1 !important;
	visibility: visible !important;
}

body.sadm-is-reader .sadm-sidebar a.sadm-nav__link,
body.sadm-is-reader .entry-content .sadm-sidebar a.sadm-nav__link {
	color: #ffffff !important;
	text-decoration: none !important;
}

.sadm-nav__list .sadm-nav__list .sadm-nav__link {
	color: rgba(255, 255, 255, 0.92) !important;
	font-size: 0.86rem;
}

.sadm-nav__link:hover,
.sadm-nav__link:focus,
body.sadm-is-reader .sadm-sidebar a.sadm-nav__link:hover,
body.sadm-is-reader .sadm-sidebar a.sadm-nav__link:focus {
	color: var(--sadm-sidebar-active) !important;
	background: transparent;
	text-decoration: none !important;
}

.sadm-nav__item.is-active > .sadm-nav__row .sadm-nav__link,
body.sadm-is-reader .sadm-sidebar .sadm-nav__item.is-active > .sadm-nav__row .sadm-nav__link {
	background: transparent;
	color: var(--sadm-sidebar-active) !important;
	font-weight: 600;
}

.sadm-main {
	min-width: 0;
	width: 100%;
	position: relative;
	background: var(--sadm-content-bg);
}

.sadm-crumbbar {
	position: sticky;
	top: var(--sadm-sticky-top);
	z-index: 3;
	background: #fff;
	border-bottom: 1px solid #e0e0e0;
}

.sadm-crumbbar__inner {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	width: 100%;
	margin: 0;
	padding: 0 8px;
	min-height: 42px;
}

.sadm-crumbbar__toggle {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px;
	min-height: 40px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
	outline: none;
	color: #404040 !important;
	cursor: pointer;
	line-height: 1 !important;
	overflow: visible !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.sadm-crumbbar__toggle:hover,
.sadm-crumbbar__toggle:focus,
.sadm-crumbbar__toggle:focus-visible {
	color: #111 !important;
	background: transparent !important;
	background-color: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
	outline: 2px solid #c5c5c5;
	outline-offset: -2px;
}

.sadm-crumbbar__toggle-icon {
	display: block !important;
	width: 20px;
	height: 20px;
	fill: currentColor;
	flex: 0 0 auto;
	opacity: 1 !important;
	visibility: visible !important;
}

.sadm-crumbbar__home {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	color: #0078ff;
	line-height: 0;
	text-decoration: none;
	width: 28px;
	height: 28px;
}

.sadm-crumbbar__home:hover,
.sadm-crumbbar__home:focus {
	color: #005ec4;
}

.sadm-crumbbar__home-icon {
	display: block;
}

.sadm-crumbbar__sep {
	color: #6b7280;
	font-size: 0.95rem;
	line-height: 1;
}

.sadm-crumbbar__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.45rem;
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 0;
	font-size: 0.88rem;
	color: #404040;
}

.sadm-crumbbar__item {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.sadm-crumbbar__item:not(:last-child)::after {
	content: "»";
	margin-left: 0.45rem;
	color: #6b7280;
}

.sadm-crumbbar__item a {
	color: #404040;
	text-decoration: none;
}

.sadm-crumbbar__item a:hover,
.sadm-crumbbar__item a:focus {
	color: #0078ff;
	text-decoration: underline;
}

.sadm-crumbbar__item span {
	color: #111;
	font-weight: 600;
}

.sadm-search {
	position: relative;
	margin: 0 0 0.5rem;
}

.sadm-search__input {
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 3px;
	padding: 0.45rem 0.65rem;
	font: inherit;
	font-size: 0.88rem;
	background: #fff;
	color: #111;
}

.sadm-search__input::placeholder {
	color: #6b7280;
}

.sadm-search__panel {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	background: #fff;
	border: 1px solid var(--sadm-border);
	border-radius: 4px;
	padding: 0.75rem;
	z-index: 30;
	color: var(--sadm-text);
}

.sadm-search__status {
	margin: 0 0 0.5rem;
	color: var(--sadm-muted);
	font-size: 0.85rem;
}

.sadm-search__results {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 320px;
	overflow: auto;
}

.sadm-search__results li {
	margin: 0 0 0.65rem;
}

.sadm-search__results a {
	color: var(--sadm-accent);
	font-weight: 650;
	text-decoration: none;
}

.sadm-search__teaser {
	display: block;
	color: var(--sadm-muted);
	font-size: 0.85rem;
}

.sadm-content {
	width: 100%;
	min-width: 0;
	background: var(--sadm-content-bg);
}

.sadm-content-inner {
	width: min(100%, var(--sadm-content-max-width));
	margin: 0 auto;
	padding: 5.75rem 2.5rem 4rem !important;
}

.sadm-content-inner > .sadm-section:first-child {
	margin-top: 0;
	padding-top: 0.35rem;
}

.sadm-content-inner > .sadm-section:first-child > .sadm-section__title {
	margin-top: 0;
}

.sadm-content__empty {
	color: var(--sadm-muted);
}

.sadm-document-intro {
	margin: 0 0 1.75rem;
}

.sadm-section {
	margin: 0 0 2.25rem;
	scroll-margin-top: calc(var(--sadm-sticky-top) + var(--sadm-crumbbar-height) + 16px);
}

.sadm-section__title {
	margin: 0 0 0.75rem;
	line-height: 1.25;
	color: #111;
	scroll-margin-top: calc(var(--sadm-sticky-top) + var(--sadm-crumbbar-height) + 16px);
}

.sadm-section--level-1 > .sadm-section__title {
	font-size: 2rem;
}

.sadm-section--level-2 > .sadm-section__title {
	font-size: 1.5rem;
}

.sadm-section--level-3 > .sadm-section__title {
	font-size: 1.25rem;
}

.sadm-section--level-4 > .sadm-section__title,
.sadm-section--level-5 > .sadm-section__title,
.sadm-section--level-6 > .sadm-section__title {
	font-size: 1.1rem;
}

.sadm-section__anchor {
	color: inherit;
	text-decoration: none;
}

.sadm-section__anchor:hover {
	color: var(--sadm-accent);
}

.sadm-section__body > *:first-child {
	margin-top: 0;
}

.sadm-section__body pre,
.sadm-section__body .wp-block-code {
	overflow-x: auto;
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 4px;
	padding: 1rem 1.1rem;
	font-size: 0.92rem;
}

.sadm-section__body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.sadm-section__body .wp-block-table {
	overflow-x: auto;
}

.sadm-section__body th,
.sadm-section__body td {
	border: 1px solid var(--sadm-border);
	padding: 0.45rem 0.65rem;
	vertical-align: top;
}

.sadm-section__body th {
	background: #f4f4f4;
}

.sadm-callout {
	border-left: 4px solid var(--sadm-accent);
	background: var(--sadm-accent-soft);
	padding: 0.75rem 1rem;
	border-radius: 0 4px 4px 0;
	margin: 1rem 0;
}

.sadm-callout--warning {
	border-left-color: #d97706;
	background: #fffbeb;
}

.sadm-method,
.sadm-role {
	font-weight: 700;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.9em;
}

.sadm-method--get,
.sadm-role--blue {
	color: #2563eb;
}

.sadm-method--post,
.sadm-role--green {
	color: #16a34a;
}

.sadm-method--put,
.sadm-role--orange {
	color: #ea580c;
}

.sadm-method--delete,
.sadm-role--red {
	color: #dc2626;
}

.sadm-chapternav {
	color: #cccccc !important;
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	text-decoration: none !important;
	display: none;
}

body.sadm-is-reader .sadm-main a.sadm-chapternav {
	color: #cccccc !important;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	text-decoration: none !important;
}

.sadm-chapternav:hover,
.sadm-chapternav:focus,
body.sadm-is-reader .sadm-main a.sadm-chapternav:hover,
body.sadm-is-reader .sadm-main a.sadm-chapternav:focus {
	color: #6b7280 !important;
	background: transparent !important;
	text-decoration: none !important;
}

.sadm-chapternav__icon {
	display: block;
	width: 42px;
	height: 42px;
}

.sadm-chapternav--wide {
	position: absolute;
	top: 0;
	bottom: 0;
	margin: 0;
	max-width: 90px;
	min-width: 50px;
	display: none;
	justify-content: center;
	align-items: flex-start;
	z-index: 4;
}

.sadm-chapternav--wide .sadm-chapternav__icon {
	position: sticky;
	top: calc(var(--sadm-sticky-top) + var(--sadm-crumbbar-height) + 42vh);
}

.sadm-chapternav--wide.sadm-chapternav--prev {
	left: 0;
}

.sadm-chapternav--wide.sadm-chapternav--next {
	right: 0;
}

.sadm-mobile-nav {
	display: none;
	margin-top: 2.5rem;
	padding-top: 0.5rem;
	overflow: hidden;
}

.sadm-chapternav--mobile {
	display: none;
	width: 72px;
	border-radius: 4px;
	background-color: var(--sadm-sidebar-bg) !important;
	color: #ffffff !important;
	line-height: 1;
	padding: 10px 0;
	justify-content: center;
	align-items: center;
}

body.sadm-is-reader .sadm-main a.sadm-chapternav--mobile {
	color: #ffffff !important;
	background-color: var(--sadm-sidebar-bg) !important;
}

.sadm-mobile-nav .sadm-chapternav--prev {
	float: left;
}

.sadm-mobile-nav .sadm-chapternav--next {
	float: right;
}

.sadm-documentation__overlay {
	display: none;
}

.sadm-documentation.is-nav-lock,
html.sadm-nav-lock,
body.sadm-nav-lock {
	overflow: hidden;
}

@media only screen and (min-width: 901px) {
	.sadm-documentation {
		display: grid;
		grid-template-columns: var(--sadm-sidebar-width) minmax(0, 1fr);
		align-items: start;
		min-height: var(--sadm-available-height);
	}

	.sadm-sidebar {
		position: sticky;
		top: var(--sadm-sticky-top);
		align-self: start;
		width: var(--sadm-sidebar-width);
		height: var(--sadm-available-height);
		max-height: var(--sadm-available-height);
		transition: width 0.2s ease, transform 0.2s ease;
	}

	.sadm-main {
		min-height: var(--sadm-available-height);
	}

	.sadm-chapternav--wide {
		display: flex;
	}

	.sadm-mobile-nav {
		display: none !important;
	}

	.sadm-content-inner {
		padding-left: 4.5rem !important;
		padding-right: 4.5rem !important;
	}

	.sadm-documentation.is-sidebar-collapsed {
		grid-template-columns: 0 minmax(0, 1fr);
	}

	.sadm-documentation.is-sidebar-collapsed .sadm-sidebar {
		width: 0 !important;
		min-width: 0;
		overflow: hidden !important;
		transform: translateX(-100%);
		pointer-events: none;
		visibility: hidden;
	}
}

@media (max-width: 900px) {
	.sadm-documentation {
		display: block;
		border: 0;
	}

	.sadm-sidebar__close {
		display: inline-flex;
	}

	.sadm-sidebar {
		position: fixed;
		inset: 0 auto 0 0;
		width: min(86vw, 320px);
		height: 100%;
		max-height: none;
		top: 0;
		z-index: 100020;
		transform: translateX(-105%);
		transition: transform 0.2s ease;
		visibility: visible;
	}

	.sadm-documentation.is-nav-open .sadm-sidebar {
		transform: none;
	}

	.sadm-documentation__overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(15, 23, 42, 0.45);
		z-index: 100010;
	}

	.sadm-documentation__overlay[hidden] {
		display: none;
	}

	.sadm-content-inner {
		padding: 2rem 1rem 2.5rem !important;
	}

	.sadm-chapternav--wide {
		display: none !important;
	}

	.sadm-mobile-nav {
		display: block;
	}

	.sadm-chapternav--mobile {
		display: inline-flex;
	}

	.sadm-crumbbar__inner {
		padding: 0 6px;
	}

	.sadm-section {
		scroll-margin-top: calc(var(--sadm-sticky-top) + var(--sadm-crumbbar-height) + 16px);
	}

	.sadm-section__title {
		scroll-margin-top: calc(var(--sadm-sticky-top) + var(--sadm-crumbbar-height) + 16px);
	}
}
