/* ============================================================
 * Button — static adapter for core/button and core/buttons.
 *
 * The markup this styles is the markup the WordPress block editor writes.
 * The container and control DOM (.wp-block-buttons, .wp-block-button and
 * .wp-block-button__link) plus the is-style-* colour variations are what core
 * emits. data-size is intentionally different: it is the static rendering
 * contract for a future editor-facing Button size attribute. It must never
 * consume WordPress's single block-style variation axis.
 *
 * The theme owns the real surface in theme.json (styles.elements.button plus
 * styles.blocks.core/button.variations.outline) and in the auto-registered
 * partials under styles/blocks/. This file is the static restatement of that
 * contract for a site with no WordPress in it, the way the theme switcher CSS
 * beside it restates its plugin. tools/validators/validate_styleguide_button.py
 * pins the values that must stay equal to theme.json, so the two cannot drift
 * quietly.
 *
 * ORDER IS THE CONTRACT
 *
 *   1 the control        geometry read from custom properties
 *   2 the button         size
 *   3 the button         colour style
 *   4 the container      layout only
 *   5 connected buttons  connected geometry only
 *
 * core/buttons is an action container, not an M3 Button group. Its Connected
 * variation only joins neighbouring button shapes; child buttons keep their
 * own size and colour decisions. A real M3 Button group owns state and segment
 * configuration as a separate component, as axismundi-theme-switcher does.
 *
 * Colour is named in --md-sys-color-* here. WordPress publishes the same roles
 * as --wp--preset--color--*, generated from theme.json settings at runtime;
 * they are one set of roles with two spellings, and which spelling appears is
 * the only difference between this file and the theme's.
 * ============================================================ */

/* --- 1. The control ------------------------------------------ */

/* Every measurement is a custom property with the Small default inlined as its
 * fallback, so a button with no size attribute is a Small button and an
 * explicit size is a set of declarations rather than a second copy of this
 * rule. */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	gap: var(--ax-button-icon-gap, var(--md-sys-measurement-space100));
	block-size: var(--ax-button-height, 40px);
	padding-inline: var(--ax-button-space, var(--md-sys-measurement-space200));
	border: 0;
	border-radius: var(--ax-button-shape, 20px);
	background-color: var(--ax-button-container);
	color: var(--ax-button-content);
	font-family: var(--md-ref-typeface-brand);
	font-size: var(--ax-button-label-size, 14px);
	font-weight: var(--ax-button-label-weight, 500);
	letter-spacing: var(--ax-button-label-tracking, 0.1px);
	line-height: var(--ax-button-label-line-height, 20px);
	text-decoration: none;
	/* M3: a button's width adjusts to its label, and a width narrower than
	 * the label is the documented Don't. Left to wrap, a label breaks lines
	 * inside a container whose height is fixed per size, so the second line
	 * is clipped rather than visibly wrong - measured at a 110px container,
	 * where the button shrank from 134px and swallowed half its label.
	 * nowrap makes min-content the whole label, which is what stops a flex
	 * parent squeezing it. */
	white-space: nowrap;
	cursor: pointer;
	/* The blue tap rectangle is the wrong shape and the wrong colour for a
	 * pill, and nothing is lost: the pressed state layer answers the touch. */
	-webkit-tap-highlight-color: transparent;
	transition:
		border-radius var(--md-sys-motion-curve-fast-spatial-duration) var(--md-sys-motion-curve-fast-spatial),
		background-color var(--md-sys-motion-curve-fast-effects-duration) var(--md-sys-motion-curve-fast-effects);
}

/* The icon slot. Its class is the contract; what fills it is not.
 *
 * WordPress 7.1 made the icon registry public (wp_register_icon_collection /
 * wp_register_icon), and a reference resolved through it arrives as an <svg>.
 * A name typed as text - the way axismundi/dialog's triggerIcon works today -
 * arrives as a Material Symbols ligature instead. Both are direct children of
 * the link, so this rule sizes the box and lets whatever is inside fill it,
 * and neither source needs its own geometry.
 *
 * The box cannot shrink beside a long label: an icon that reflows with the
 * text is no longer the fixed leading affordance M3 measures.
 *
 * Leading is the only position M3's guidelines describe. They give it in
 * physical terms - left of the label in LTR, right of it in RTL - which is one
 * logical rule written twice, so nothing here implements it: the slot is a
 * flex child placed by document order, and a row flips with the writing
 * direction on its own. There is no trailing rule because M3 specifies no
 * trailing icon, and no second slot because it says not to use two. */
