/*
 * The Big Head — free-theme demo bar. In the page flow at the very top (never
 * fixed or sticky), 44px tall on phones, 48px on larger screens.
 *
 * Every rule is scoped to .tbh-demo and starts from `all: unset`, so the
 * theme underneath (seven very different ones) cannot restyle it, and it
 * cannot restyle them.
 */
html body .tbh-demo,
html body .tbh-demo * {
	all: unset;
	box-sizing: border-box;
}
html body .tbh-demo {
	--tbh-bg: #111014;
	--tbh-fg: #ffffff;
	--tbh-dim: rgba(255, 255, 255, .62);
	--tbh-line: rgba(255, 255, 255, .16);
	--tbh-hi: #ffd23f;
	--tbh-h: 44px;
	position: relative;
	z-index: 2147483000;
	display: flex;
	align-items: stretch;
	gap: 6px;
	width: 100%;
	min-height: var(--tbh-h);
	margin: 0;
	padding: 0 10px 0 6px;
	background: var(--tbh-bg);
	color: var(--tbh-fg);
	font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	letter-spacing: 0;
	text-transform: none;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	border-bottom: 1px solid #000;
}

/* ---- Theme name + pages ---------------------------------------------- */
html body .tbh-demo .tbh-demo-pages { position: relative; display: flex; min-width: 0; flex: 0 1 auto; }
html body .tbh-demo summary {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	height: var(--tbh-h);
	padding: 0 10px;
	border-radius: 8px;
	cursor: pointer;
	list-style: none;
}
html body .tbh-demo summary::-webkit-details-marker { display: none; }
html body .tbh-demo summary:hover { background: rgba(255, 255, 255, .08); }
html body .tbh-demo summary:focus-visible,
html body .tbh-demo a:focus-visible,
html body .tbh-demo button:focus-visible,
html body .tbh-demo select:focus-visible { outline: 2px solid var(--tbh-hi); outline-offset: -2px; }
html body .tbh-demo .tbh-demo-dot {
	display: block;
	flex: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--tbh-sw-a, #888) 0 50%, var(--tbh-sw-b, #ccc) 50% 100%);
	box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5);
}
html body .tbh-demo .tbh-demo-name { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; font-size: 14px; }
html body .tbh-demo .tbh-demo-caret {
	display: block;
	flex: none;
	width: 7px;
	height: 7px;
	margin-top: -3px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	opacity: .7;
}
html body .tbh-demo details[open] .tbh-demo-caret { transform: rotate(225deg); margin-top: 3px; }
html body .tbh-demo .tbh-demo-menu {
	position: absolute;
	top: calc(100% + 1px);
	left: 0;
	display: flex;
	flex-direction: column;
	min-width: 230px;
	max-width: calc(100vw - 12px);
	padding: 6px;
	background: var(--tbh-bg);
	border: 1px solid var(--tbh-line);
	border-radius: 0 0 10px 10px;
	box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6);
}
html body .tbh-demo .tbh-demo-menu-note { display: block; padding: 8px 10px 6px; color: var(--tbh-dim); font-size: 12px; font-weight: 500; }
html body .tbh-demo .tbh-demo-menu a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 6px;
	color: var(--tbh-fg);
	cursor: pointer;
}
html body .tbh-demo .tbh-demo-menu a:hover { background: rgba(255, 255, 255, .08); }
html body .tbh-demo .tbh-demo-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--tbh-hi); background: rgba(255, 255, 255, .06); }
html body .tbh-demo .tbh-demo-menu .tbh-demo-about { margin-top: 4px; border-top: 1px solid var(--tbh-line); border-radius: 0 0 6px 6px; color: var(--tbh-hi); }

/* ---- Style presets ----------------------------------------------------- */
html body .tbh-demo .tbh-demo-style { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
html body .tbh-demo .tbh-demo-select { position: relative; display: flex; align-items: center; min-width: 0; height: 36px; }
html body .tbh-demo .tbh-demo-select .tbh-demo-sw { display: none; }
html body .tbh-demo select {
	display: block;
	min-width: 0;
	max-width: 46vw;
	height: 36px;
	padding: 0 28px 0 12px;
	border: 1px solid var(--tbh-line);
	border-radius: 999px;
	background:
		linear-gradient(45deg, transparent 50%, currentColor 50%) right 15px top 50% / 5px 5px no-repeat,
		linear-gradient(135deg, currentColor 50%, transparent 50%) right 10px top 50% / 5px 5px no-repeat,
		rgba(255, 255, 255, .06);
	color: var(--tbh-fg);
	font: 600 13px/34px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	white-space: nowrap;
	text-overflow: ellipsis;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
html body .tbh-demo select option { color: #111; background: #fff; }
html body .tbh-demo .tbh-demo-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html body .tbh-demo .tbh-demo-chips { display: none; align-items: center; gap: 4px; min-width: 0; }
html body .tbh-demo .tbh-demo-chips-label { display: block; margin-right: 6px; color: var(--tbh-dim); font-size: 12px; font-weight: 500; }
html body .tbh-demo .tbh-demo-chips button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 34px;
	padding: 0 12px 0 8px;
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--tbh-dim);
	white-space: nowrap;
	cursor: pointer;
}
html body .tbh-demo .tbh-demo-chips button:hover { color: var(--tbh-fg); background: rgba(255, 255, 255, .08); }
html body .tbh-demo .tbh-demo-chips button[aria-pressed="true"] { color: var(--tbh-fg); border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .1); }
html body .tbh-demo .tbh-demo-chip-sw { display: block; flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .45); }

/* ---- Get it ------------------------------------------------------------ */
html body .tbh-demo .tbh-demo-get {
	display: flex;
	align-items: center;
	flex: none;
	align-self: center;
	height: 36px;
	padding: 0 14px;
	border-radius: 999px;
	background: var(--tbh-hi);
	color: #16130f;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}
html body .tbh-demo .tbh-demo-get:hover { background: #fff; }
html body .tbh-demo .tbh-demo-get-short { display: none; }

@media (max-width: 420px) {
	html body .tbh-demo .tbh-demo-get-long { display: none; }
	html body .tbh-demo .tbh-demo-get-short { display: block; }
	html body .tbh-demo .tbh-demo-get { padding: 0 12px; }
	html body .tbh-demo select { max-width: 38vw; padding-left: 10px; }
}
@media (min-width: 900px) {
	html body .tbh-demo { --tbh-h: 48px; padding: 0 14px 0 8px; gap: 10px; }
	html body .tbh-demo .tbh-demo-select { display: none; }
	html body .tbh-demo .tbh-demo-chips { display: flex; }
}
@media print {
	html body .tbh-demo { display: none; }
}
