/*
 * 全站成功动画（2026-11-14）
 *
 * 视觉与定制器的 `.psbuy-celebrate` 同一套（personalize-editor.css），但独立文件：
 * 那份只在商品页/quick-buy 加载，而成功动画要覆盖注册、订单、评价、账户区等所有页面。
 *
 * z-index：高于 Bootstrap modal(1055)、低于 toast(9999) 与 `.psbuy-zoom`(2147483000)。
 * `pointer-events:none`：不阻断用户继续操作；只是 1.5s 的视觉反馈。
 */
.ps-success {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 22, 40, .28);
  pointer-events: none;
  opacity: 1;
}
.ps-success.is-out { opacity: 0; transition: opacity .25s ease; }

.ps-success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  max-width: min(86vw, 340px);
}

.ps-success-box {
  position: relative;
  width: min(62vw, 220px);
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border-radius: .9rem;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(16, 22, 40, .35);
  animation: psSuccessIn .18s ease-out both;
}
.ps-success-box > img {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: contain;
  background: var(--light);
}
.ps-success-box > i {
  font-size: clamp(3.4rem, 13vw, 5rem);
  color: #10965a;
  line-height: 1;
}

.ps-success-note {
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

@keyframes psSuccessIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: none; }
}

/*
 * 收藏 / 关注图标弹一下（轻量反馈，不遮屏）。
 * ⚠️ `display:inline-block` 不能省：这些按钮多是行内 `<a>`，而 CSS transform
 *    对**非替换行内元素**不生效 —— 少了它动画写了也看不见（2026-11-14 用户报
 *    link/blank 的 Favorited 没动画）。
 */
.ps-heart-pop {
  display: inline-block;
  animation: psHeartPop .35s ease;
}
@keyframes psHeartPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .ps-success-box { animation: none; }
  .ps-success.is-out { transition: none; }
  .ps-heart-pop { animation: none; }
}
