/* Purchased items: distinguish Download from the gold Add To Cart action. */
.sdeb-download-button,
.woocommerce a.button.sdeb-download-button,
.woocommerce button.button.sdeb-download-button,
.woocommerce .summary a.button.sdeb-download-button,
.woocommerce ul.products li.product a.button.sdeb-download-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  min-height: 38px;
  padding: 7px 16px;
  border: 2px solid var(--sdeb-gold, #ffb400) !important;
  border-radius: 4px;
  background: #000 !important;
  color: var(--sdeb-gold, #ffb400) !important;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none !important;
  text-align: center;
  cursor: pointer;
}
.sdeb-download-button:hover,
.sdeb-download-button:focus-visible,
.woocommerce a.button.sdeb-download-button:hover,
.woocommerce a.button.sdeb-download-button:focus-visible {
  background: var(--sdeb-gold, #ffb400) !important;
  color: #000 !important;
}
.woocommerce a.button.sdeb-download-button:focus-visible,
.sdeb-download-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.sdeb-download-button::before { content: none !important; display: none !important; }
.single-product.woocommerce div.product .summary a.button.sdeb-single-download {
  display: flex;
  width: 300px;
  max-width: 100%;
  min-height: 46px;
  margin: 0 auto;
  font-size: 15px;
}
.woocommerce .summary a.button.sdeb-single-download[hidden],
.woocommerce a.button.sdeb-single-download[hidden] { display: none !important; }
.single-product.woocommerce div.product .summary form.cart.sdeb-owned-download-active .single_add_to_cart_button {
  display: none !important;
}
/* Keep the site's related product cards centered, including owned items. */
.woocommerce section.related.products ul.products li.product a.button.sdeb-download-button {
  display: flex;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 8px 18px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .woocommerce section.related.products ul.products li.product a.button.sdeb-download-button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Collection, shop, homepage and related cards: place the existing cart pictogram after text.
   WooCommerce's more-specific loop rules otherwise override the flex layout on archives. */
.woocommerce ul.products li.product a.button.sdeb-standard-cart,
.woocommerce .sdeb-card a.button.sdeb-standard-cart,
.woocommerce .sdeb-tile a.button.sdeb-standard-cart,
.sdeb-card a.button.sdeb-standard-cart,
.sdeb-tile a.button.sdeb-standard-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
}
.woocommerce ul.products li.product a.button.sdeb-standard-cart::before,
.woocommerce .sdeb-card a.button.sdeb-standard-cart::before,
.woocommerce .sdeb-tile a.button.sdeb-standard-cart::before,
.sdeb-card a.button.sdeb-standard-cart::before,
.sdeb-tile a.button.sdeb-standard-cart::before {
  display: inline-block;
  position: static;
  float: none;
  order: 1;
  flex: 0 0 auto;
  margin: 0 0 0 .42em;
  vertical-align: middle;
}

/* Download: compact pictogram on the right, matching the cart icon's currentColor.
   No decorative elements are added to the product HTML or its download permissions. */
a.button.sdeb-download-button::after,
.woocommerce a.button.sdeb-download-button::after {
  content: "" !important;
  display: inline-block !important;
  position: static;
  float: none;
  order: 1;
  flex: 0 0 auto;
  width: .98em;
  height: .98em;
  margin: 0 0 0 .42em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m-4-4 4 4 4-4'/%3E%3Cpath d='M5 17v3h14v-3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m-4-4 4 4 4-4'/%3E%3Cpath d='M5 17v3h14v-3'/%3E%3C/svg%3E") center / contain no-repeat;
}
