/* ListoWP Docs SPA — front-end styling for the listo/docs block (/docs/).
 *
 * Scoped entirely under #docs-app. Brand palette is hardcoded (page #09090b,
 * surface #101013, accent green #60d093 …) to match the login / demo / AweDesk
 * forms; the theme's default is orange + Manrope, so we do not rely on
 * --wp--preset--* here. Sora is self-hosted (same woff2 files as login.css).
 * No build step — plain hand-written CSS.
 */

@font-face { font-family: "Sora"; font-style: normal; font-weight: 400; font-display: swap; src: url('https://listowp.com/wp-content/uploads/fonts/xMQOuFFYT72X5wkB_18qmnndmSdSnn-PIwNhBti0.woff2') format('woff2'); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 500; font-display: swap; src: url('https://listowp.com/wp-content/uploads/fonts/xMQOuFFYT72X5wkB_18qmnndmSdgnn-PIwNhBti0.woff2') format('woff2'); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 700; font-display: swap; src: url('https://listowp.com/wp-content/uploads/fonts/xMQOuFFYT72X5wkB_18qmnndmSe1mX-PIwNhBti0.woff2') format('woff2'); }

#docs-app {
	--bg: #09090b;
	--surface: #101013;
	--surface-2: #0f1210;
	--field: #26262c;
	--border: #26262b;
	--border-strong: rgba(255, 255, 255, 0.24);
	--text: #e4e4e7;
	--heading: #ffffff;
	--muted: #a2a9ab;
	--faint: #656c6e;
	--accent: #60d093;
	--accent-soft: rgba(96, 208, 147, 0.12);
	--glow: #224933;
	--btn: #54b684;
	--btn-hover: #4aa074;
	--error: #ff5755;
	--r-s: 4px;
	--r-m: 8px;
	--r-l: 12px;
	--r-x: 20px;
	--docs-top: 0px;
	--docs-topbar-h: 62px;
	--docs-gap: 10px;
	--mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	position: relative;
	color: var(--text);
	font-family: "Sora", system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

#docs-app *,
#docs-app *::before,
#docs-app *::after { box-sizing: border-box; }

/* ---- Skip link ---------------------------------------------------------- */
#docs-app .docs-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 60;
}
#docs-app .docs-skip:focus {
	left: 12px;
	top: 12px;
	background: var(--btn);
	color: #111;
	padding: 8px 14px;
	border-radius: var(--r-m);
	text-decoration: none;
	font-weight: 500;
}

/* ---- Top bar (search) --------------------------------------------------- */
/* Reads as a surface card, matching the site's login / contact / EDD panels:
   #101013 on a hairline border with rounded corners, floating clear of the
   sticky site header. */
#docs-app .docs-topbar {
	position: sticky;
	top: calc(var(--docs-top) + var(--docs-gap));
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: var(--docs-topbar-h);
	padding: 10px 14px;
	margin: 0 0 var(--docs-gap);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-l);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
#docs-app .docs-updated {
	color: var(--muted);
	font-size: 0.85rem;
	white-space: nowrap;
}
#docs-app .docs-search {
	position: relative;
	margin-left: auto;
	width: min(440px, 46vw);
}
#docs-app .docs-q {
	width: 100%;
	height: 42px;
	padding: 0 40px 0 15px;
	background: var(--field);
	border: 1px solid var(--border-strong);
	border-radius: var(--r-m);
	color: #fff;
	font: 400 15px "Sora", sans-serif;
	transition: border-color .15s, box-shadow .15s;
}
#docs-app .docs-q::placeholder { color: var(--faint); }
#docs-app .docs-q:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--glow);
}
#docs-app .docs-kbd {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-strong);
	border-radius: var(--r-s);
	color: var(--muted);
	background: var(--surface);
	font: 500 12px/1 var(--mono);
}
#docs-app .docs-search.is-active .docs-kbd,
#docs-app .docs-q:focus ~ .docs-kbd { opacity: 0; }