.wp-block-button__link > .wp-block-button__icon {
	flex: 0 0 var(--ax-button-icon-size, 20px);
	inline-size: var(--ax-button-icon-size, 20px);
	block-size: var(--ax-button-icon-size, 20px);
	font-size: var(--ax-button-icon-size, 20px);
	line-height: 1;
}

.wp-block-button__link > .wp-block-button__icon > svg {
	inline-size: 100%;
	block-size: 100%;
	fill: currentColor;
}

/* A Button link may sit inside prose, whose generic link colour is deliberately
 * more specific than a bare class selector. The editor always emits this
 * parent-child pair, so use the real DOM relationship to keep a Filled CTA's
 * on-primary label from inheriting prose's primary link colour. */
.wp-block-button > .wp-block-button__link {
	color: var(--ax-button-content);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link {
		transition: none;
	}
}

/* Pressed shape morph. Both endpoints are corner-value lengths: a browser
 * scales any radius past half the box down to fit, so animating from a pill
 * literal would look unchanged and then snap. */
.wp-block-button__link:active {
	border-radius: var(--ax-button-pressed-shape, var(--md-sys-shape-corner-value-small));
}

/* M3's focus ring. Keyboard only — theme.json can emit no better than a plain
 * :focus, so the theme suppresses the ring for pointer focus in its component
 * CSS; here :focus-visible says it directly. The focus state layer still
 * applies to both, because that is a state and not an affordance. */
.wp-block-button__link:focus-visible {
	outline: var(--md-focus-ring-width) solid var(--md-sys-color-secondary);
	outline-offset: var(--md-focus-ring-outward-offset);
}

/* Disabled is a flat opacity on content over a dimmed container, not a state
 * layer. WordPress has no :disabled in theme.json's element model, so the
 * theme cannot express this and the binding page records it as unbound. */
.wp-block-button__link[aria-disabled="true"],
.wp-block-button__link:disabled {
	background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
	border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
	color: color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-state-layer-opacity) * 100%), transparent);
	box-shadow: none;
	cursor: not-allowed;
	pointer-events: none;
}

/* --- 2. The button decides size ------------------------------ */

/* Size is not an is-style-* variation, and that is a decision rather than an
 * omission. M3 makes size and colour independent configurations; the editor's
 * Styles panel is single-select, so spending it on size would make "medium"
 * and "tonal" mutually exclusive.
 *
 * data-size is this project's answer, not WordPress's. Core solves the same
 * problem on core/social-links with a second class namespace - .is-style-* and
 * .has-large-icon-size sit on one element without colliding - and emits a
 * presentational data-* attribute in only two places, neither of them a design
 * axis. Specificity buys nothing either way: .a and [data-a] are both (0,1,0).
 * The attribute wins on cardinality alone. Size is exactly one of five, a class
 * list cannot say so, and two size classes on one element are resolved silently
 * by declaration order. axismundi/theme-switcher already renders data-size for
 * the same reason. The binding page records what this costs if core ever ships
 * a button size axis of its own. Small needs no attribute: it is the fallback
 * set above.
 *
 * The round shape is half the height in every size, which is what M3 means by
 * a full corner on a fixed-height control. */

.wp-block-button[data-size="xsmall"] {
	--ax-button-height: 32px;
	--ax-button-space: var(--md-sys-measurement-space150);
	--ax-button-icon-gap: var(--md-sys-measurement-space50);
	--ax-button-icon-size: 20px;
	--ax-button-shape: 16px;
	--ax-button-pressed-shape: var(--md-sys-shape-corner-value-small);
	--ax-button-selected-shape: var(--md-sys-shape-corner-value-medium);
	--ax-button-outline-width: 1px;
	--ax-button-label-size: 14px;
	--ax-button-label-weight: 500;
	--ax-button-label-tracking: 0.1px;
	--ax-button-label-line-height: 20px;
}

