/**
 * STW Plan Builder — customer-facing wizard
 *
 * =============================================================================
 * THIS FILE HAS TO SURVIVE THREE THEMES
 * =============================================================================
 * stw2021 (outgoing, heavy WooCommerce overrides), stw2026 (picostrap5 /
 * Bootstrap 5.3) and ep-v3. So:
 *
 *   - every rule is at least TWO classes specific, so a theme's single-class
 *     selector cannot win by source order;
 *   - every class this plugin owns is `stw-pb-` prefixed, and every block's root
 *     also carries the bare `stw-pb` scope class;
 *   - resets are SCOPED to `.stw-pb`, never global. box-sizing, list-style and
 *     button appearance are the three that themes get wrong often enough to
 *     matter;
 *   - `!important` appears in EXACTLY TWO places, both of them fighting a known
 *     theme rule rather than guessing: `.stw-pb-hidden` (themes force `display`
 *     on tables, rows and list items) and the list reset (stw2021 and ep-v3 both
 *     ship `ul li { list-style: disc !important; }`).
 *
 * The section navigation is an ACCORDION: four headers over one relocating content
 * region. Read the accordion block below before changing anything there — the
 * absence of a per-section panel is structural, not an omission.
 *
 * =============================================================================
 * STICKY AND FIXED BOTH DEPEND ON A CONTAINING BLOCK. NEITHER MEANS "VIEWPORT".
 * =============================================================================
 * `position: sticky` only moves within its own containing block, and `position:
 * fixed` resolves against the viewport ONLY while no ancestor establishes a
 * containing block for fixed descendants. Two rules here turn on that:
 *
 *   - the OPEN accordion section's header sticks, because that section holds the
 *     relocated item pool and is therefore tall enough to have a sticky range. A
 *     collapsed section is exactly as tall as its own header, so its range is zero
 *     and collapsed headers cannot stack up. That is geometry, not a rule;
 *   - the summary bar is `position: fixed`, because as a sticky element its
 *     containing block was `.stw-pb-summary` — a wrapper exactly as tall as the bar
 *     itself, so it had NO sticky range and simply sat in the flow below every item
 *     row. plan-builder.js walks the bar's ancestors at boot and falls back to the
 *     in-flow bar if any of them would capture `fixed`.
 *
 * Three custom properties are written to <html> by plan-builder.js and are
 * deliberately NOT declared in the token block below — the tokens sit on `.stw-pb`,
 * which is inside the elements that read them, so declaring them there would shadow
 * a measured value with a constant:
 *
 *   --stw-pb-sticky-top      how far down the viewport the theme's own fixed or
 *                            sticky chrome reaches. Measured, not hardcoded, and
 *                            recomputed on scroll because it is not constant.
 *   --stw-pb-bar-height      the fixed bar's height, so nothing sits under it.
 *   --stw-pb-header-height   the open header's height, for scroll-margin.
 *
 * NO BOOTSTRAP DEPENDENCY. No .row, .col-*, .btn, .card, .modal, .d-flex, no
 * data-bs-* attributes, and the JS never reads window.bootstrap. Everything here
 * is hand-written Grid and Flexbox, so the same markup renders identically on a
 * theme that has never heard of Bootstrap.
 *
 * Theming is via custom properties on `.stw-pb`. A theme overrides the tokens, not
 * the rules.
 */

/* -----------------------------------------------------------------------------
 * Tokens
 * -------------------------------------------------------------------------- */

.stw-pb {
	--stw-pb-accent: #1f7a4c;
	--stw-pb-accent-fg: #ffffff;
	--stw-pb-fg: #1c1c1c;
	--stw-pb-muted: #5c6470;
	--stw-pb-bg: #ffffff;
	--stw-pb-surface: #f5f6f7;
	--stw-pb-border: #d5d9de;
	--stw-pb-focus: #0b63c5;
	--stw-pb-radius: 8px;
	--stw-pb-gap: 12px;
	--stw-pb-tap: 44px;
	--stw-pb-shadow: 0 2px 10px rgba( 0, 0, 0, 0.12 );
}

/* -----------------------------------------------------------------------------
 * Scoped resets
 * -------------------------------------------------------------------------- */

