/* =============================================================================
   Site-wide donation progress (the minimal v2 style)
   • slim WHITE progress line fixed to the bottom edge (no shine animation)
   • expandable status box bottom-right (pill → card with animated % bar)
   Markup: template-parts/progress-line.php (rendered on wp_footer everywhere
   except /old, which keeps the archived original dock).
   On the v2 front page, home-v2.css adds a scroll-driven reveal on top.
   ============================================================================= */

.y70-v2-progressline {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  z-index: 70;
  background: #ffffff;                       /* white track */
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(12, 18, 28, 0.06);
  pointer-events: none;
}
.y70-v2-progressline__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-600));
  border-radius: 0 3px 3px 0;
}

/* the expandable box: a small pill that opens into a status card on click */
.y70-v2-fab {
  position: fixed;
  right: 14px;
  bottom: 21px;
  z-index: 71;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.y70-v2-fab__pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px var(--border), 0 8px 22px rgba(12, 18, 28, 0.16);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.y70-v2-fab__pill:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--border), 0 12px 28px rgba(12, 18, 28, 0.2); }
.y70-v2-fab__lbl { font-weight: 700; }
.y70-v2-fab__num { font-size: 15px; font-weight: 900; color: var(--primary); }
.y70-v2-fab__pill svg { color: var(--primary); transition: transform 0.25s ease; }
.y70-v2-fab.is-open .y70-v2-fab__pill svg { transform: rotate(180deg); }

.y70-v2-fab__card {
  width: min(300px, calc(100vw - 28px));
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px var(--border), 0 18px 44px rgba(12, 18, 28, 0.18);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.y70-v2-fab.is-open .y70-v2-fab__card { opacity: 1; transform: none; pointer-events: auto; }
.y70-v2-fab__amount { font-size: 22px; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; }
.y70-v2-fab__amount small { font-size: 12px; font-weight: 700; color: var(--muted); }
.y70-v2-fab__bar {
  height: 9px;
  margin: 10px 0 7px;
  border-radius: 999px;
  background: #eef0f4;
  border: 1px solid var(--border);
  overflow: hidden;
}
.y70-v2-fab__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-600));
  transition: width 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.12s;
}
/* each time the card opens, the bar sweeps from 0 to the real percentage */
.y70-v2-fab:not(.is-open) .y70-v2-fab__bar span { width: 0 !important; transition: none; }
.y70-v2-fab__meta { font-size: 12px; font-weight: 600; color: var(--muted); }
.y70-v2-fab__meta strong { color: var(--dark); font-size: 13px; }
.y70-v2-fab__cta {
  display: block;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  transition: background 0.2s ease;
}
.y70-v2-fab__cta:hover { background: var(--primary-600); }

/* phones: keep just the slim line */
@media (max-width: 960px) {
  .y70-v2-fab { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .y70-v2-fab__card,
  .y70-v2-fab__bar span,
  .y70-v2-fab__pill,
  .y70-v2-fab__pill svg { transition: none !important; }
}