.wp-block-button[data-size="medium"] {
	--ax-button-height: 56px;
	--ax-button-space: var(--md-sys-measurement-space300);
	--ax-button-icon-gap: var(--md-sys-measurement-space100);
	--ax-button-icon-size: 24px;
	--ax-button-shape: 28px;
	--ax-button-pressed-shape: var(--md-sys-shape-corner-value-medium);
	--ax-button-selected-shape: var(--md-sys-shape-corner-value-large);
	--ax-button-outline-width: 1px;
	--ax-button-label-size: 16px;
	--ax-button-label-weight: 500;
	--ax-button-label-tracking: 0.15px;
	--ax-button-label-line-height: 24px;
}

.wp-block-button[data-size="large"] {
	--ax-button-height: 96px;
	--ax-button-space: var(--md-sys-measurement-space600);
	--ax-button-icon-gap: var(--md-sys-measurement-space150);
	--ax-button-icon-size: 32px;
	--ax-button-shape: 48px;
	--ax-button-pressed-shape: var(--md-sys-shape-corner-value-large);
	--ax-button-selected-shape: var(--md-sys-shape-corner-value-extra-large);
	--ax-button-outline-width: 2px;
	--ax-button-label-size: 24px;
	--ax-button-label-weight: 400;
	--ax-button-label-tracking: 0;
	--ax-button-label-line-height: 32px;
}

.wp-block-button[data-size="xlarge"] {
	--ax-button-height: 136px;
	--ax-button-space: var(--md-sys-measurement-space800);
	--ax-button-icon-gap: var(--md-sys-measurement-space200);
	--ax-button-icon-size: 40px;
	--ax-button-shape: 68px;
	--ax-button-pressed-shape: var(--md-sys-shape-corner-value-large);
	--ax-button-selected-shape: var(--md-sys-shape-corner-value-extra-large);
	--ax-button-outline-width: 3px;
	--ax-button-label-size: 32px;
	--ax-button-label-weight: 400;
	--ax-button-label-tracking: 0;
	--ax-button-label-line-height: 40px;
}

/* Square is the other Expressive shape configuration, and it is an attribute
 * for the same reason size is: it is orthogonal to colour, so it cannot spend
 * the single is-style-* axis. Round and square share one pressed shape, so
 * only the resting corner changes. */
.wp-block-button[data-shape="square"] {
	--ax-button-shape: var(--md-sys-shape-corner-value-medium);
}

.wp-block-button[data-size="medium"][data-shape="square"] {
	--ax-button-shape: var(--md-sys-shape-corner-value-large);
}

.wp-block-button[data-size="large"][data-shape="square"],
.wp-block-button[data-size="xlarge"][data-shape="square"] {
	--ax-button-shape: var(--md-sys-shape-corner-value-extra-large);
}

/* --- 2b. Toggle: the second variant --------------------------- */

/* M3 publishes two variants, Default and Toggle, and Toggle is Expressive
 * only. Every colour style above already declares both tables. What was
 * missing here was the rule that spends them on a Button: the connected
 * segment read --ax-button-toggle-* directly, so the variant lived in the
 * data and on the page and never in the adapter.
 *
 * `aria-pressed` is the switch, and it has to be an attribute rather than a
 * class: a toggle is a control with a selected state, and that state has to
 * reach assistive technology. Present alone means unselected, "true" means
 * selected - the same contract the icon button and the connected segment use.
 *
 * Text is excluded rather than left to fall through. It declares no toggle
 * pair, so it would silently inherit Filled's from the base rule and render a
 * toggle M3 says does not exist. */
.wp-block-button:not(.is-style-text) > .wp-block-button__link[aria-pressed] {
	--ax-button-container: var(--ax-button-toggle-unselected-container);
	--ax-button-content: var(--ax-button-toggle-unselected-content);
	--ax-button-state-role: var(--ax-button-toggle-unselected-state-role);
}

/* Selected is one rule, because it is one state. Besides the colour pair it
 * changes the resting shape, and M3 gives that as a contrast rather than a
 * direction: round becomes square, and a square resting shape becomes round.
 * Same figures as the icon button, and the same reason - the selection has to
 * be legible without colour.
 *
 * Text is excluded from the shape too, not only the colour. Half a toggle - a
 * shape change with no colour change - is a state M3 does not publish, and
 * that is exactly what rendered while the exclusion sat on one of the two. */
.wp-block-button:not(.is-style-text) > .wp-block-button__link[aria-pressed="true"] {
	--ax-button-container: var(--ax-button-toggle-selected-container);
	--ax-button-content: var(--ax-button-toggle-selected-content);
	--ax-button-state-role: var(--ax-button-toggle-selected-state-role);
	border-radius: var(--ax-button-selected-shape, var(--md-sys-shape-corner-value-medium));
}

