/**
 * @file
 * AJAX add to cart: button spinner, inline messages, notification, cart
 * highlight.
 */
/* Spinner inside the add to cart button while the AJAX request runs. The
   label stays (transparent), so the button keeps its size. */
form[data-dc-store-atc] [type="submit"].is-loading,
form[data-dc-store-atc] [type="submit"].is-loading:disabled {
  color: transparent !important;
  text-shadow: none;
  cursor: progress;
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23fff' stroke-opacity='.35' stroke-width='3'/%3E%3Cpath d='M12 3a9 9 0 0 1 9 9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.7s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.dc-store-atc__messages:empty {
  display: none;
}
.dc-store-atc__messages {
  margin-top: 8px;
  font-size: 0.85rem;
}
.dc-store-atc__messages .messages {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
}

/* "Added to cart" notification. */
.dc-store-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1260;
  width: 360px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(40, 20, 40, 0.22), 0 2px 6px rgba(40, 20, 40, 0.08);
  font-family: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.dc-store-toast.is-visible {
  opacity: 1;
  transform: none;
}
.dc-store-toast__body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 12px;
}
.dc-store-toast__image {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #faf8fa;
  overflow: hidden;
}
.dc-store-toast__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.dc-store-toast__text {
  flex: 1;
  min-width: 0;
}
.dc-store-toast__text p {
  margin: 0;
}
.dc-store-toast__heading {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #864587;
}
.dc-store-toast__check {
  flex: none;
  width: 16px;
  height: 16px;
}
.dc-store-toast__title {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dc-store-toast__price {
  font-size: 0.85rem;
  font-weight: 700;
}
.dc-store-toast__close {
  flex: none;
  align-self: flex-start;
  display: inline-flex;
  width: 28px;
  height: 28px;
  margin: -4px -4px 0 0;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #888;
  cursor: pointer;
}
.dc-store-toast__close:hover,
.dc-store-toast__close:focus-visible {
  background: #f5edf5;
  color: #864587;
}
.dc-store-toast__close svg {
  width: 100%;
  height: 100%;
}
.dc-store-toast .dc-store-toast__cart,
.dc-store-toast .dc-store-toast__cart:visited {
  display: block;
  margin: 0 14px 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #864587;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.dc-store-toast .dc-store-toast__cart:hover,
.dc-store-toast .dc-store-toast__cart:focus-visible {
  background: #733a79;
  color: #fff;
}
/* Remaining time; its animationend closes the notification (JS). */
.dc-store-toast__timer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: #864587;
  opacity: 0.35;
  transform-origin: left;
  animation: dc-store-toast-timer var(--dc-store-toast-duration, 5s) linear forwards;
}
.dc-store-toast:hover .dc-store-toast__timer,
.dc-store-toast:focus-within .dc-store-toast__timer {
  animation-play-state: paused;
}
@keyframes dc-store-toast-timer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
@media (max-width: 600px) {
  .dc-store-toast {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    transform: translateY(12px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dc-store-toast {
    transition: none;
  }
}

.dc-store-cart-bump {
  animation: dc-store-bump 900ms ease;
}
@keyframes dc-store-bump {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.15); }
  60% { transform: scale(0.97); }
}
@media (prefers-reduced-motion: reduce) {
  .dc-store-cart-bump {
    animation: none;
  }
}