/* ---- Search results ----------------------------------------------------- */
#docs-app .docs-results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	max-height: min(64vh, 520px);
	overflow-y: auto;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-l);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
	z-index: 40;
	padding: 6px;
}
#docs-app .docs-res-group {
	color: var(--muted);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	padding: 10px 10px 4px;
}
#docs-app .docs-res {
	display: block;
	padding: 9px 10px;
	border-radius: var(--r-m);
	color: var(--text);
	text-decoration: none;
	cursor: pointer;
}
#docs-app .docs-res small {
	display: block;
	color: var(--muted);
	font-size: 0.8rem;
	margin-top: 1px;
}
#docs-app .docs-res:hover,
#docs-app .docs-res.is-active {
	background: var(--field);
}
#docs-app .docs-res.is-active { outline: 1px solid var(--accent); }
#docs-app .docs-res mark {
	background: var(--accent-soft);
	color: var(--accent);
	padding: 0 1px;
	border-radius: 2px;
}
#docs-app .docs-res-empty {
	padding: 16px 12px;
	color: var(--muted);
}

/* ---- Body grid ---------------------------------------------------------- */
#docs-app .docs-body {
	display: grid;
	grid-template-columns: 248px minmax(0, 1fr) 216px;
	gap: 8px 32px;
	align-items: start;
}
#docs-app .docs-sidebar,
#docs-app .docs-toc {
	position: sticky;
	top: calc(var(--docs-top) + var(--docs-topbar-h) + var(--docs-gap) * 2);
	align-self: start;
	max-height: calc(100vh - var(--docs-top) - var(--docs-topbar-h) - var(--docs-gap) * 2);
	overflow-y: auto;
	padding: 20px 4px 40px;
	overscroll-behavior: contain;
}

/* ---- Sidebar nav -------------------------------------------------------- */
/* Section / group headings. Base styles also apply to the TOC "On this page". */
#docs-app .docs-navhead {
	color: var(--heading);
	font-size: 0.95rem;
	font-weight: 700;
	margin: 0 0 6px;
}
/* In the nav, headings are accordion toggle buttons. */
#docs-app .docs-nav .docs-navhead,
#docs-app .docs-nav .docs-navsub {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	background: transparent;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	border-radius: var(--r-m);
}
#docs-app .docs-nav .docs-navhead {
	padding: 8px;
	margin: 4px 0 2px;
}
#docs-app .docs-nav-section:first-child .docs-navhead { margin-top: 0; }
#docs-app .docs-nav .docs-navhead:hover { background: var(--surface-2); }
#docs-app .docs-navsub {
	color: var(--muted);
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 5px 8px;
	margin: 4px 0 2px;
}
#docs-app .docs-nav .docs-navsub:hover { color: var(--text); }
#docs-app .docs-nav .docs-navhead:focus-visible,
#docs-app .docs-nav .docs-navsub:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}
/* Caret: points right when collapsed, down when expanded. */
#docs-app .docs-caret {
	flex: none;
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .15s ease;
	opacity: .65;
}
#docs-app [aria-expanded="true"] > .docs-caret { transform: rotate(45deg); }
#docs-app .docs-sec-body { padding-left: 4px; }
#docs-app .docs-group-body[hidden],
#docs-app .docs-sec-body[hidden] { display: none; }

#docs-app .docs-nav ul {
	list-style: none;
	margin: 0 0 4px;
	padding: 0;
}
#docs-app .docs-nav a {
	display: block;
	padding: 6px 10px 6px 26px;
	border-radius: var(--r-m);
	color: var(--muted);
	text-decoration: none;
	font-size: 0.92rem;
	transition: color .12s, background .12s;
}
#docs-app .docs-nav a:hover {
	color: var(--text);
	background: var(--surface-2);
}
#docs-app .docs-nav a[aria-current="page"] {
	color: var(--accent);
	background: var(--accent-soft);
	font-weight: 500;
}