/* The square resting shape becomes round, and round is half the height at
 * every size - which is what M3 means by a full corner on a fixed-height
 * control, and what the comment above the size blocks already says.
 *
 * Not --ax-button-shape: [data-shape="square"] overwrites that variable, so
 * reading it back here returned the square corner and the morph did nothing.
 * Measured 12px where Small round is 20px. The height is the one source that
 * square does not touch. */
.wp-block-button:not(.is-style-text)[data-shape="square"] > .wp-block-button__link[aria-pressed="true"] {
	border-radius: calc(var(--ax-button-height, 40px) / 2);
}

/* Icon(selected): the FILL axis, not a second icon.
 *
 * Figma gives the toggle two icon properties, `Icon` and `Icon(selected)` -
 * stars and stars_filled - because a static file has to swap one symbol for
 * another to show a filled one. `stars_filled` was a Material Icons glyph and
 * did not survive the move to Material Symbols. The variable font carries FILL
 * as an axis instead, registered with @property in icons.css so it interpolates
 * rather than snaps. One icon name in the markup, two rendered states.
 *
 * "In toggle buttons, use the outlined style of an icon for the unselected
 * state, and the filled style for the selected state."
 *
 * Set on the slot, not on the glyph font, for the same reason the geometry rule
 * is: a 7.1 icon-registry reference arrives as <svg>, which has no FILL axis
 * and ignores the variable rather than mis-reading it. */
.wp-block-button:not(.is-style-text) > .wp-block-button__link[aria-pressed="true"] > .wp-block-button__icon {
	--md-icon-fill: 1;
}

/* Figma has a Show focus indicator property because a static file has to draw
 * the ring to show it. The browser owns the real one and :focus-visible only
 * fires for keyboard focus, which a reader inspecting a page is not doing, so a
 * specimen forces the same ring rather than describing it. It stores nothing:
 * no block attribute is behind this class. */
.wp-block-button.is-forced-focus > .wp-block-button__link {
	outline: var(--md-focus-ring-width) solid var(--md-sys-color-secondary);
	outline-offset: var(--md-focus-ring-outward-offset);
	background-color: color-mix(in srgb, var(--ax-button-state-role) calc(var(--md-sys-state-focus-state-layer-opacity) * 100%), var(--ax-button-container));
}

/* --- 3. The button decides colour style ---------------------- */

/* Filled, the default. No class: an unstyled core/button is already this.
 *
 * The default is written as a fallback rather than a value, and that is what
 * lets a group declare a colour for its members. M3's "Button groups have no
 * color properties" means the container paints nothing of its own - it is
 * invisible - not that it cannot carry a default; Figma gives the standard
 * group a Color property, and its worked example sets the group to Filled with
 * a tonal child. Same shape as size: the group declares, the child overrules.
 *
 * Inheritance alone could not do it. A value set on .wp-block-button sits on
 * the element and beats anything inherited from the container, so the group
 * would always lose. Reading --ax-group-color-* first inverts that: an
 * unstyled child resolves to whatever the group set, an is-style-* child sets
 * the role on itself and wins, and with no group at all the fallback is
 * Filled. */
.wp-block-button,
.wp-block-axismundi-button-group {
	--ax-button-container: var(--ax-group-color-container, var(--md-sys-color-primary));
	--ax-button-content: var(--ax-group-color-content, var(--md-sys-color-on-primary));
	/* The role mixed over the container at each state opacity. Naming it once
	 * means a variant sets two roles and inherits four states. */
	--ax-button-state-role: var(--ax-group-color-content, var(--md-sys-color-on-primary));
	--ax-button-toggle-unselected-container: var(--md-sys-color-surface-container);
	--ax-button-toggle-unselected-content: var(--md-sys-color-on-surface-variant);
	--ax-button-toggle-unselected-state-role: var(--md-sys-color-on-surface-variant);
	--ax-button-toggle-selected-container: var(--md-sys-color-primary);
	--ax-button-toggle-selected-content: var(--md-sys-color-on-primary);
	--ax-button-toggle-selected-state-role: var(--md-sys-color-on-primary);
}

