/* =============================================================================
   Shared soft corners
   -----------------------------------------------------------------------------
   The same 12px radius is applied to every interactive or card-like surface.
   Circular swatches, status dots and already-pill-shaped filter controls keep
   their semantic shape.
   ============================================================================= */

body:not(.wp-admin) :where(
	button,
	input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']),
	select,
	textarea,
	.ec-media,
	.ec-media-pending,
	.ec-card,
	.ec-card__media,
	.ec-card__quick,
	.ec-collection__media,
	.ec-campaign__media,
	.ec-studio__media,
	.ec-herocard,
	.ec-film__media,
	.ec-abouthero__img,
	.ec-contact-assist__image,
	.ec-contact-notice,
	.ec-contact-details__item,
	.ec-contact-form,
	.ec-contact-newsletter,
	.ec-mega,
	.ec-mega__feature,
	.ec-lightbox__img,
	.ec-pw-product__media,
	.ec-pw-product__quickshop,
	.ec-pw-look,
	.ec-pw-look__media,
	.ec-pw-mood,
	.ec-pw-edit__media,
	.ec-pw-button,
	.ec-edit-button,
	.ec-edit-product__quick,
	.ec-pdp__image,
	.ec-pdp__relatedcard,
	.ec-pdp__relatedimage,
	.ec-pdp__sizes label,
	.ec-pdp__quantity,
	.ec-store__drawer,
	.ec-search__dialog,
	.ec-store__checkout,
	.ec-checkout__summary,
	.ec-checkout__payment,
	.ec-checkout__payment-panel,
	.ec-checkout__delivery-option,
	.ec-checkout__quantity,
	.ec-checkout__item img,
	.ec-checkout__shop,
	.ec-checkout__submit,
	.ec-checkout__address-type label > span,
	.woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
	.woocommerce ul.products li.product img,
	.woocommerce div.product .woocommerce-product-gallery img,
	.woocommerce .woocommerce-message,
	.woocommerce .woocommerce-info,
	.woocommerce .woocommerce-error,
	.woocommerce .cart,
	.woocommerce table.shop_table
) {
	border-radius: var(--ec-radius) !important;
}

/* Zoomable image containers must clip their rounded image inside the frame. */
body:not(.wp-admin) :where(
	.ec-media,
	.ec-card__media,
	.ec-collection__media,
	.ec-campaign__media,
	.ec-studio__media,
	.ec-film__media,
	.ec-abouthero__img,
	.ec-contact-assist__image,
	.ec-pw-product__media,
	.ec-pw-look__media,
	.ec-pw-edit__media,
	.ec-pwc-edit,
	.ec-pwc-closing,
	.ec-pdp__image,
	.ec-pdp__relatedimage,
	.woocommerce ul.products li.product a.woocommerce-LoopProduct-link
) { overflow: hidden; }

/* These controls intentionally communicate a colour or compact filter state. */
body:not(.wp-admin) :where(
	.ec-pw-product-filter button,
	.ec-pdp__swatches label,
	.ec-pdp__wishlist,
	.ec-pw-product__wishlist,
	.ec-action__badge
) { border-radius: 999px !important; }

/* Navigation and catalogue filters are text controls, not pills. Keep their
   geometry completely flat so the animated rule is the only state marker. */
body:not(.wp-admin) :where(
	.ec-nav__link,
	.ec-linen-index__filters button,
	.ec-pw-product-filter button,
	.woocommerce div.product .woocommerce-tabs ul.tabs li,
	.woocommerce div.product .woocommerce-tabs ul.tabs li a,
	/* The Custom Make booking fields are drawn as a single rule under the
	   text, not as boxes. A radius on a border-bottom-only control curves the
	   ends of that rule, which is the one thing it must not do. */
	.ec-custom-make__field input,
	.ec-custom-make__field select,
	.ec-custom-make__field textarea,
	.ec-custom-make__select__button
) { border-radius: 0 !important; }

@media (max-width: 640px) {
	body:not(.wp-admin) :where(
		.ec-store__drawer,
		.ec-search__dialog,
		.ec-contact-form,
		.woocommerce .cart,
		.woocommerce table.shop_table
	) { border-radius: 10px !important; }
}
