/* PublicBoost Orders: a continuous, restrained status/action glow.
   No card layout, order status, wallet, provider or click behavior changes. */
@keyframes pbOrderStatusBreath {
  0%,100% {
    box-shadow:0 0 0 0 transparent;
  }
  50% {
    box-shadow:0 0 0 2px color-mix(in srgb,currentColor 11%,transparent),
               0 0 15px color-mix(in srgb,currentColor 9%,transparent);
  }
}
@keyframes pbOrderDotBreath {
  0%,100% {
    transform:scale(1);
    box-shadow:0 0 0 3px color-mix(in srgb,currentColor 13%,transparent),
               0 0 5px color-mix(in srgb,currentColor 26%,transparent);
  }
  50% {
    transform:scale(1.10);
    box-shadow:0 0 0 5px color-mix(in srgb,currentColor 9%,transparent),
               0 0 12px color-mix(in srgb,currentColor 35%,transparent);
  }
}
@keyframes pbOrderActionBreath {
  0%,100% {box-shadow:0 0 0 0 transparent;}
  50% {
    box-shadow:0 0 0 1px color-mix(in srgb,var(--pb-order-motion-color) 16%,transparent),
               0 0 13px color-mix(in srgb,var(--pb-order-motion-color) 11%,transparent);
  }
}

/* Applies to genuine order status badges: processing, completed, canceled,
   refill protected, pending and review. Color always comes from the state. */
.pb-orders-page .history-order-state .status {
  animation:pbOrderStatusBreath 3.6s ease-in-out infinite;
}
.pb-orders-page .history-order-state .status::before {
  transform-origin:center;
  animation:pbOrderDotBreath 3.6s ease-in-out infinite;
}

/* Order actions breathe without moving, scaling or changing their layout. */
.pb-orders-page .history-order-state .order-actions button:not(:disabled) {
  --pb-order-motion-color:var(--accent);
  animation:pbOrderActionBreath 3.9s ease-in-out infinite;
}
/* The main purple CTAs remain purple; report-drop and Cancel keep their
   own green/red warning colors rather than inheriting a success state. */
.pb-orders-page .history-order-state .order-actions button.order-reorder:not(:disabled),
.pb-orders-page .history-order-state .order-actions button[data-support-order]:not(:disabled) {
  --pb-order-motion-color:var(--accent);
}
.pb-orders-page .history-order-state .order-actions button[data-order-action="refill"]:not(:disabled) {
  --pb-order-motion-color:var(--green);
}
.pb-orders-page .history-order-state .order-actions button[data-order-action="cancel"]:not(:disabled) {
  --pb-order-motion-color:var(--danger);
}
.pb-orders-page .history-order-state .order-actions button[data-receipt-order]:not(:disabled) {
  --pb-order-motion-color:var(--muted);
}
/* Original disabled state and pointer behavior take precedence. */
.pb-orders-page .history-order-state .order-actions button:disabled {
  animation:none!important;
}

/* Users who prefer reduced motion, or disable motion in PublicBoost,
   retain the existing non-animated selected/status colors. */
@media (prefers-reduced-motion:reduce) {
  .pb-orders-page .history-order-state .status,
  .pb-orders-page .history-order-state .status::before,
  .pb-orders-page .history-order-state .order-actions button {
    animation:none!important;
    transform:none!important;
  }
}
:root[data-motion="off"] .pb-orders-page .history-order-state .status,
:root[data-motion="off"] .pb-orders-page .history-order-state .status::before,
:root[data-motion="off"] .pb-orders-page .history-order-state .order-actions button {
  animation:none!important;
}