.wp-block-button.is-style-elevated {
	--ax-button-container: var(--md-sys-color-surface-container-low);
	--ax-button-content: var(--md-sys-color-primary);
	--ax-button-state-role: var(--md-sys-color-primary);
	--ax-button-toggle-unselected-container: var(--md-sys-color-surface-container-low);
	--ax-button-toggle-unselected-content: var(--md-sys-color-primary);
	--ax-button-toggle-unselected-state-role: var(--md-sys-color-primary);
	--ax-button-toggle-selected-container: var(--md-sys-color-primary);
	--ax-button-toggle-selected-content: var(--md-sys-color-on-primary);
	--ax-button-toggle-selected-state-role: var(--md-sys-color-on-primary);
}

.wp-block-button.is-style-elevated .wp-block-button__link {
	box-shadow: var(--md-sys-elevation-shadow-level1);
}

.wp-block-button.is-style-tonal {
	--ax-button-container: var(--md-sys-color-secondary-container);
	--ax-button-content: var(--md-sys-color-on-secondary-container);
	--ax-button-state-role: var(--md-sys-color-on-secondary-container);
	--ax-button-toggle-unselected-container: var(--md-sys-color-secondary-container);
	--ax-button-toggle-unselected-content: var(--md-sys-color-on-secondary-container);
	--ax-button-toggle-unselected-state-role: var(--md-sys-color-on-secondary-container);
	--ax-button-toggle-selected-container: var(--md-sys-color-secondary);
	--ax-button-toggle-selected-content: var(--md-sys-color-on-secondary);
	--ax-button-toggle-selected-state-role: var(--md-sys-color-on-secondary);
}

/* Outlined and text share an invisible container. Their state layers mix over
 * transparent, which is why they read as a tint of whatever is behind them and
 * why both work on any surface. */
.wp-block-button.is-style-outline {
	--ax-button-container: transparent;
	--ax-button-content: var(--md-sys-color-on-surface-variant);
	--ax-button-state-role: var(--md-sys-color-on-surface-variant);
	--ax-button-toggle-unselected-container: transparent;
	--ax-button-toggle-unselected-content: var(--md-sys-color-on-surface-variant);
	--ax-button-toggle-unselected-state-role: var(--md-sys-color-on-surface-variant);
	--ax-button-toggle-selected-container: var(--md-sys-color-inverse-surface);
	--ax-button-toggle-selected-content: var(--md-sys-color-inverse-on-surface);
	--ax-button-toggle-selected-state-role: var(--md-sys-color-inverse-on-surface);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border: var(--ax-button-outline-width, 1px) solid var(--md-sys-color-outline-variant);
}

.wp-block-button.is-style-text {
	--ax-button-container: transparent;
	--ax-button-content: var(--md-sys-color-primary);
	--ax-button-state-role: var(--md-sys-color-primary);
}

/* One state layer for every style, mixed from the two properties above. */
.wp-block-button .wp-block-button__link:hover {
	background-color: color-mix(in srgb, var(--ax-button-state-role) calc(var(--md-sys-state-hover-state-layer-opacity) * 100%), var(--ax-button-container));
}

.wp-block-button .wp-block-button__link:focus {
	background-color: color-mix(in srgb, var(--ax-button-state-role) calc(var(--md-sys-state-focus-state-layer-opacity) * 100%), var(--ax-button-container));
}

.wp-block-button .wp-block-button__link:active {
	background-color: color-mix(in srgb, var(--ax-button-state-role) calc(var(--md-sys-state-pressed-state-layer-opacity) * 100%), var(--ax-button-container));
}

/* --- 4. The container decides nothing ------------------------ */

/* core/buttons on its own is a layout box. It owns how its children are placed
 * and nothing about what they are, which is why a row of buttons can mix
 * styles and sizes freely. Only the blockGap is its own. */
.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--md-sys-measurement-space150);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* --- 5. Connected Buttons only join geometry ------------------- */

/* This is the core/buttons Connected variation from the deployed theme. It is
 * still an action container: a card may pair a Filled "Get tickets" action
 * with an Outlined "Learn more" action. The variation changes only adjacency
 * geometry, never a child's size or colour style. */
.wp-block-buttons.is-style-connected {
	flex-wrap: nowrap;
	gap: var(--md-sys-measurement-space25);
}

.wp-block-buttons.is-style-connected > .wp-block-button {
	margin: 0;
}

/* Reset every adjacent corner before restoring only the two outer ends. This
 * mirrors buttons-connected.json: without the reset, each child retains its
 * standalone pill and the Connected variation is visually indistinguishable. */
