/*
 * Captain Greek cart delete pseudo final.
 *
 * Delete-button only.
 * Does not touch footer, quantity, product layout, images, or templates.
 *
 * Reason:
 * Old cart layers force/hide delete icons through .minicart-items .action.delete::before.
 * This final layer uses stronger scoped pseudo-elements on the actual anchor.
 */

/* Current patched-template location: inside .details-qty.qty */
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-delete-under-qty,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-sidecart-delete-ready,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-delete-pseudo-final-ready {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;

  translate: none !important;
  transform: none !important;

  box-sizing: border-box !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;

  justify-self: center !important;
  align-self: center !important;

  width: auto !important;
  min-width: 94px !important;
  max-width: 100% !important;

  height: 31px !important;
  min-height: 31px !important;
  max-height: 31px !important;

  margin: 3px auto 0 !important;
  padding: 0 12px !important;

  border-radius: 999px !important;
  border: 1px solid rgba(180, 83, 9, .26) !important;

  color: #7f1d1d !important;
  -webkit-text-fill-color: #7f1d1d !important;

  background: rgba(255, 247, 237, .96) !important;
  text-decoration: none !important;

  font-family: var(--cg-font, "Inter", "Helvetica Neue", Arial, sans-serif) !important;
  font-size: 0 !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
  text-indent: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;

  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;

  overflow: visible !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 4px 12px rgba(127,29,29,.06) !important;
}

/*
 * Hide the inner children visually.
 * We render the visible icon/text with ::before and ::after so old span/SVG hiding rules no longer matter.
 */
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete > span,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete > svg {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

/* Trash icon rendered by CSS mask. This beats old mbicon pseudo rules. */
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete::before,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-delete-under-qty::before,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-sidecart-delete-ready::before,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-delete-pseudo-final-ready::before {
  content: "" !important;

  position: static !important;
  inset: auto !important;

  display: inline-block !important;
  flex: 0 0 14px !important;

  width: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;

  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;

  margin: 0 !important;
  padding: 0 !important;

  background-color: currentColor !important;
  color: currentColor !important;

  font-size: 0 !important;
  line-height: 1 !important;

  opacity: 1 !important;
  visibility: visible !important;

  transform: none !important;
  translate: none !important;

  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 16H6L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/g%3E%3C/svg%3E")
    center / contain no-repeat !important;

  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 16H6L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/g%3E%3C/svg%3E")
    center / contain no-repeat !important;
}

/* Text rendered by CSS, independent of hidden child spans. */
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete::after,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-delete-under-qty::after,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-sidecart-delete-ready::after,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete.cg-delete-pseudo-final-ready::after {
  content: "Remove" !important;

  position: static !important;
  inset: auto !important;

  display: inline-block !important;

  width: auto !important;
  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  color: currentColor !important;
  -webkit-text-fill-color: currentColor !important;

  font-family: var(--cg-font, "Inter", "Helvetica Neue", Arial, sans-serif) !important;
  font-size: 11.5px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
  text-indent: 0 !important;
  white-space: nowrap !important;

  opacity: 1 !important;
  visibility: visible !important;

  transform: none !important;
  translate: none !important;
}

/* Old-template fallback: if a stale item still has delete in .product.actions. */
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .product.actions .secondary > a.action.delete {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;

  width: auto !important;
  min-width: 94px !important;
  height: 31px !important;
  min-height: 31px !important;

  margin: 0 auto !important;
  padding: 0 12px !important;

  border-radius: 999px !important;
  border: 1px solid rgba(180, 83, 9, .26) !important;

  color: #7f1d1d !important;
  -webkit-text-fill-color: #7f1d1d !important;

  background: rgba(255, 247, 237, .96) !important;
  text-decoration: none !important;
  font-size: 0 !important;

  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .product.actions .secondary > a.action.delete::before {
  content: "" !important;
  display: inline-block !important;
  flex: 0 0 14px !important;
  width: 14px !important;
  height: 14px !important;
  background-color: currentColor !important;
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 16H6L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/g%3E%3C/svg%3E")
    center / contain no-repeat !important;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 16H6L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/g%3E%3C/svg%3E")
    center / contain no-repeat !important;
}

html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .product.actions .secondary > a.action.delete::after {
  content: "Remove" !important;
  display: inline-block !important;
  color: currentColor !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 11.5px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

/* Stable hover: no jumping. */
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete:hover,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete:focus-visible,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .product.actions .secondary > a.action.delete:hover,
html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .product.actions .secondary > a.action.delete:focus-visible {
  color: #7f1d1d !important;
  -webkit-text-fill-color: #7f1d1d !important;
  background: #fff7ed !important;
  border-color: rgba(180, 83, 9, .38) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.74),
    0 5px 14px rgba(127,29,29,.08) !important;
  transform: none !important;
  outline: none !important;
}

@media (max-width: 767px) {
  html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete,
  html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .product.actions .secondary > a.action.delete {
    min-width: 86px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 10px !important;
    gap: 5px !important;
  }

  html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete::before,
  html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .product.actions .secondary > a.action.delete::before {
    width: 13px !important;
    height: 13px !important;
    flex-basis: 13px !important;
  }

  html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .details-qty.qty > a.action.delete::after,
  html body .mfp-wrap.cart-modal #mini-cart.minicart-items li.product-item .product.actions .secondary > a.action.delete::after {
    font-size: 11px !important;
  }
}
