/**
 * VXR Prompt Generator — front-end.
 *
 * Deliberately quiet: fonts, colours and link colour are inherited from the
 * active theme. Everything paintable is a CSS variable you can override in
 * Appearance or in the plugin's Custom CSS box.
 */

.vxr-pg {
	--vxr-pg-cols: 2;
	--vxr-pg-accent: currentColor;
	--vxr-pg-ink: currentColor;
	--vxr-pg-line: color-mix( in srgb, currentColor 18%, transparent );
	--vxr-pg-line-strong: color-mix( in srgb, currentColor 34%, transparent );
	--vxr-pg-well: color-mix( in srgb, currentColor 4%, transparent );
	--vxr-pg-well-2: color-mix( in srgb, currentColor 7%, transparent );
	--vxr-pg-muted: color-mix( in srgb, currentColor 62%, transparent );
	--vxr-pg-radius: 10px;
	--vxr-pg-gap: 1.25rem;
	--vxr-pg-mono: ui-monospace, SFMono-Regular, "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;

	font-family: inherit;
	color: inherit;
	line-height: 1.5;
}

/*
 * The wrapper picks up .is-dark or .is-light from the nearest opaque
 * ancestor background, so native controls — range tracks, select popups,
 * scrollbars — follow the theme instead of the OS.
 */

.vxr-pg.is-dark {
	color-scheme: dark;
	--vxr-pg-on-accent: #101014;
}

.vxr-pg.is-light {
	color-scheme: light;
	--vxr-pg-on-accent: #ffffff;
}

/* Fallback for browsers without color-mix(). */
@supports not ( color: color-mix( in srgb, red 50%, blue ) ) {
	.vxr-pg {
		--vxr-pg-line: rgba( 128, 128, 128, 0.32 );
		--vxr-pg-line-strong: rgba( 128, 128, 128, 0.5 );
		--vxr-pg-well: rgba( 128, 128, 128, 0.06 );
		--vxr-pg-well-2: rgba( 128, 128, 128, 0.11 );
		--vxr-pg-muted: rgba( 128, 128, 128, 0.95 );
	}
}

.vxr-pg *,
.vxr-pg *::before,
.vxr-pg *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- head */

.vxr-pg__head {
	margin-bottom: var( --vxr-pg-gap );
}

.vxr-pg__title {
	margin: 0 0 0.35em;
	font-size: inherit;
	font-size: clamp( 1.35rem, 1rem + 1.4vw, 2rem );
	line-height: 1.15;
}

.vxr-pg__intro {
	margin: 0;
	color: var( --vxr-pg-muted );
	max-width: 60ch;
}

/* --------------------------------------------------------------- panel */

.vxr-pg__panel {
	border: 1px solid var( --vxr-pg-line );
	border-radius: var( --vxr-pg-radius );
	padding: 1rem 1.1rem 1.15rem;
	margin-bottom: var( --vxr-pg-gap );
	background: var( --vxr-pg-well );
}

.vxr-pg__panel-title {
	margin: 0 0 0.75rem;
	font-size: 0.78rem;
	font-family: var( --vxr-pg-mono );
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var( --vxr-pg-muted );
	font-weight: 600;
}

.vxr-pg__hint {
	margin: 0.45rem 0 0;
	font-size: 0.82rem;
	color: var( --vxr-pg-muted );
	line-height: 1.45;
}

/* ----------------------------------------------------------- reference */

.vxr-pg__dropzone {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	border: 1px dashed var( --vxr-pg-line-strong );
	border-radius: var( --vxr-pg-radius );
	padding: 0.85rem 1rem;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.vxr-pg__dropzone.is-over {
	border-color: var( --vxr-pg-accent );
	background: var( --vxr-pg-well-2 );
}

.vxr-pg__fileinput {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
}

.vxr-pg__filelabel {
	display: inline-flex;
	margin: 0;
}

.vxr-pg__filebtn {
	display: inline-block;
	cursor: pointer;
	border: 1px solid var( --vxr-pg-line-strong );
	border-radius: 6px;
	padding: 0.4rem 0.8rem;
	font-size: 0.88rem;
}

.vxr-pg__fileinput:focus-visible + .vxr-pg__filebtn {
	outline: 2px solid var( --vxr-pg-accent );
	outline-offset: 2px;
}

.vxr-pg__dropnote {
	font-size: 0.85rem;
	color: var( --vxr-pg-muted );
}

.vxr-pg__files {
	list-style: none;
	margin: 0.7rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.vxr-pg__file {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	border: 1px solid var( --vxr-pg-line );
	border-radius: 999px;
	padding: 0.2rem 0.35rem 0.2rem 0.7rem;
	font-family: var( --vxr-pg-mono );
	font-size: 0.78rem;
}

.vxr-pg__remove {
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 0 0.3rem;
	opacity: 0.6;
}

.vxr-pg__remove:hover {
	opacity: 1;
}

/* ------------------------------------------------------------- library */

.vxr-pg__row {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 200px, 1fr ) );
	gap: 0.9rem;
}

