/*
 * Shared shop interface button and interaction-state contract.
 * Native WooCommerce and shipment-tracking selectors are adapters to this contract.
 */
:root {
  --storefront-control-font: "Jost", Arial, sans-serif;
  --storefront-control-yellow: #ffcc00;
  --storefront-control-black: #000;
  --storefront-control-dark: #202020;
  --storefront-control-dark-hover: #393939;
  --storefront-control-dark-border-hover: #1c1c1c;
  --storefront-control-dark-text-hover: #e2e2e2;
  --storefront-control-white: #fff;
  --storefront-control-secondary-border: #5a5a5a;
  --storefront-control-disabled: #c1c1c1;
  --storefront-control-transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  --storefront-control-focus-outline: 2px solid #000;
  --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-yellow);
  --storefront-control-hover-border: var(--storefront-control-yellow);
  --storefront-control-hover-color: var(--storefront-control-black);
  align-items: center;
  background: var(--storefront-control-background);
  border: 1px 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: 15px;
  font-style: normal;
  font-weight: var(--storefront-control-font-weight);
  justify-content: center;
  letter-spacing: 0;
  line-height: 23px;
  min-height: 51px;
  min-width: var(--storefront-control-min-width);
  overflow: hidden;
  padding: 14px 15px 12px;
  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-yellow);
  --storefront-control-border: var(--storefront-control-yellow);
  --storefront-control-color: var(--storefront-control-black);
  --storefront-control-font-weight: 600;
  --storefront-control-min-width: 130px;
  --storefront-control-radius: 3px;
  --storefront-control-hover-background: var(--storefront-control-white);
  --storefront-control-hover-border: var(--storefront-control-black);
  --storefront-control-hover-color: var(--storefront-control-black);
}

: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-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-yellow);
  --storefront-control-hover-border: var(--storefront-control-yellow);
  --storefront-control-hover-color: var(--storefront-control-black);
}

: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: 3px;
  --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: default;
  opacity: 0.55;
  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-disabled);
  border-color: var(--storefront-control-disabled);
  color: var(--storefront-control-white);
  cursor: default;
  opacity: 1;
  pointer-events: none;
}

@media (max-width: 600px) {
  body.woocommerce-account .woocommerce-MyAccount-content a.button.track-button {
    display: flex;
    width: 100%;
  }
}
