/* ALOV_SIZE_PICKER_OVERLAP_V1
   The size chooser visually replaces the cart trigger while preserving its exact anchor. */
#modal-product .detail-actions {
  position: relative;
}

#modal-product .detail-actions.size-picker-open {
  padding-bottom: var(--alov-size-picker-space, 220px) !important;
  position: relative;
  z-index: 80;
}

/* `display:inline-flex` on the button overrides the browser's default [hidden] rule.
   Keep its footprint as an invisible anchor so the picker can sit exactly over it. */
#modal-product #detail-cart-trigger[hidden] {
  display: inline-flex !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#modal-product #modal-size-picker.is-visible {
  display: block !important;
  position: absolute !important;
  top: 12px !important;
  left: 0 !important;
  right: auto !important;
  margin: 0 !important;
  width: min(100%, 360px) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  z-index: 90 !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .3);
}

/* On desktop the picker may extend past the lower edge of the product dialog. */
@media (min-width: 761px) {
  #modal-product .product-detail-dialog.size-picker-open {
    overflow: visible !important;
  }
}

@media (max-width: 760px) {
  #modal-product .detail-actions.size-picker-open {
    padding-bottom: var(--alov-size-picker-space, 220px) !important;
  }

  #modal-product #modal-size-picker.is-visible {
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
