/*
 * Cart confirmation shared by all product pages.
 * Existing JavaScript keeps control of visibility and the three-second redirect.
 */
#custom-overlay.cart-added-overlay {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  background: rgba(15, 23, 42, 0.52) !important;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  z-index: 1200 !important;
}

#custom-alert.cart-added-modal {
  display: none;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(calc(100vw - 2.4rem), 37rem) !important;
  max-width: min(calc(100vw - 2.4rem), 37rem) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  isolation: isolate;
  background: #ffffff !important;
  border: 1px solid rgba(30, 64, 175, 0.22) !important;
  border-radius: 0 !important;
  box-shadow: 0 2.4rem 5.8rem rgba(15, 23, 42, 0.3) !important;
  text-align: left !important;
  z-index: 1201 !important;
  animation: cart-added-modal-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#custom-alert.cart-added-modal::before,
#custom-alert.cart-added-modal::after {
  content: none !important;
  display: none !important;
}

#custom-alert.cart-added-modal img {
  display: none !important;
}

.cart-added-modal__content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.45rem;
  min-height: 12.4rem;
  padding: 2.35rem 2.45rem 2.25rem;
  background:
    radial-gradient(circle at 92% 8%, rgba(30, 64, 175, 0.12), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
}

.cart-added-modal__content::after {
  content: "";
  position: absolute;
  right: -4.8rem;
  bottom: -5.2rem;
  width: 13rem;
  height: 13rem;
  border: 1.4rem solid rgba(30, 64, 175, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.cart-added-modal__icon {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 5.25rem;
  width: 5.25rem;
  height: 5.25rem;
  place-items: center;
  color: #ffffff;
  font-size: 2.25rem;
  background: linear-gradient(145deg, #3b82f6 0%, #1e40af 100%);
  border-radius: 0;
  box-shadow: 0 1.1rem 2.2rem rgba(30, 64, 175, 0.28);
}

.cart-added-modal__check {
  position: absolute;
  right: -0.5rem;
  bottom: -0.5rem;
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  color: #ffffff;
  font-size: 1rem;
  background: #20a15b;
  border: 0.3rem solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0.45rem 0.9rem rgba(26, 125, 70, 0.24);
}

.cart-added-modal__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.cart-added-modal__eyebrow {
  display: block;
  margin-bottom: 0.3rem;
  color: #1e40af;
  font-size: 1.13rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

#custom-alert.cart-added-modal h3 {
  margin: 0 !important;
  color: #141a20 !important;
  font-size: clamp(1.72rem, 3vw, 2.15rem) !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

#custom-alert.cart-added-modal h3::after {
  content: none !important;
  display: none !important;
}

.cart-added-modal__copy p {
  margin: 0.6rem 0 0;
  color: #65717d;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.42;
}

@media (min-width: 769px) {
  #custom-alert.cart-added-modal h3 {
    font-size: calc(clamp(1.72rem, 3vw, 2.15rem) - 1px) !important;
  }
}

.cart-added-modal__progress {
  height: 0.55rem;
  background: #dbeafe;
}

.cart-added-modal__progress > span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #1e40af 0%, #60a5fa 100%);
  animation: cart-added-modal-progress 3s linear forwards;
}

@keyframes cart-added-modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.94) !important;
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) !important;
  }
}

@keyframes cart-added-modal-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@media (max-width: 420px) {
  #custom-alert.cart-added-modal {
    width: min(calc(100vw - 1.7rem), 34rem) !important;
    max-width: min(calc(100vw - 1.7rem), 34rem) !important;
    border-radius: 0 !important;
  }

  .cart-added-modal__content {
    gap: 1.15rem;
    min-height: 10.7rem;
    padding: 1.9rem 1.65rem 1.8rem;
  }

  .cart-added-modal__icon {
    flex-basis: 4.45rem;
    width: 4.45rem;
    height: 4.45rem;
    font-size: 1.9rem;
    border-radius: 0;
  }

  #custom-alert.cart-added-modal h3 {
    font-size: 1.62rem !important;
  }

  .cart-added-modal__copy p {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #custom-alert.cart-added-modal,
  .cart-added-modal__progress > span {
    animation: none;
  }
}