.vxr-pg__panelhead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 0.85rem;
}

.vxr-pg__panelhead .vxr-pg__panel-title {
	margin: 0;
}

.vxr-pg__presetswitch {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 0.8rem;
	font-weight: 600;
}

.vxr-pg__presetswitchtext {
	letter-spacing: 0.01em;
}

/* Preset pickers are inert until preset mode is on. */
.vxr-pg__row.is-off {
	opacity: 0.42;
}

.vxr-pg__row.is-off .vxr-pg__select {
	cursor: not-allowed;
}

/* A locked slot cannot be switched back on by hand. */
.vxr-pg__group.is-locked {
	opacity: 0.32;
}

.vxr-pg__group.is-locked .vxr-pg__legend,
.vxr-pg__group.is-locked .vxr-pg__switch {
	cursor: not-allowed;
}

.vxr-pg__group.is-locked .vxr-pg__switch input {
	pointer-events: none;
}

.vxr-pg.is-preset-mode .vxr-pg__grid {
	position: relative;
}

.vxr-pg__recipe {
	margin-top: 0.9rem;
	padding: 0.85rem 1rem;
	border-radius: var( --vxr-pg-radius );
	background: var( --vxr-pg-well-2 );
}

.vxr-pg__recipe-title {
	margin: 0;
	font-weight: 600;
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}

.vxr-pg__recipe-num {
	font-family: var( --vxr-pg-mono );
	font-size: 0.75rem;
	color: var( --vxr-pg-muted );
}

.vxr-pg__recipe-sub {
	margin: 0.15rem 0 0.5rem;
	font-size: 0.85rem;
	color: var( --vxr-pg-muted );
}

.vxr-pg__recipe-body {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
}

/* --------------------------------------------------------------- grid */

.vxr-pg__grid {
	display: grid;
	grid-template-columns: repeat( var( --vxr-pg-cols ), minmax( 0, 1fr ) );
	gap: var( --vxr-pg-gap );
	margin-bottom: var( --vxr-pg-gap );
}

.vxr-pg__group {
	border: 1px solid var( --vxr-pg-line );
	border-radius: var( --vxr-pg-radius );
	padding: 0.5rem 1.1rem 1.15rem;
	margin: 0;
	min-width: 0;
	transition: opacity 0.15s ease;
}

.vxr-pg__group.is-off {
	opacity: 0.42;
}

.vxr-pg__group.is-off .vxr-pg__field {
	pointer-events: none;
}

.vxr-pg__legend {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0 0.4rem;
	margin-left: -0.4rem;
	font-weight: 600;
}

.vxr-pg__letter {
	display: inline-grid;
	place-items: center;
	width: 1.6em;
	height: 1.6em;
	border-radius: 5px;
	border: 1px solid var( --vxr-pg-line-strong );
	font-family: var( --vxr-pg-mono );
	font-size: 0.72rem;
	color: var( --vxr-pg-accent );
}

.vxr-pg__grouplabel {
	font-size: 0.95rem;
}

/* Slot on/off switch. */
.vxr-pg__switch {
	position: relative;
	display: inline-block;
	width: 30px;
	height: 17px;
	flex: none;
	cursor: pointer;
	margin-left: 0.15rem;
}

.vxr-pg__switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.vxr-pg__switch span {
	position: absolute;
	inset: 0;
	border: 1px solid var( --vxr-pg-line-strong );
	border-radius: 999px;
	transition: background-color 0.15s ease;
	pointer-events: none;
}