/* ---- Content ------------------------------------------------------------ */
#docs-app .docs-main { min-width: 0; padding: 28px 8px 80px; }
#docs-app .docs-content { min-width: 0; }
#docs-app .docs-content :is(h1, h2, h3, h4) {
	scroll-margin-top: calc(var(--docs-top) + var(--docs-topbar-h) + var(--docs-gap) * 2 + 8px);
	color: var(--heading);
	line-height: 1.25;
	font-weight: 700;
}
#docs-app .docs-title,
#docs-app .docs-content h1 { font-size: 2rem; margin: 0 0 0.6em; }
/* Section headings from the Markdown. The doc title is also an h2 (the page
   template owns the page's h1), so it is excluded here and keeps .docs-title. */
#docs-app .docs-content h2:not(.docs-title) {
	font-size: 1.45rem;
	margin: 2em 0 0.6em;
	padding-top: 0.5em;
	border-top: 1px solid var(--border);
}
#docs-app .docs-content h3 { font-size: 1.15rem; margin: 1.6em 0 0.5em; }
#docs-app .docs-content h4 { font-size: 1rem; margin: 1.4em 0 0.4em; }
#docs-app .docs-content p,
#docs-app .docs-content ul,
#docs-app .docs-content ol { margin: 0 0 1.05em; }
#docs-app .docs-content ul,
#docs-app .docs-content ol { padding-left: 1.4em; }
#docs-app .docs-content li { margin: 0.3em 0; }
#docs-app .docs-content li::marker { color: var(--faint); }
#docs-app .docs-content a {
	color: var(--accent);
	text-decoration: none;
	border-bottom: 1px solid rgba(96, 208, 147, 0.35);
}
#docs-app .docs-content a:hover { border-bottom-color: var(--accent); }
#docs-app .docs-content strong { color: var(--heading); font-weight: 700; }
#docs-app .docs-content img { max-width: 100%; height: auto; border-radius: var(--r-m); }
#docs-app .docs-content hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

#docs-app .docs-content code {
	font-family: var(--mono);
	font-size: 0.86em;
	background: var(--field);
	color: #eaeaea;
	padding: 0.12em 0.4em;
	border-radius: var(--r-s);
}
#docs-app .docs-content pre {
	background: #0c0c0f;
	border: 1px solid var(--border);
	border-radius: var(--r-l);
	padding: 16px 18px;
	overflow-x: auto;
	margin: 0 0 1.2em;
}
#docs-app .docs-content pre code {
	background: none;
	padding: 0;
	font-size: 0.85rem;
	color: var(--text);
}
#docs-app .docs-content blockquote {
	margin: 0 0 1.2em;
	padding: 2px 16px;
	border-left: 3px solid var(--accent);
	background: var(--surface-2);
	color: var(--muted);
	border-radius: 0 var(--r-m) var(--r-m) 0;
}

/* Tables scroll inside their own container, never the page. */
#docs-app .docs-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.2em;
	font-size: 0.92rem;
	display: block;
	overflow-x: auto;
}
#docs-app .docs-content th,
#docs-app .docs-content td {
	padding: 8px 12px;
	border: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}
#docs-app .docs-content th { background: var(--surface); color: var(--heading); font-weight: 600; }

/* "review pending" badge on stale docs (added by JS). */
#docs-app .docs-stale {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	font-size: 0.7rem;
	font-weight: 500;
	color: var(--muted);
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	vertical-align: middle;
}

/* ---- On-this-page TOC --------------------------------------------------- */
#docs-app .docs-toc ul { list-style: none; margin: 0; padding: 0; }
#docs-app .docs-toc a {
	display: block;
	padding: 4px 8px;
	color: var(--muted);
	text-decoration: none;
	font-size: 0.85rem;
	border-left: 2px solid var(--border);
	transition: color .12s, border-color .12s;
}
#docs-app .docs-toc a:hover { color: var(--text); }
#docs-app .docs-toc a[aria-current="location"] {
	color: var(--accent);
	border-left-color: var(--accent);
}
#docs-app .docs-toc .docs-toc-l3 a { padding-left: 20px; }
#docs-app .docs-toc .docs-toc-l4 a { padding-left: 32px; }

