/* LuckyEmma Dual Sale Badges v0.3.1 -- Kadence, WooCommerce and Elementor. */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce div.product,
.le-badges-anchor { position: relative; }

/* Common visual treatment. The parent of an overlay must be positioned. */
.le-dual-badges {
  display: inline-flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  line-height: 1.2;
  text-align: left;
  font-size: inherit;
  z-index: 12;
}

.le-dual-badges.le-auto,
.woocommerce span.onsale.le-dual-badges.le-auto,
.woocommerce-page span.onsale.le-dual-badges.le-auto {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  bottom: auto;
  display: inline-flex;
  width: max-content;
  height: auto;
  min-height: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  z-index: 12;
}

/* The shortcode defaults to normal document flow, suitable for Loop Item. */
.le-dual-badges.le-inline { position: relative; top: auto; left: auto; }
.le-dual-badges.le-overlay { position: absolute; top: 12px; left: 12px; }

.le-dual-badges .le-badge,
.woocommerce .le-dual-badges .le-badge,
.woocommerce-page .le-dual-badges .le-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 6px 9px;
  border: 0;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.15px;
  color: #fff;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
}
.le-dual-badges .le-campaign { background: #292929; }
.le-dual-badges .le-percent { background: #d65a70; }

/* Avoid introducing clipping/overflow into existing image/card templates. */
@media (max-width: 767px) {
  .le-dual-badges { gap: 4px; }
  .le-dual-badges.le-auto,
  .woocommerce span.onsale.le-dual-badges.le-auto,
  .woocommerce-page span.onsale.le-dual-badges.le-auto,
  .le-dual-badges.le-overlay { top: 7px; left: 7px; }
  .le-dual-badges .le-badge,
  .woocommerce .le-dual-badges .le-badge,
  .woocommerce-page .le-dual-badges .le-badge {
    padding: 4px 6px;
    font-size: 9px;
    letter-spacing: 0;
  }
}

/* Keep one badge set if a manually inserted Loop Item shortcode and
 * an automatic WooCommerce badge are present in the same card.
 * On browsers without :has(), disable Automatic Badges in settings. */
.woocommerce li.product:has(.le-shortcode) > .le-auto,
.woocommerce li.product:has(.le-shortcode) .woocommerce-loop-product__link > .le-auto,
.le-badges-anchor:has(.le-shortcode) > .le-auto { display: none !important; }