.vxr-pg__switch span::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.55;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.vxr-pg__switch input:checked + span {
	background: var( --vxr-pg-well-2 );
}

.vxr-pg__switch input:checked + span::after {
	transform: translateX( 13px );
	opacity: 1;
}

.vxr-pg__switch input:focus-visible + span {
	outline: 2px solid var( --vxr-pg-accent );
	outline-offset: 2px;
}

/* -------------------------------------------------------------- fields */

.vxr-pg__field {
	margin-top: 0.95rem;
	min-width: 0;
}

.vxr-pg__field:first-of-type {
	margin-top: 0.6rem;
}

.vxr-pg__fieldhead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.3rem;
}

.vxr-pg__label {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.vxr-pg__value {
	font-family: var( --vxr-pg-mono );
	font-size: 0.75rem;
	color: var( --vxr-pg-accent );
	text-align: right;
}

.vxr-pg__select,
.vxr-pg__input,
.vxr-pg__textarea {
	width: 100%;
	max-width: 100%;
	font: inherit;
	font-size: 0.9rem;
	color: inherit;
	background-color: transparent;
	border: 1px solid var( --vxr-pg-line-strong );
	border-radius: 7px;
	padding: 0.5rem 0.65rem;
}

.vxr-pg__select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 2rem;
	background-image: linear-gradient( 45deg, transparent 50%, currentColor 50% ),
		linear-gradient( 135deg, currentColor 50%, transparent 50% );
	background-position: calc( 100% - 15px ) calc( 50% + 1px ), calc( 100% - 10px ) calc( 50% + 1px );
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

/*
 * Native dropdown menus are drawn by the browser, not by this stylesheet, so
 * they need colour-scheme on the control itself plus explicit option colours.
 * Without both, a dark theme gets a white popup with unreadable entries.
 */
.vxr-pg.is-dark .vxr-pg__select,
.vxr-pg.is-dark select {
	color-scheme: dark;
}

.vxr-pg.is-light .vxr-pg__select,
.vxr-pg.is-light select {
	color-scheme: light;
}

.vxr-pg.is-dark .vxr-pg__select option,
.vxr-pg.is-dark select option {
	background-color: var( --vxr-pg-surface, #16181d );
	color: #f3f3f4;
}

.vxr-pg.is-light .vxr-pg__select option,
.vxr-pg.is-light select option {
	background-color: #ffffff;
	color: #1d2327;
}

/* Before the theme class lands, follow the operating system. */
@media ( prefers-color-scheme: dark ) {
	.vxr-pg:not( .is-light ) .vxr-pg__select option {
		background-color: #16181d;
		color: #f3f3f4;
	}
}

.vxr-pg__custom {
	margin-top: 0.4rem;
}

.vxr-pg__textarea {
	resize: vertical;
	line-height: 1.5;
}

.vxr-pg__select:focus-visible,
.vxr-pg__input:focus-visible,
.vxr-pg__textarea:focus-visible,
.vxr-pg__result:focus-visible {
	outline: 2px solid var( --vxr-pg-accent );
	outline-offset: 1px;
	border-color: transparent;
}

/* checkbox groups */

.vxr-pg__checks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.75rem;
}

.vxr-pg__check {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	cursor: pointer;
}

.vxr-pg__check input {
	margin: 0;
	accent-color: var( --vxr-pg-accent );
}

.vxr-pg__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.88rem;
	cursor: pointer;
}

/* option dropdowns — the tile picker opens underneath the button */

.vxr-pg__combo {
	position: relative;
}

/* An open picker sits above its neighbours. */
.vxr-pg__combo.is-open {
	z-index: 40;
}

.vxr-pg__group:has( .vxr-pg__combo.is-open ) {
	z-index: 40;
	position: relative;
}

.vxr-pg__combobtn {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	width: 100%;
	font: inherit;
	font-size: 0.9rem;
	text-align: left;
	color: inherit;
	cursor: pointer;
	background: transparent;
	border: 1px solid var( --vxr-pg-line-strong );
	border-radius: 7px;
	padding: 0.42rem 0.6rem;
	transition: border-color 0.15s ease;
}

.vxr-pg__combobtn:hover {
	border-color: var( --vxr-pg-accent );
}