/* ---- Menu button + scrim (mobile drawer) -------------------------------- */
#docs-app .docs-menu {
	display: none;
	width: 40px;
	height: 40px;
	flex: none;
	background: var(--field);
	border: 1px solid var(--border-strong);
	border-radius: var(--r-m);
	cursor: pointer;
	position: relative;
}
#docs-app .docs-menu-bars,
#docs-app .docs-menu-bars::before,
#docs-app .docs-menu-bars::after {
	position: absolute;
	left: 50%;
	width: 16px;
	height: 2px;
	background: var(--text);
	transform: translateX(-50%);
	content: "";
}
#docs-app .docs-menu-bars { top: 50%; transform: translate(-50%, -50%); }
#docs-app .docs-menu-bars::before { top: -5px; }
#docs-app .docs-menu-bars::after { top: 5px; }
/* Above the site header, which is position:relative;z-index:100 - otherwise its
   translucent pill paints over the drawer and the whole thing reads see-through. */
#docs-app .docs-scrim {
	position: fixed;
	inset: 0;
	background: rgba(9, 9, 11, 0.62);
	z-index: 999;
}

/* Drawer head: mobile only. Shown by the max-width:768px block below. */
#docs-app .docs-drawerhead { display: none; }

/* ---- Screen-reader-only status ----------------------------------------- */
#docs-app .docs-sr {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap;
}

#docs-app .docs-noscript,
.docs-noscript {
	color: #a2a9ab;
	margin-top: 16px;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
	#docs-app .docs-body { grid-template-columns: 240px minmax(0, 1fr); }
	#docs-app .docs-toc { display: none; }
}

@media (max-width: 768px) {
	#docs-app .docs-body { grid-template-columns: 1fr; }
	#docs-app .docs-menu { display: inline-block; }
	#docs-app .docs-updated { display: none; }
	#docs-app .docs-search { margin-left: 0; width: 100%; }
	/* Full-screen opaque overlay, matching the site's mobile navigation overlay
	   (solid --bg, 24px inset, logo + close, hairline divider). */
	#docs-app .docs-sidebar {
		position: fixed;
		inset: 0;
		width: 100%;
		/* The base rule's align-self:start still applies to this out-of-flow child
		   of the .docs-body grid and would leave inset:0 content-height. */
		align-self: stretch;
		max-height: none;
		z-index: 1000;
		background: var(--bg);
		border-right: 0;
		padding: 24px 24px 48px;
		display: none;
	}
	/* Same entrance as the site's navigation overlay, which uses core's
	   overlay-menu__fade-in-animation. Like core, there is no exit animation. */
	#docs-app.docs-nav-open .docs-sidebar {
		display: block;
		animation: docs-overlay-fade-in .1s ease-out forwards;
	}
	#docs-app:not(.docs-nav-open) .docs-scrim { display: none; }

	#docs-app .docs-drawerhead {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding-bottom: 20px;
		margin-bottom: 20px;
		border-bottom: 1px solid var(--border-strong);
	}
	#docs-app .docs-drawerhead .custom-logo-link { display: block; line-height: 0; }
	#docs-app .docs-drawerhead .custom-logo { width: 50px; height: auto; max-width: none; }
	#docs-app .docs-drawerhead-home {
		color: var(--heading);
		font-weight: 700;
		text-decoration: none;
	}
	/* 44px tap target (the glyph is only 24px). Negative margin keeps the extra
	   hit area from pushing the head's height or the logo's alignment around. */
	#docs-app .docs-drawerclose {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		width: 44px;
		height: 44px;
		margin: -10px -10px -10px 0;
		padding: 0;
		background: transparent;
		border: 0;
		border-radius: var(--r-m);
		color: var(--accent);
		cursor: pointer;
	}
	#docs-app .docs-drawerclose:hover { background: var(--surface-2); }
	#docs-app .docs-drawerclose svg { display: block; fill: currentColor; width: 24px; height: 24px; }
	#docs-app .docs-drawerclose:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

	#docs-app .docs-main { padding: 20px 2px 64px; }
}

@keyframes docs-overlay-fade-in {
	from { opacity: 0; transform: translateY(0.5em); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	#docs-app .docs-sidebar { animation: none; }
	#docs-app .docs-q { transition: none; }
}

body.docs-nav-lock { overflow: hidden; }
