.framepress-demo-style[hidden] {
	display: none;
}

.framepress-demo-style > details > summary {
	display: flex;
	align-items: center;
	gap: .45em;
	padding: .375rem 0;
	list-style: none;
	color: var(--mk-site-header-link, var(--mk-header-text, inherit));
	font-family: var(--mk-header-menu-font-family, inherit);
	font-size: var(--mk-header-menu-font-size, .95rem);
	font-weight: var(--mk-header-menu-font-weight, 600);
	line-height: 1.2;
	cursor: pointer;
}

.framepress-demo-style > details > summary::-webkit-details-marker {
	display: none;
}

.framepress-demo-style > details > summary::after {
	content: '';
	width: .36em;
	height: .36em;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: translateY(-.12em) rotate(45deg);
}

.framepress-demo-style > details[open] > summary::after {
	transform: translateY(.12em) rotate(225deg);
}

.framepress-demo-style > details > summary:hover,
.framepress-demo-style > details[open] > summary {
	color: var(--mk-site-header-link-hover, var(--mk-color-accent));
}

.framepress-demo-style__choices {
	position: absolute;
	z-index: 110;
	inset-block-start: 100%;
	inset-inline-end: 0;
	min-inline-size: 8rem;
	inline-size: max-content;
	max-inline-size: min(18rem, calc(100vw - 2rem));
	max-block-size: min(60vh, 28rem);
	overflow-y: auto;
	padding: .25rem;
	border: 1px solid var(--mk-site-border-strong, var(--mk-color-border));
	border-radius: var(--mk-radius, 8px);
	background: var(--mk-site-surface, var(--mk-color-surface));
	box-shadow: 0 8px 24px var(--mk-site-shadow, #0003);
}

.framepress-demo-style__choices > button {
	display: block;
	inline-size: 100%;
	min-block-size: 44px;
	padding: .45rem .65rem;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--mk-site-fg, var(--mk-color-text));
	font: inherit;
	text-align: start;
	overflow-wrap: anywhere;
	cursor: pointer;
}

.framepress-demo-style__choices > button:hover,
.framepress-demo-style__choices > button[aria-pressed="true"] {
	background: var(--mk-site-surface-alt, var(--mk-color-bg-alt));
}

.framepress-demo-style__choices > button[aria-pressed="true"]::after {
	content: '';
	display: inline-block;
	inline-size: .65em;
	block-size: .38em;
	margin-inline-start: .55em;
	border: solid var(--mk-site-accent, currentColor);
	border-width: 0 0 2px 2px;
	transform: translateY(-.16em) rotate(-45deg);
}

.framepress-demo-style :is(summary, button):focus-visible {
	outline: 2px solid var(--mk-site-accent, currentColor);
	outline-offset: -2px;
}

@media (max-width: 768px) {
	.mk-primary-nav.is-open:has(.framepress-demo-style) {
		max-block-size: 60vh;
		max-block-size: min(60dvh, calc(100dvh - 8rem));
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.framepress-demo-style > details > summary {
		min-block-size: 44px;
		border-bottom: 1px solid var(--mk-color-border-light);
	}

	.framepress-demo-style__choices {
		position: static;
		inline-size: auto;
		max-inline-size: none;
		max-block-size: none;
		overflow: visible;
		margin-block: .4rem;
		box-shadow: none;
	}
}

:root[data-framepress-demo-style-preview] body .mk-movie-template {
	--mk-movie-color-bg-surface: var(--mk-site-surface-alt);
	--mk-movie-color-bg-hover: var(--mk-site-surface-strong);
	--mk-movie-color-fg-strong: var(--mk-site-fg-strong);
	--mk-movie-color-fg-on-accent: var(--mk-site-fg-on-accent);
	--mk-movie-color-accent-hover: var(--mk-site-accent-hover);
	--mk-movie-color-border-strong: var(--mk-site-border-strong);
	--mk-movie-action-fg: var(--mk-site-fg-on-accent);
	--mk-movie-action-hover-bg: var(--mk-site-accent-hover);
	--mk-movie-link-hover-color: var(--mk-site-content-link-hover);
}

:root[data-framepress-demo-style-preview] .ytsg-shell :is(.ytsg-search, .ytsg-sort, .ytsg-panel-optsearch, .ytsg-panel-select, .ytsg-panel-section, .ytsg-page) {
	background: var(--mk-site-surface);
	border-color: var(--mk-site-border-strong);
	color: var(--mk-site-fg);
}

:root[data-framepress-demo-style-preview] .ytsg-shell :is(.ytsg-loadmore, .ytsg-genrechip.is-active, .ytsg-page.is-current) {
	background: var(--mk-site-accent);
	border-color: var(--mk-site-accent);
	color: var(--mk-site-fg-on-accent) !important;
}

:root[data-framepress-demo-style-preview] .ytsg-shell .ytsg-loadmore:hover {
	background: var(--mk-site-accent-hover);
}