.vxr-pg__combo.is-open .vxr-pg__combobtn {
	border-color: var( --vxr-pg-accent );
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.vxr-pg__combobtn:focus-visible {
	outline: 2px solid var( --vxr-pg-accent );
	outline-offset: 1px;
}

.vxr-pg__comboicon {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	flex: none;
	overflow: hidden;
	border-radius: 4px;
	color: var( --vxr-pg-accent );
}

.vxr-pg__comboicon .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
}

.vxr-pg__comboicon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vxr-pg__combotext {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vxr-pg__combo.is-empty .vxr-pg__combotext {
	opacity: 0.55;
}

.vxr-pg__comboarrow {
	flex: none;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: 0.6;
	transition: transform 0.15s ease;
}

.vxr-pg__combo.is-open .vxr-pg__comboarrow {
	transform: rotate( 180deg );
}

/*
 * The panel floats above the form instead of pushing it: nothing below it
 * moves when a picker opens. Canvas is the fallback when JS has not sampled
 * the page background yet — it follows colour-scheme on its own.
 */
.vxr-pg__combopanel {
	position: absolute;
	z-index: 40;
	top: 100%;
	left: 0;
	width: max( 100%, var( --vxr-pg-panel, 560px ) );
	max-width: min( 92vw, 780px );
	border: 1px solid var( --vxr-pg-accent );
	border-top: 0;
	border-radius: 0 0 9px 9px;
	padding: 0.6rem;
	background: var( --vxr-pg-surface, Canvas );
	box-shadow: 0 18px 44px rgba( 0, 0, 0, 0.34 );
	max-height: min( 62vh, 560px );
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* Not enough room below — open upward instead. */
.vxr-pg__combo.is-up .vxr-pg__combopanel {
	top: auto;
	bottom: 100%;
	border-top: 1px solid var( --vxr-pg-accent );
	border-bottom: 0;
	border-radius: 9px 9px 0 0;
	box-shadow: 0 -18px 44px rgba( 0, 0, 0, 0.34 );
}

.vxr-pg__combo.is-up.is-open .vxr-pg__combobtn {
	border-radius: 0 0 7px 7px;
	border-top-color: var( --vxr-pg-accent );
}

/* Would spill off the right edge — hang it from the right instead. */
.vxr-pg__combo.is-flip .vxr-pg__combopanel {
	left: auto;
	right: 0;
}

.vxr-pg__combopanel[hidden] {
	display: none;
}

.vxr-pg__combo.is-static .vxr-pg__combopanel {
	position: static;
	width: 100%;
	max-width: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	background: transparent;
	box-shadow: none;
	max-height: none;
	overflow: visible;
}

.vxr-pg__tilesearch {
	margin-bottom: 0.5rem;
	font-size: 0.82rem;
	padding: 0.35rem 0.5rem;
}

/* option tiles */

.vxr-pg__tiles {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( var( --vxr-pg-tile ), 1fr ) );
	gap: 0.55rem;
}

.vxr-pg {
	--vxr-pg-tile: 252px;
}

/*
 * A tile is a 16:9 card. The icon or image fills it edge to edge and the
 * caption sits on top of that artwork, over a scrim that keeps it readable
 * whatever the picture underneath is doing.
 */
.vxr-pg__tile {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	cursor: pointer;
	padding: 0;
	overflow: hidden;
	border: 1px solid var( --vxr-pg-line );
	border-radius: 9px;
	background: var( --vxr-pg-well );
	transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
	min-width: 0;
}

.vxr-pg__tile:hover {
	border-color: var( --vxr-pg-line-strong );
	transform: translateY( -1px );
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.18 );
}

.vxr-pg__tile input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.vxr-pg__tileicon {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	overflow: hidden;
	opacity: 0.85;
}

.vxr-pg__tileicon .dashicons {
	width: 64px;
	height: 64px;
	font-size: 64px;
	line-height: 1;
	/* lift the glyph clear of the caption strip */
	transform: translateY( -8px );
}

.vxr-pg__tileicon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vxr-pg__tileletter {
	font-family: var( --vxr-pg-mono );
	font-size: 46px;
	font-weight: 700;
	line-height: 1;
	transform: translateY( -8px );
}

