/* ==== partial: 09-control-geometry.css ====
   Shared control geometry. Must load after 01-08: it normalises the geometry of the components defined there. The commerce half lives in woocommerce/04-control-geometry.css.
   ======================================================================== */

/* 18. Shared control geometry (absorbed from design-system.css) ----------- */

/* Generic half of the former design-system layer; the WooCommerce half of the
   same rules lives at the end of woocommerce.css so both keep loading after
   their dependents, exactly as the priority-25/30 split used to.

   Repeat the scope to beat legacy component geometry without !important.
   Colours and interaction states remain owned by the component variants.
   The :not keeps this rule above the is-style variants and the section 19
   CTA metrics, mirroring the specificity of the original shared list. */
:is(.wp-site-blocks, .editor-styles-wrapper, .demande-gl) :is(
	.wp-block-button__link, .demande-button,
	input[type="submit"]:not(.wc-block-components-button),
	.demande-gl-tabs a
) {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--demande-space-1);
	min-height: var(--demande-control-height);
	height: auto;
	border-width: 1px;
	border-style: solid;
	border-radius: var(--demande-radius);
	font-family: var(--demande-font-body);
	font-size: var(--demande-control-font-size);
	font-weight: var(--demande-control-weight);
	line-height: var(--demande-control-line-height);
	letter-spacing: normal;
	text-transform: none;
	padding: var(--demande-control-padding-block) var(--demande-control-padding-inline);
	white-space: normal;
	text-align: center;
}

:is(.wp-site-blocks, .editor-styles-wrapper) .wp-block-button.is-style-demande-tertiary .wp-block-button__link {
	min-height: var(--demande-control-height);
	padding-inline: 0;
}

:is(.wp-site-blocks, .editor-styles-wrapper, .demande-gl) :is(
	input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]),
	select, textarea
) {
	box-sizing: border-box;
	min-height: var(--demande-field-min-height, var(--demande-control-height));
	height: var(--demande-field-height, var(--demande-control-height));
	padding: var(--demande-control-padding-block) var(--demande-space-2);
	padding-block: var(--demande-field-padding-block, var(--demande-control-padding-block));
	padding-inline: var(--demande-field-padding-inline, var(--demande-space-2));
	font-family: var(--demande-font-body);
	font-size: var(--demande-control-font-size);
	font-weight: 400;
	line-height: var(--demande-control-line-height);
	border-radius: var(--demande-radius);
}

:is(.wp-site-blocks, .editor-styles-wrapper, .demande-gl) textarea {
	--demande-field-height: auto;
	--demande-field-min-height: 6rem;
	height: auto;
	min-height: 6rem;
}

:is(.wp-site-blocks, .editor-styles-wrapper, .demande-gl) select:not([multiple]):not([size]) {
	--demande-field-padding-inline: var(--demande-space-2) 2.5rem;
	padding-inline-end: 2.5rem;
}

:is(.wp-site-blocks, .editor-styles-wrapper, .demande-gl) :is(.demande-gl-link, .demande-gl-reserve summary, .demande-disclosure__summary) {
	display: inline-flex;
	align-items: center;
	gap: var(--demande-space-1);
	min-height: var(--demande-control-height);
	font-family: var(--demande-font-body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}

/* Plugin templates put the variation class on the link itself. */
:is(.wp-site-blocks, .editor-styles-wrapper, .demande-gl) .wp-block-button__link.is-style-demande-secondary {
	background: transparent;
	border-color: var(--demande-primary);
	color: var(--demande-primary);
}

:is(.wp-site-blocks, .editor-styles-wrapper, .demande-gl) .wp-block-button__link.is-style-demande-secondary:hover,
:is(.wp-site-blocks, .editor-styles-wrapper, .demande-gl) .wp-block-button__link.is-style-demande-secondary:focus-visible {
	background: var(--demande-primary-soft);
	color: var(--demande-primary-hover);
}

/* Labels stay compact; readable field values and actions use the same type.
   The gift-list plugin renders outside every theme component, so its
   controls are re-normalised here on top of the plugin stylesheet. */
.demande-gl {
	--gl-control: var(--demande-control-height, 48px);
	font-family: var(--demande-font-body);
	line-height: 1.6;
}

.demande-gl-title {
	font-family: var(--demande-font-heading);
	font-size: var(--wp--preset--font-size--heading-1);
	font-weight: 400;
	line-height: 1.16;
}

:is(.demande-section__head, .demande-gl-head) {
	gap: var(--demande-space-1) var(--demande-space-3);
	margin-block-end: var(--demande-space-3);
}

:is(.demande-hero__actions, .demande-gl-head__actions, .demande-gl-actions, .wp-block-buttons) {
	gap: var(--demande-space-2);
}

:is(.demande-grid, .demande-gl-grid) {
	gap: var(--demande-space-2);
}

.demande-section__titles > * + * {
	margin-block-start: var(--demande-space-1);
}

:is(.demande-lede, .is-style-demande-lede, .demande-gl-lede) {
	font-size: var(--wp--preset--font-size--large, 1.125rem);
	line-height: 1.6;
}

:is(.demande-eyebrow, .is-style-demande-eyebrow, .demande-gl-eyebrow, .demande-section__titles > p:first-child) {
	font-family: var(--demande-font-body);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 600;
	letter-spacing: var(--demande-tracking-label);
}