.wp-block-buttons.is-style-connected > .wp-block-button > .wp-block-button__link {
	border-radius: var(--md-sys-shape-corner-value-small);
}

.wp-block-buttons.is-style-connected > .wp-block-button > .wp-block-button__link:active {
	border-radius: var(--md-sys-shape-corner-value-extra-small);
}

/* Only the two ends of the group are pills; the seams between segments stay
 * square. Logical longhands, because a group reverses in RTL and a radius
 * shorthand cannot. */
.wp-block-buttons.is-style-connected > .wp-block-button:first-child > .wp-block-button__link,
.wp-block-buttons.is-style-connected > .wp-block-button:first-child > .wp-block-button__link:active {
	border-start-start-radius: var(--md-sys-shape-corner-value-large-increased);
	border-end-start-radius: var(--md-sys-shape-corner-value-large-increased);
}

.wp-block-buttons.is-style-connected > .wp-block-button:last-child > .wp-block-button__link,
.wp-block-buttons.is-style-connected > .wp-block-button:last-child > .wp-block-button__link:active {
	border-start-end-radius: var(--md-sys-shape-corner-value-large-increased);
	border-end-end-radius: var(--md-sys-shape-corner-value-large-increased);
}

/* --- Documentation-only interactive demo --------------------- */

/* The control uses the same WordPress Button DOM above. These rules only lay
 * out the documentation tool around it; they do not change the component
 * contract being demonstrated. */
.sg-button-playground {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(13rem, 17rem);
	margin-block: var(--md-sys-measurement-space300);
	border: 1px solid var(--md-sys-color-outline-variant);
	border-radius: var(--md-sys-shape-corner-value-medium);
	background: var(--md-sys-color-surface-container-low);
	overflow: hidden;
}

.sg-button-playground__stage,
.sg-button-playground__controls {
	padding: var(--md-sys-measurement-space300);
}

.sg-button-playground__stage {
	display: grid;
	align-content: center;
	gap: var(--md-sys-measurement-space300);
	min-block-size: 18rem;
}

.sg-button-playground__controls {
	display: grid;
	align-content: start;
	gap: var(--md-sys-measurement-space200);
	margin: 0;
	border: 0;
	border-inline-start: 1px solid var(--md-sys-color-outline-variant);
	background: var(--md-sys-color-surface-container);
}

.sg-button-playground__eyebrow {
	margin: 0;
	font-family: var(--md-sys-typescale-title-small-font);
	font-size: var(--md-sys-typescale-title-small-size);
	font-weight: var(--md-sys-typescale-title-small-weight);
	letter-spacing: var(--md-sys-typescale-title-small-tracking);
	line-height: var(--md-sys-typescale-title-small-line-height);
}

.sg-button-playground__control {
	display: grid;
	gap: var(--md-sys-measurement-space50);
	font-size: var(--md-sys-typescale-body-medium-size);
	line-height: var(--md-sys-typescale-body-medium-line-height);
}

.sg-button-playground__control input,
.sg-button-playground__control select {
	inline-size: 100%;
	min-block-size: 2.5rem;
	padding-inline: var(--md-sys-measurement-space100);
	border: 1px solid var(--md-sys-color-outline);
	border-radius: var(--md-sys-shape-corner-value-extra-small);
	background: var(--md-sys-color-surface-container-highest);
	color: var(--md-sys-color-on-surface);
	font: inherit;
}

.sg-button-playground__check {
	display: flex;
	align-items: center;
	gap: var(--md-sys-measurement-space100);
	min-block-size: 2.5rem;
	font-size: var(--md-sys-typescale-body-medium-size);
	line-height: var(--md-sys-typescale-body-medium-line-height);
}

.sg-button-playground__check input {
	inline-size: 1.125rem;
	block-size: 1.125rem;
	accent-color: var(--md-sys-color-primary);
}

.sg-button-playground__markup {
	margin: 0;
	max-inline-size: 100%;
	min-block-size: 4.5rem;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

@media (max-width: 599px) {
	.sg-button-playground {
		grid-template-columns: minmax(0, 1fr);
	}

	.sg-button-playground__stage {
		min-block-size: 14rem;
	}

	.sg-button-playground__controls {
		border-inline-start: 0;
		border-block-start: 1px solid var(--md-sys-color-outline-variant);
	}
}