.vxr-pg__tilelabel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 1.6rem 0.6rem 0.5rem;
	font-size: 0.82rem;
	line-height: 1.25;
	font-weight: 600;
	text-align: left;
	color: #fff;
	text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.65 );
	overflow-wrap: anywhere;
	background: linear-gradient(
		to top,
		rgba( 0, 0, 0, 0.82 ) 0%,
		rgba( 0, 0, 0, 0.58 ) 45%,
		rgba( 0, 0, 0, 0 ) 100%
	);
}

/* selected state */

.vxr-pg__tile:has( input:checked ),
.vxr-pg__tile.is-picked {
	border-color: var( --vxr-pg-accent );
	box-shadow: inset 0 0 0 2px var( --vxr-pg-accent );
}

.vxr-pg__tile:has( input:checked ) .vxr-pg__tileicon,
.vxr-pg__tile.is-picked .vxr-pg__tileicon {
	opacity: 1;
	color: var( --vxr-pg-accent );
}

.vxr-pg__tile:has( input:focus-visible ) {
	outline: 2px solid var( --vxr-pg-accent );
	outline-offset: 2px;
}

/* multi-select tiles get a corner box so they read as toggles, not choices */

.vxr-pg__tiles--multi .vxr-pg__tile::after {
	content: "";
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 18px;
	height: 18px;
	border: 2px solid rgba( 255, 255, 255, 0.75 );
	border-radius: 4px;
	background: rgba( 0, 0, 0, 0.35 );
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.5 );
}

.vxr-pg__tiles--multi .vxr-pg__tile:has( input:checked )::after,
.vxr-pg__tiles--multi .vxr-pg__tile.is-picked::after {
	background: var( --vxr-pg-accent );
	border-color: var( --vxr-pg-accent );
}

/* denser tiles inside narrow slots */

@media ( max-width: 700px ) {
	.vxr-pg {
		--vxr-pg-tile: 200px;
	}

	.vxr-pg__tileicon .dashicons {
		width: 52px;
		height: 52px;
		font-size: 52px;
	}

	.vxr-pg__tilelabel {
		font-size: 0.76rem;
	}
}

/* sliders */

.vxr-pg__range {
	--vxr-pg-fill: 50%;
	width: 100%;
	height: 22px;
	margin: 0;
	background: transparent;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	accent-color: var( --vxr-pg-accent );
	color: var( --vxr-pg-accent );
}

.vxr-pg__range::-webkit-slider-runnable-track {
	height: 3px;
	border-radius: 2px;
	background: linear-gradient(
		to right,
		var( --vxr-pg-accent ) 0 var( --vxr-pg-fill ),
		var( --vxr-pg-line ) var( --vxr-pg-fill ) 100%
	);
}

.vxr-pg__range::-moz-range-track {
	height: 3px;
	border-radius: 2px;
	background: var( --vxr-pg-line-strong );
}

.vxr-pg__range::-moz-range-progress {
	height: 3px;
	border-radius: 2px;
	background: var( --vxr-pg-accent );
}

.vxr-pg__range::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 15px;
	height: 15px;
	margin-top: -6px;
	border-radius: 50%;
	background: var( --vxr-pg-accent );
	border: 2px solid var( --vxr-pg-surface, transparent );
	box-shadow: 0 0 0 1px var( --vxr-pg-line-strong );
}

.vxr-pg__range::-moz-range-thumb {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: var( --vxr-pg-accent );
	border: 2px solid var( --vxr-pg-surface, transparent );
	box-shadow: 0 0 0 1px var( --vxr-pg-line-strong );
}

.vxr-pg__range:focus-visible {
	outline: 2px solid var( --vxr-pg-accent );
	outline-offset: 4px;
	border-radius: 4px;
}

/* ---------------------------------------------- recipe-covered fields */

/*
 * A selected recipe already describes some parameters. Those are dimmed and
 * dropped from the prompt, unless the visitor overrides them field by field.
 */

.vxr-pg__field.is-muted .vxr-pg__select,
.vxr-pg__field.is-muted .vxr-pg__input,
.vxr-pg__field.is-muted .vxr-pg__textarea,
.vxr-pg__field.is-muted .vxr-pg__range,
.vxr-pg__field.is-muted .vxr-pg__checks,
.vxr-pg__field.is-muted .vxr-pg__tiles,
.vxr-pg__field.is-muted .vxr-pg__combo,
.vxr-pg__field.is-muted .vxr-pg__toggle {
	opacity: 0.38;
	filter: grayscale( 1 );
}

