.stock-alert {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  min-height: 28px;
  margin: 8px 0 9px;
  padding: 5px 10px;
  border: 1px solid #ffd0d6;
  border-radius: 8px;
  background: #fff;
  color: #c90012;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  transition: box-shadow .35s ease, background-color .35s ease, transform .35s ease;
  animation: stockAlertPulse 2.8s ease-in-out infinite;
}

.stock-alert::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: -55%;
  width: 38%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(239,68,68,.13), transparent);
  transform: skewX(-18deg);
  animation: stockAlertShine 4s ease-in-out infinite;
}

.stock-alert > span {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #eb001b;
  animation: stockDotPulse 1.6s ease-in-out infinite;
}

.stock-alert strong {
  display: inline-block;
  min-width: 2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transform-origin: center;
  margin: 0 3px;
}

.stock-alert.is-updating {
  background-color: rgba(254,226,226,.96);
  box-shadow: 0 5px 16px -10px rgba(220,38,38,.9);
  transform: translateY(-1px);
  animation: none;
}

.stock-alert.is-updating strong {
  animation: stockDrop .58s cubic-bezier(.22,1,.36,1);
}

@keyframes stockDrop {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  42% { opacity: 0; transform: translateY(6px) scale(.88); }
  43% { opacity: 0; transform: translateY(-6px) scale(.88); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes stockAlertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(235,0,27,0); }
  50% { box-shadow: 0 5px 16px -10px rgba(220,38,38,.85), 0 0 0 2px rgba(235,0,27,.045); }
}

@keyframes stockAlertShine {
  0%, 60% { left: -55%; }
  82%, 100% { left: 130%; }
}

@keyframes stockDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.72); opacity: .62; }
}

.instruction {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef0f2;
  color: #66758a;
  font-size: 12px;
  line-height: 1.45;
}

.instruction b,
.instruction strong {
  color: #111827;
}

.palette-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  color: #66758a;
}

.palette-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.palette-icon circle {
  fill: currentColor;
  stroke: none;
}

.shipping {
  border-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .stock-alert,
  .stock-alert::after,
  .stock-alert > span,
  .stock-alert.is-updating strong {
    animation: none;
    transition: none;
  }
}
