/* PL Parts: approved button design, 2026-10-09. */
/* Star geometry: https://pl3dparts.fi/ .header-meta-tag::before. */
:root {
  --plparts-button-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23.8 23.8'%3E%3Cpolygon points='11.9 0 14.2 3.3 17.9 1.6 18.2 5.6 22.2 6 20.5 9.6 23.8 11.9 20.5 14.2 22.2 17.9 18.2 18.2 17.9 22.2 14.2 20.5 11.9 23.8 9.6 20.5 6 22.2 5.6 18.2 1.6 17.9 3.3 14.2 0 11.9 3.3 9.6 1.6 6 5.6 5.6 6 1.6 9.6 3.3 11.9 0'/%3E%3C/svg%3E");
}

/* Remove the existing offset frame without removing the keyboard focus ring. */
.wp-block-button::after {
  content: none;
  display: none;
}

:root :is(
  .wp-block-button__link,
  .single_add_to_cart_button,
  .woocommerce a.button,
  .woocommerce button.button,
  .wc-block-components-button:not(.is-link):not(.wc-block-components-drawer__close),
  button.wpcf7-submit
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  box-sizing: border-box;
  max-width: 100%;
  border: 0 !important;
  border-radius: 9999px !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}

:root :is(
  .wp-block-button__link,
  .single_add_to_cart_button,
  .woocommerce a.button,
  .woocommerce button.button,
  .wc-block-components-button:not(.is-link):not(.wc-block-components-drawer__close),
  button.wpcf7-submit
)::before {
  content: "";
  display: block;
  flex: 0 0 1.25em;
  width: 1.25em;
  height: 1.25em;
  background-color: currentColor;
  -webkit-mask: var(--plparts-button-star) center / contain no-repeat;
  mask: var(--plparts-button-star) center / contain no-repeat;
}

/* Some shop button variants have their own moving inner label. */
:root :is(
  .wp-block-button__link,
  .single_add_to_cart_button,
  .woocommerce a.button,
  .woocommerce button.button,
  .wc-block-components-button:not(.is-link):not(.wc-block-components-drawer__close),
  button.wpcf7-submit
) > span {
  transform: none !important;
  transition-property: color, background-color;
}

@media (min-width: 1024px) {
  :root :is(
  .wp-block-button__link,
  .single_add_to_cart_button,
  .woocommerce a.button,
  .woocommerce button.button,
  .wc-block-components-button:not(.is-link):not(.wc-block-components-drawer__close),
  button.wpcf7-submit
) {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root :is(
  .wp-block-button__link,
  .single_add_to_cart_button,
  .woocommerce a.button,
  .woocommerce button.button,
  .wc-block-components-button:not(.is-link):not(.wc-block-components-drawer__close),
  button.wpcf7-submit
) {
    transition: none;
  }
}

/* Product listings use a smaller label without a star. */
.wp-block-button.wc-block-components-product-button,
.wp-block-button.wc-block-grid__product-add-to-cart {
  max-width: 100%;
}
:root .wp-block-button.wc-block-components-product-button .wp-block-button__link,
:root .wp-block-button.wc-block-grid__product-add-to-cart .wp-block-button__link,
:root .woocommerce ul.products li.product .button {
  font-size: 1rem !important;
  padding: 0.75rem 1.2rem;
  white-space: normal;
  text-align: center;
}
:root .wp-block-button.wc-block-components-product-button .wp-block-button__link::before,
:root .wp-block-button.wc-block-grid__product-add-to-cart .wp-block-button__link::before,
:root .woocommerce ul.products li.product .button::before {
  content: none;
  display: none;
}

/* Override WooCommerce's block display on the single-product submit button. */
:root body.single-product form.cart button.single_add_to_cart_button.button {
  display: inline-flex;
  flex-flow: row nowrap;
  white-space: nowrap;
}
@media (max-width: 374px) {
  :root body.single-product form.cart:not(.variations_form):not(.grouped_form) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

/* Old block buttons paint/move the inner label separately. */
:root .wp-block-button__link > span:not(.wc-block-components-spinner) {
  min-width: 0;
  padding: 0;
  border: 0;
  background-color: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit;
  white-space: normal;
}
:root .wc-block-components-button > .wc-block-components-button__text {
  flex: 0 1 auto;
  min-width: 0;
}

/* CF7 keeps its full-width submit control and its existing mobile size. */
.wpcf7-form button.wpcf7-submit {
  width: 100%;
  padding: 0.875rem 3.75rem;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 400;
  cursor: pointer;
}

/* Keep the mini-cart's dark close icon visible, including on hover. */
:root .wp-block-woocommerce-mini-cart-contents button.wp-element-button.wc-block-components-button.wc-block-components-drawer__close {
  background-color: transparent !important;
}