.vxr-pg__field.is-muted .vxr-pg__label,
.vxr-pg__field.is-muted .vxr-pg__value {
	opacity: 0.55;
}

.vxr-pg__field.is-muted .vxr-pg__hint {
	display: none;
}

.vxr-pg__mute {
	font: inherit;
	font-size: 0.68rem;
	line-height: 1.2;
	letter-spacing: 0.02em;
	cursor: pointer;
	white-space: nowrap;
	color: inherit;
	background: var( --vxr-pg-well-2 );
	border: 1px solid var( --vxr-pg-line );
	border-radius: 999px;
	padding: 0.15rem 0.55rem;
	opacity: 0.75;
	flex: none;
}

.vxr-pg__mute:hover,
.vxr-pg__mute:focus-visible {
	opacity: 1;
	border-color: var( --vxr-pg-accent );
}

.vxr-pg__field.is-covered:not( .is-muted ) .vxr-pg__mute {
	border-color: var( --vxr-pg-accent );
	color: var( --vxr-pg-accent );
	opacity: 1;
}

/* Keep the label, the slider read-out, and the badge on one row. */
.vxr-pg__field.is-covered .vxr-pg__fieldhead {
	flex-wrap: wrap;
	row-gap: 0.25rem;
}

/* -------------------------------------------------------------- output */

.vxr-pg__output {
	background: var( --vxr-pg-well-2 );
}

.vxr-pg__outputhead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 0.7rem;
}

.vxr-pg__outputhead .vxr-pg__panel-title {
	margin: 0;
}

.vxr-pg__formats {
	display: inline-flex;
	border: 1px solid var( --vxr-pg-line-strong );
	border-radius: 999px;
	overflow: hidden;
}

.vxr-pg__pill {
	font: inherit;
	font-size: 0.75rem;
	background: none;
	color: inherit;
	border: 0;
	padding: 0.3rem 0.85rem;
	cursor: pointer;
	opacity: 0.65;
}

.vxr-pg__pill + .vxr-pg__pill {
	border-left: 1px solid var( --vxr-pg-line );
}

.vxr-pg__pill.is-active {
	opacity: 1;
	background: var( --vxr-pg-well-2 );
	font-weight: 600;
}

.vxr-pg__result {
	width: 100%;
	font-family: var( --vxr-pg-mono );
	font-size: 0.84rem;
	line-height: 1.6;
	color: inherit;
	background: transparent;
	border: 1px solid var( --vxr-pg-line-strong );
	border-radius: var( --vxr-pg-radius );
	padding: 0.9rem 1rem;
	resize: vertical;
	white-space: pre-wrap;
}

.vxr-pg__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.8rem;
}

.vxr-pg__btn {
	font: inherit;
	font-size: 0.86rem;
	cursor: pointer;
	color: inherit;
	background: transparent;
	border: 1px solid var( --vxr-pg-line-strong );
	border-radius: 7px;
	padding: 0.45rem 0.95rem;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.vxr-pg__btn:hover {
	border-color: var( --vxr-pg-accent );
}

.vxr-pg__btn--primary {
	background: var( --vxr-pg-accent );
	border-color: var( --vxr-pg-accent );
	color: var( --vxr-pg-on-accent, #fff );
	font-weight: 600;
}

.vxr-pg__btn--quiet {
	border-color: transparent;
	opacity: 0.7;
}

.vxr-pg__btn--quiet:hover {
	opacity: 1;
}

.vxr-pg__status {
	font-size: 0.8rem;
	color: var( --vxr-pg-accent );
	font-family: var( --vxr-pg-mono );
}

.vxr-pg__credit {
	margin: 0.9rem 0 0;
	font-size: 0.75rem;
	color: var( --vxr-pg-muted );
}

/* sticky output */

.vxr-pg.is-sticky-output .vxr-pg__output {
	position: sticky;
	bottom: 0;
	z-index: 2;
	backdrop-filter: blur( 8px );
}

/* ------------------------------------------------------------ responsive */

@media ( max-width: 782px ) {
	.vxr-pg__grid {
		grid-template-columns: 1fr;
	}

	.vxr-pg.is-sticky-output .vxr-pg__output {
		position: static;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.vxr-pg * {
		transition: none !important;
	}
}