.stw-pb,
.stw-pb *,
.stw-pb *::before,
.stw-pb *::after {
	box-sizing: border-box;
}

.stw-pb .stw-pb-chips,
.stw-pb .stw-pb-actions,
.stw-pb .stw-pb-bar__row {
	display: flex;
}

/* !important #2 of 2. Both stw2021 and ep-v3 ship `ul li { list-style: disc
 * !important }`, so nothing weaker removes the bullets. */
.stw-pb .stw-pb-slots,
.stw-pb .stw-pb-slots > .stw-pb-slot {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.stw-pb .stw-pb-acc__header,
.stw-pb .stw-pb-chip,
.stw-pb .stw-pb-action,
.stw-pb .stw-pb-note__remove,
.stw-pb .stw-pb-bar__toggle,
.stw-pb .stw-pb-sheet__close {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	font: inherit;
	color: inherit;
	line-height: 1.3;
	text-align: left;
	background: var( --stw-pb-bg );
	border: 1px solid var( --stw-pb-border );
	border-radius: var( --stw-pb-radius );
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}

.stw-pb .stw-pb-acc__header:focus-visible,
.stw-pb .stw-pb-chip:focus-visible,
.stw-pb .stw-pb-action:focus-visible,
.stw-pb .stw-pb-note__remove:focus-visible,
.stw-pb .stw-pb-bar__toggle:focus-visible,
.stw-pb .stw-pb-sheet__close:focus-visible,
.stw-pb .stw-pb-sheet__panel:focus-visible {
	/* Not dependent on the theme: an outline plus an offset shows on any
	 * background, including a dark one. */
	outline: 3px solid var( --stw-pb-focus );
	outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
 * !important #1 of 2. Single-class on purpose: this is applied to Mix & Match's
 * OWN nodes — `.mnm_item` rows, `<table>` and `<ul>` item wrappers, step headings
 * — none of which carry the `.stw-pb` scope class. And `hidden` alone loses to any
 * theme rule that sets `display` on a table, a row or a list item, which is most
 * of them.
 * -------------------------------------------------------------------------- */

.stw-pb-hidden {
	display: none !important;
}

/* -----------------------------------------------------------------------------
 * No-JS notice
 * -------------------------------------------------------------------------- */

.stw-pb.stw-pb-noscript {
	margin: 0 0 var( --stw-pb-gap );
	padding: 10px 12px;
	color: var( --stw-pb-fg );
	background: var( --stw-pb-surface );
	border: 1px solid var( --stw-pb-border );
	border-radius: var( --stw-pb-radius );
	font-size: 0.9375rem;
}

/* -----------------------------------------------------------------------------
 * The slot accordion — FOUR HEADERS, ONE REGION
 *
 * There is no per-section panel to style here, because there is no per-section
 * panel. M&M renders one flat item list (a product carries one quantity input, so
 * it renders once), and the JS MOVES that one `.stw-pb-pool` node into whichever
 * `.stw-pb-acc__section` is expanded. So a section is a header plus, when it is the
 * open one, the relocated pool as its next sibling.
 *
 * Which is also why there is NO height animation, with or without
 * prefers-reduced-motion: a region that relocates rather than growing cannot be
 * height-animated without measuring and locking it, and locking the height of the
 * live item list is exactly the kind of thing that ends up clipping a real quantity
 * input. The only transition is the marker rotating.
 * -------------------------------------------------------------------------- */

.stw-pb.stw-pb-accordion {
	display: grid;
	gap: 8px;
	margin: 0 0 var( --stw-pb-gap );
}

/* NO `overflow: hidden` here, deliberately. It would be the easy way to make the
 * radius clip the header's background, but this element receives the real item list
 * — M&M's table or grid, styled by the theme — and clipping a live product grid is
 * how a theme's negative margins or an item's focus ring end up cut off. The header
 * rounds its own corners instead. */
.stw-pb .stw-pb-acc__section {
	border: 1px solid var( --stw-pb-border );
	border-radius: var( --stw-pb-radius );
}

.stw-pb .stw-pb-acc__section--open {
	border-color: var( --stw-pb-accent );
}

/* The heading element exists for document outline only — every visual is on the
 * button, which has to fill it so the whole bar is the tap target. */
.stw-pb .stw-pb-acc__heading {
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
}

/* THE PRIMARY ANSWER to "when I am scrolled I cannot see the quantity I have
 * selected for that category".
 *
 * The open section's header pins to the top of the viewport while its own items
 * scroll under it, so the section name and its live count follow the customer. It
 * is the header that was already there, still a real `<button aria-expanded>` — not
 * a clone, because two elements claiming the same `aria-controls` is worse than the
 * scroll problem it would solve.
 *
 * ONLY the open section, and that is enough on its own: `.stw-pb-acc__section` is
 * the containing block, the open one holds the relocated pool and so is tall, and a
 * collapsed one is exactly as tall as its header. Collapsed headers therefore have
 * no room to stick and cannot pile up at the top.
 *
 * `top` is the MEASURED height of the theme's own top chrome (see the file header).
 * z-index sits below a typical theme header's, deliberately: the offset puts this
 * header underneath the theme's, so the theme's must paint on top.
 */
.stw-pb .stw-pb-acc__section--open > .stw-pb-acc__heading {
	position: sticky;
	top: var( --stw-pb-sticky-top, 0px );
	z-index: 15;

	/* The header button fills the heading, but its top corners are rounded, so
	 * without this the item rows would show through those two corners. */
	background: var( --stw-pb-bg );
}

.stw-pb .stw-pb-acc__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;

	/* Tap target: the whole bar, comfortably over 44px at any font size. */
	min-height: var( --stw-pb-tap );
	padding: 10px 14px;
	border: 0;

	/* Top corners only — the relocated pool sits directly below when this section
	 * is the open one. `- 1px` sits inside the section's own 1px border. */
	border-radius: calc( var( --stw-pb-radius ) - 1px ) calc( var( --stw-pb-radius ) - 1px ) 0 0;
	background: var( --stw-pb-surface );
}

/* Collapsed: the heading is the section's only child, so round all four corners.
 * Must come after the rule above. */
.stw-pb .stw-pb-acc__heading:last-child .stw-pb-acc__header {
	border-radius: calc( var( --stw-pb-radius ) - 1px );
}

.stw-pb .stw-pb-acc__text {
	display: block;
	min-width: 0;
}

.stw-pb .stw-pb-acc__step {
	display: block;
	font-size: 0.75rem;
	color: var( --stw-pb-muted );
}

.stw-pb .stw-pb-acc__name {
	display: block;
	font-weight: 600;
}

/* The per-section count, and the reason it lives in the header: it is the progress
 * a customer can still see while the section is COLLAPSED. */
.stw-pb .stw-pb-acc__count {
	display: block;
	font-size: 0.8125rem;
	color: var( --stw-pb-muted );
	font-variant-numeric: tabular-nums;
}

/* A CSS-only disclosure marker. aria-hidden in the markup — the state is already
 * carried by aria-expanded, so a screen reader must not hear it twice. */
.stw-pb .stw-pb-acc__marker {
	flex: 0 0 auto;
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 7px solid currentColor;
	transition: transform 150ms ease-out;
}

.stw-pb .stw-pb-acc__header--open {
	color: var( --stw-pb-accent-fg );
	background: var( --stw-pb-accent );
}

.stw-pb .stw-pb-acc__header--open .stw-pb-acc__step,
.stw-pb .stw-pb-acc__header--open .stw-pb-acc__count {
	color: inherit;
}

.stw-pb .stw-pb-acc__header--open .stw-pb-acc__marker {
	transform: rotate( 180deg );
}

/* Reached its target. Positive guidance in BOTH slot modes — not a claim that
 * anything is enforced. */
.stw-pb .stw-pb-acc__header--done {
	box-shadow: inset 4px 0 0 0 var( --stw-pb-accent );
}

/* The failing state, quota mode only. See paint() in plan-builder.js. */
.stw-pb .stw-pb-acc__header--over {
	box-shadow: inset 4px 0 0 0 #b3261e;
}

/* The relocated pool, while it is inside a section. Padding here rather than on
 * the section, so the collapsed state has no stray gap under the header. */
.stw-pb .stw-pb-acc__section > .stw-pb-pool {
	padding: 12px;
}

/* The single live region. Visually hidden, never display:none — a display:none
 * live region is not announced. */
.stw-pb .stw-pb-live {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	clip-path: inset( 50% );
	white-space: nowrap;
	border: 0;
}

/* -----------------------------------------------------------------------------
 * Filter chips and quick-pick
 * -------------------------------------------------------------------------- */

.stw-pb.stw-pb-tools {
	display: grid;
	grid-template-columns: 1fr;
	gap: var( --stw-pb-gap );
	margin: 0 0 var( --stw-pb-gap );
	padding: 12px;
	background: var( --stw-pb-surface );
	border: 1px solid var( --stw-pb-border );
	border-radius: var( --stw-pb-radius );
}

.stw-pb .stw-pb-filters {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.stw-pb .stw-pb-filters__legend {
	padding: 0;
	margin: 0 0 2px;
	font-weight: 600;
	font-size: 0.9375rem;
}

.stw-pb .stw-pb-filters__hint,
.stw-pb .stw-pb-actions__hint {
	margin: 0 0 8px;
	font-size: 0.8125rem;
	color: var( --stw-pb-muted );
}

.stw-pb .stw-pb-chips {
	flex-wrap: wrap;
	gap: 8px;
}

.stw-pb .stw-pb-chip {
	min-height: var( --stw-pb-tap );
	padding: 8px 14px;
	border-radius: 999px;
	white-space: nowrap;
}

.stw-pb .stw-pb-chip--on {
	color: var( --stw-pb-accent-fg );
	background: var( --stw-pb-accent );
	border-color: var( --stw-pb-accent );
}

.stw-pb .stw-pb-actions {
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.stw-pb .stw-pb-action {
	min-height: var( --stw-pb-tap );
	padding: 8px 16px;
	font-weight: 600;
}

.stw-pb .stw-pb-action--pick {
	color: var( --stw-pb-accent-fg );
	background: var( --stw-pb-accent );
	border-color: var( --stw-pb-accent );
}

.stw-pb .stw-pb-actions__hint {
	flex: 1 1 14rem;
	margin: 0;
}

/* -----------------------------------------------------------------------------
 * The pool — the ONE shared content region the accordion relocates. Deliberately
 * almost unstyled: it holds M&M's own table or grid, and the theme owns that.
 * -------------------------------------------------------------------------- */

.stw-pb.stw-pb-pool {
	margin: 0;
}

/* Keep a pinned header off the row a customer has just tabbed or clicked into.
 * Scoped to the pool rather than bare `.mnm_item`, so a second Mix and Match
 * container on the same page (QuickView) is untouched. */
.stw-pb-pool .mnm_item {
	scroll-margin-top: calc( var( --stw-pb-sticky-top, 0px ) + var( --stw-pb-header-height, 0px ) + 8px );
}

.stw-pb .stw-pb-empty {
	margin: 0 0 var( --stw-pb-gap );
	padding: 12px;
	color: var( --stw-pb-muted );
	background: var( --stw-pb-surface );
	border: 1px dashed var( --stw-pb-border );
	border-radius: var( --stw-pb-radius );
}

/* An item in the plan but outside the active filters. Muted, never hidden: its
 * input would still POST, silently and invisibly.
 *
 * These three are scoped on `.mnm_item` rather than `.stw-pb`, because they style
 * nodes the JS appends INTO M&M's own item markup, which does not carry the scope
 * class. Still two classes, so still ahead of a theme's single-class rule. */
.mnm_item.stw-pb-outside {
	opacity: 0.72;
}

.mnm_item.stw-pb-outside .stw-pb-note {
	font-weight: 600;
}

.mnm_item .stw-pb-note {
	margin: 4px 0 0;
	font-size: 0.75rem;
	line-height: 1.35;
	color: #5c6470;
}

.mnm_item .stw-pb-note__remove {
	-webkit-appearance: none;
	appearance: none;
	margin: 4px 0 0;
	min-height: 44px;
	padding: 6px 10px;
	font: inherit;
	font-size: 0.75rem;
	line-height: 1.3;
	color: inherit;
	background: #ffffff;
	border: 1px solid #d5d9de;
	border-radius: 8px;
	cursor: pointer;
	text-transform: none;
	box-shadow: none;
}

.mnm_item .stw-pb-note__remove:focus-visible {
	outline: 3px solid #0b63c5;
	outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
 * Summary bar — VIEWPORT-ANCHORED, and the home of M&M's real price, message and
 * button
 *
 * This was `position: sticky; bottom: 0` and it never stuck, because sticky moves
 * only within its containing block and the bar's is `.stw-pb-summary` — a wrapper
 * exactly as tall as the bar itself. Zero range, so the bar sat in the flow below
 * all fifty item rows and a scrolled customer could not see it at all. `fixed` is
 * the fix; see the file header, and see fixedContainingBlock() in plan-builder.js
 * for the ancestor check that decides whether `fixed` can be trusted here.
 *
 * Full width rather than column width: it is a viewport bar now, and matching the
 * width of a column it no longer belongs to would only look like a mistake.
 * -------------------------------------------------------------------------- */

.stw-pb.stw-pb-bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 20;
	display: grid;
	gap: 8px;

	/* env() so the row clears an iOS home indicator, with a 0px fallback for
	 * every engine that has never heard of it. */
	padding: 10px 12px calc( 10px + env( safe-area-inset-bottom, 0px ) );
	background: var( --stw-pb-bg );

	/* Top edge only — the other three are off-screen. */
	border: 1px solid var( --stw-pb-border );
	border-width: 1px 0 0;
	border-radius: 0;
	box-shadow: var( --stw-pb-shadow );
}

/* Nothing may sit permanently underneath the fixed bar — not the last item row, and
 * not the theme's footer either, which is why this is on <body> rather than on the
 * form. `--stw-pb-bar-height` is measured by plan-builder.js, and the class is added
 * only once the bar has initialised AND `fixed` was found to be trustworthy, so a
 * page with no bar gains no padding. Same element+class shape as `.stw-pb-lock`
 * below: <html> and <body> cannot carry the `.stw-pb` scope class. */
html.stw-pb-has-fixed-bar body {
	padding-bottom: calc( var( --stw-pb-bar-height, 0px ) + 12px );
}

/* FALLBACK. An ancestor establishes a containing block for fixed positioning, so
 * `fixed` would resolve against that ancestor's box and the bar would be clipped
 * inside it — invisible, and unrecoverable from the customer's side. Back to the
 * in-flow bar instead: it scrolls, which is the bug this release fixes, but it is at
 * least reachable. plan-builder.js adds the class and logs once. Three classes, so
 * it beats the two-class rule above whatever the source order. */
.stw-pb-fixed-unsafe .stw-pb.stw-pb-bar {
	position: sticky;
	right: auto;
	bottom: 0;
	left: auto;
	padding: 10px 12px;
	border-width: 1px;
	border-radius: var( --stw-pb-radius );
}

/* Every section at its target: the add-to-cart in here is the obvious next action,
 * so accent the bar. A visual cue only — whether the button is actually enabled
 * stays entirely M&M's business. */
.stw-pb.stw-pb-bar--ready {
	border-color: var( --stw-pb-accent );
	box-shadow: inset 0 3px 0 0 var( --stw-pb-accent ), var( --stw-pb-shadow );
}

/* Relocation target. Capped and scrollable so a long validation list cannot push
 * the call to action off the screen. */
.stw-pb .stw-pb-bar__nodes {
	max-height: 9rem;
	overflow-y: auto;
}

.stw-pb .stw-pb-bar__nodes .mnm_price,
.stw-pb .stw-pb-bar__nodes .mnm_message {
	margin: 0 0 4px;
}

.stw-pb .stw-pb-bar__row {
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.stw-pb .stw-pb-bar__meta {
	flex: 1 1 8rem;
	margin: 0;
	font-weight: 600;
}

.stw-pb .stw-pb-bar__toggle {
	min-height: var( --stw-pb-tap );
	padding: 8px 14px;
}

.stw-pb .stw-pb-bar__action {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* M&M's real button, moved in. Only layout is touched — colour, font and radius
 * stay with whatever the theme gave it. */
.stw-pb .stw-pb-bar__action .single_add_to_cart_button {
	min-height: var( --stw-pb-tap );
	margin: 0;
}

@media ( min-width: 48rem ) {
	.stw-pb.stw-pb-bar {
		grid-template-columns: minmax( 0, 1fr ) auto;
		align-items: center;
	}

	/* The desktop `max-height: none` that used to sit here is GONE on purpose. It was
	 * harmless while the bar was in the flow — a long validation list just made the
	 * page taller. A fixed bar grows UPWARDS over the item list instead, so the 9rem
	 * cap and its scrollbar now apply at every width. */
}

/* -----------------------------------------------------------------------------
 * Plan sheet — a bottom sheet on mobile, a centred dialog above it
 * -------------------------------------------------------------------------- */

.stw-pb.stw-pb-sheet {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-end;
	justify-content: center;

	/* `position: fixed` resolves against the nearest ancestor that establishes a
	 * containing block for it — a transform, perspective, filter, backdrop-filter,
	 * a will-change naming any of those, or a paint/layout `contain` — and not
	 * always the viewport. This was recorded here as an unhandled risk; it is now
	 * DETECTED. fixedContainingBlock() in plan-builder.js walks the sheet's
	 * ancestors at boot, and if one of them would capture `fixed` the sheet is moved
	 * to <body> to escape it. A modal has no in-flow fallback, which is why it
	 * escapes rather than reverting the way the summary bar does. */
}

.stw-pb .stw-pb-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.45 );
}

.stw-pb .stw-pb-sheet__panel {
	position: relative;
	width: 100%;
	max-width: 34rem;
	max-height: 85vh;
	overflow-y: auto;
	padding: 16px;
	color: var( --stw-pb-fg );
	background: var( --stw-pb-bg );
	border-radius: var( --stw-pb-radius ) var( --stw-pb-radius ) 0 0;
	box-shadow: var( --stw-pb-shadow );
	transform: translateY( 12px );
	transition: transform 180ms ease-out;
}

.stw-pb.stw-pb-sheet--open .stw-pb-sheet__panel {
	transform: translateY( 0 );
}

.stw-pb .stw-pb-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.stw-pb .stw-pb-sheet__title {
	margin: 0;
	font-size: 1.125rem;
}

.stw-pb .stw-pb-sheet__close {
	min-height: var( --stw-pb-tap );
	min-width: var( --stw-pb-tap );
	padding: 8px 12px;
	text-align: center;
}

.stw-pb .stw-pb-slots {
	display: grid;
	gap: 10px;
}

.stw-pb .stw-pb-slot {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	gap: 2px 10px;
	align-items: baseline;
}

.stw-pb .stw-pb-slot__name {
	font-weight: 600;
}

.stw-pb .stw-pb-slot__count {
	color: var( --stw-pb-muted );
	font-variant-numeric: tabular-nums;
}

.stw-pb .stw-pb-slot__meter {
	grid-column: 1 / -1;
	display: block;
	height: 6px;
	overflow: hidden;
	background: var( --stw-pb-surface );
	border-radius: 999px;
}

.stw-pb .stw-pb-slot__fill {
	display: block;
	width: 0;
	height: 100%;
	background: var( --stw-pb-accent );
	transition: width 180ms ease-out;
}

@media ( min-width: 48rem ) {
	.stw-pb.stw-pb-sheet {
		align-items: center;
	}

	.stw-pb .stw-pb-sheet__panel {
		border-radius: var( --stw-pb-radius );
	}
}

/* Scroll lock. On the root element, not body — iOS Safari ignores overflow on
 * body. Set and removed by the drawer module only, and element+class specific
 * because <html> cannot carry the `.stw-pb` scope class. */
html.stw-pb-lock,
html.stw-pb-lock body {
	overflow: hidden;
}

/* -----------------------------------------------------------------------------
 * Motion
 * -------------------------------------------------------------------------- */

/* The accordion has no height animation to suppress — see the note at the top of
 * the accordion block — so all that is left here is the marker rotation, the sheet
 * and the progress meters. */
@media ( prefers-reduced-motion: reduce ) {
	.stw-pb .stw-pb-sheet__panel,
	.stw-pb .stw-pb-slot__fill,
	.stw-pb .stw-pb-acc__marker {
		transition: none;
	}

	.stw-pb .stw-pb-sheet__panel {
		transform: none;
	}
}
