/*
 * Shared shop interface button and interaction-state contract.
 * Native WooCommerce and shipment-tracking selectors are adapters to this contract.
 */
:root {
  --storefront-control-font: var(--storefront-font-ui, "Montserrat", Arial, sans-serif);
  --storefront-control-accent: var(--storefront-color-control-primary, #6e0087);
  --storefront-control-accent-hover: var(--storefront-color-control-primary-hover, #ff672d);
  --storefront-control-accent-text: var(--storefront-color-control-primary-text, #fff);
  --storefront-control-accent-hover-text: var(--storefront-color-control-primary-hover-text, #232323);
  --storefront-control-black: var(--storefront-color-ink, #232323);
  --storefront-control-dark: var(--storefront-color-control-primary, #6e0087);
  --storefront-control-dark-hover: var(--storefront-color-control-primary-hover, #ff672d);
  --storefront-control-dark-border-hover: var(--storefront-color-control-primary-hover, #ff672d);
  --storefront-control-dark-text-hover: var(--storefront-color-control-primary-hover-text, #232323);
  --storefront-control-white: var(--storefront-color-surface, #fff);
  --storefront-control-secondary-border: var(--storefront-color-control-secondary-border, #6e0087);
  --storefront-control-disabled: var(--storefront-color-disabled, #c1c1c1);
  --storefront-control-transition: var(--storefront-button-transition, background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease);
  --storefront-control-focus-outline: 2px solid var(--storefront-color-ink, #232323);
  --storefront-control-focus-offset: 2px;
}

:is(
  .storefront-control-button,
  .storefront-account-button,
  .storefront-account-primary,
  .storefront-account-secondary,
  .storefront-account-dark
),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button,
  .woocommerce-Pagination .woocommerce-button,
  .woocommerce-order-details .order-actions-button,
  .order-again .button,
  .woocommerce-PaymentMethod--actions .button,
  .woocommerce-customer-details > .wc-action-btn,
  a.button.track-button,
  .track_button,
  .tracking-button,
  .tracking_button
) {
  --storefront-control-background: var(--storefront-control-white);
  --storefront-control-border: var(--storefront-control-secondary-border);
  --storefront-control-color: var(--storefront-control-black);
  --storefront-control-font-weight: 700;
  --storefront-control-min-width: 89px;
  --storefront-control-radius: 0;
  --storefront-control-hover-background: var(--storefront-control-white);
  --storefront-control-hover-border: var(--storefront-control-secondary-border);
  --storefront-control-hover-color: var(--storefront-control-black);
  align-items: center;
  background: var(--storefront-control-background);
  border: var(--storefront-button-border-width, 0) solid var(--storefront-control-border);
  border-radius: var(--storefront-control-radius);
  box-shadow: none;
  box-sizing: border-box;
  color: var(--storefront-control-color);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--storefront-control-font);
  font-size: var(--storefront-control-font-size, 14px);
  font-style: normal;
  font-weight: var(--storefront-control-font-weight);
  justify-content: center;
  letter-spacing: .05em;
  line-height: 22px;
  min-height: var(--storefront-button-height, 44px);
  min-width: var(--storefront-control-min-width);
  overflow: hidden;
  padding: var(--storefront-button-padding, 10px 15px);
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  transform: none;
  transition: var(--storefront-control-transition);
  user-select: none;
  vertical-align: middle;
  white-space: nowrap;
}

:is(
  .storefront-control-button--primary,
  .storefront-account-button--primary,
  .storefront-account-primary
),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button.pay,
  .woocommerce-order-details .order-actions-button.pay,
  a.button.track-button,
  .track_button,
  .tracking-button,
  .tracking_button
) {
  --storefront-control-background: var(--storefront-control-accent);
  --storefront-control-border: var(--storefront-color-primary-border);
  --storefront-control-color: var(--storefront-control-accent-text);
  --storefront-control-font-size: 14px;
  --storefront-control-font-weight: 700;
  --storefront-control-min-width: 130px;
  --storefront-control-radius: var(--storefront-button-radius, 0);
  --storefront-control-hover-background: var(--storefront-control-accent-hover);
  --storefront-control-hover-border: var(--storefront-color-primary-border);
  --storefront-control-hover-color: var(--storefront-control-accent-hover-text);
}

:is(
  .storefront-control-button--secondary,
  .storefront-account-button--secondary,
  .storefront-account-secondary
),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button:not(.pay),
  .woocommerce-order-details .order-actions-button:not(.pay),
  .woocommerce-PaymentMethod--actions .button,
  .woocommerce-customer-details > .wc-action-btn
) {
  --storefront-control-background: var(--storefront-color-control-secondary, #6e0087);
  --storefront-control-border: var(--storefront-control-secondary-border);
  --storefront-control-color: var(--storefront-color-control-secondary-text, #fff);
  --storefront-control-font-weight: 700;
  --storefront-control-min-width: 89px;
  --storefront-control-radius: 0;
  --storefront-control-hover-background: var(--storefront-color-control-secondary-hover, #6e0087);
  --storefront-control-hover-border: var(--storefront-control-secondary-border);
  --storefront-control-hover-color: var(--storefront-color-control-secondary-hover-text, #fff);
}

:is(
  .storefront-control-button--dark,
  .storefront-account-button--dark,
  .storefront-account-dark
),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-Pagination .woocommerce-button,
  .order-again .button
) {
  --storefront-control-background: var(--storefront-control-dark);
  --storefront-control-border: var(--storefront-control-dark);
  --storefront-control-color: var(--storefront-control-white);
  --storefront-control-font-weight: 600;
  --storefront-control-min-width: 130px;
  --storefront-control-radius: var(--storefront-button-radius, 0);
  --storefront-control-hover-background: var(--storefront-control-dark-hover);
  --storefront-control-hover-border: var(--storefront-control-dark-border-hover);
  --storefront-control-hover-color: var(--storefront-control-dark-text-hover);
}

:is(
  .storefront-control-button,
  .storefront-account-button,
  .storefront-account-primary,
  .storefront-account-secondary,
  .storefront-account-dark
):is(:hover, :active),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button,
  .woocommerce-Pagination .woocommerce-button,
  .woocommerce-order-details .order-actions-button,
  .order-again .button,
  .woocommerce-PaymentMethod--actions .button,
  .woocommerce-customer-details > .wc-action-btn,
  a.button.track-button,
  .track_button,
  .tracking-button,
  .tracking_button
):is(:hover, :active) {
  background: var(--storefront-control-hover-background);
  border-color: var(--storefront-control-hover-border);
  color: var(--storefront-control-hover-color);
  text-decoration: none;
}

/* Restore the selected scheme after a cancelled pointer click leaves focus behind. */
:is(
  .storefront-control-button--primary,
  .storefront-account-button--primary,
  .storefront-account-primary
):focus:not(:hover):not(:active),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button.pay,
  .woocommerce-order-details .order-actions-button.pay,
  a.button.track-button,
  .track_button,
  .tracking-button,
  .tracking_button
):focus:not(:hover):not(:active) {
  background: var(--storefront-control-background);
  border-color: var(--storefront-control-border);
  color: var(--storefront-control-color);
  text-decoration: none;
}

:is(
  .storefront-control-button--secondary,
  .storefront-account-button--secondary,
  .storefront-account-secondary
):focus:not(:hover):not(:active),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button:not(.pay),
  .woocommerce-order-details .order-actions-button:not(.pay),
  .woocommerce-PaymentMethod--actions .button,
  .woocommerce-customer-details > .wc-action-btn
):focus:not(:hover):not(:active) {
  background: var(--storefront-control-background);
  border-color: var(--storefront-control-border);
  color: var(--storefront-control-color);
  text-decoration: none;
}

:is(
  .storefront-control-button--dark,
  .storefront-account-button--dark,
  .storefront-account-dark
):focus,
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-Pagination .woocommerce-button,
  .order-again .button
):focus {
  background: var(--storefront-control-hover-background);
  border-color: var(--storefront-control-hover-border);
  color: var(--storefront-control-hover-color);
}

:is(
  .storefront-control-button,
  .storefront-account-button,
  .storefront-account-primary,
  .storefront-account-secondary,
  .storefront-account-dark
):focus,
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button,
  .woocommerce-Pagination .woocommerce-button,
  .woocommerce-order-details .order-actions-button,
  .order-again .button,
  .woocommerce-PaymentMethod--actions .button,
  .woocommerce-customer-details > .wc-action-btn,
  a.button.track-button,
  .track_button,
  .tracking-button,
  .tracking_button
):focus {
  outline: none;
}

:is(
  .storefront-control-button,
  .storefront-account-button,
  .storefront-account-primary,
  .storefront-account-secondary,
  .storefront-account-dark
):focus-visible,
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button,
  .woocommerce-Pagination .woocommerce-button,
  .woocommerce-order-details .order-actions-button,
  .order-again .button,
  .woocommerce-PaymentMethod--actions .button,
  .woocommerce-customer-details > .wc-action-btn,
  a.button.track-button,
  .track_button,
  .tracking-button,
  .tracking_button
):focus-visible {
  outline: var(--storefront-control-focus-outline);
  outline-offset: var(--storefront-control-focus-offset);
}

:is(
  .storefront-control-button,
  .storefront-account-button,
  .storefront-account-primary,
  .storefront-account-secondary
):is(:disabled, [disabled], [aria-disabled="true"], .disabled),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-orders-table__cell-order-actions .button,
  .woocommerce-order-details .order-actions-button,
  .woocommerce-PaymentMethod--actions .button,
  .woocommerce-customer-details > .wc-action-btn,
  a.button.track-button,
  .track_button,
  .tracking-button,
  .tracking_button
):is(:disabled, [disabled], [aria-disabled="true"], .disabled) {
  background: var(--storefront-control-background);
  border-color: var(--storefront-control-border);
  color: var(--storefront-control-color);
  cursor: not-allowed;
  opacity: .6;
  pointer-events: none;
}

:is(
  .storefront-control-button--dark,
  .storefront-account-button--dark,
  .storefront-account-dark
):is(:disabled, [disabled], [aria-disabled="true"], .disabled),
body.woocommerce-account .woocommerce-MyAccount-content :is(
  .woocommerce-Pagination .woocommerce-button,
  .order-again .button
):is(:disabled, [disabled], [aria-disabled="true"], .disabled) {
  background: var(--storefront-control-background);
  border-color: var(--storefront-control-border);
  color: var(--storefront-control-color);
  cursor: not-allowed;
  opacity: .6;
  pointer-events: none;
}

@media (max-width: 600px) {
  body.woocommerce-account .woocommerce-MyAccount-content a.button.track-button {
    display: flex;
    width: 100%;
  }
}
