/* 算钱页专属样式（#645）：剪影、滑杆、红章、打印、瀑布条、旧车对比、分享卡。
   颜色一律走 main.css 的 token（夜航靠它们自己翻面），字号走字阶。 */

/* ---------- 车型剪影（F）：表单卡右上角的装饰画 ---------- */
.calc-form-card { position: relative; }
.calc-sil { position: absolute; top: 14px; right: 18px; width: 150px; pointer-events: none; }
.calc-sil .sil { display: none; width: 100%; height: auto; }
.calc-sil .sil.sil-on { display: block; animation: silIn .45s cubic-bezier(.2,.9,.3,1) both; }
@keyframes silIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.sil-body { fill: var(--ink-2); }
.sil-glass { fill: var(--paper-2); }
.sil-wheel { fill: var(--ink); }
.sil-hub { fill: var(--paper); }
.sil-bolt { fill: var(--gold); }
.sil-cap { fill: var(--gold); }
.sil-pipe { fill: var(--ink-3); }
.sil-port-glow { fill: var(--gold); opacity: .25; animation: portPulse 1.8s ease-in-out infinite; }
@keyframes portPulse { 0%, 100% { opacity: .12; } 50% { opacity: .4; } }
.sil-puff { fill: var(--ink-4); opacity: 0; animation: puffOut 2.1s ease-out infinite; }
.sil-puff2 { animation-delay: .5s; }
.sil-puff3 { animation-delay: 1s; }
@keyframes puffOut {
    0% { opacity: 0; transform: translateX(0); }
    15% { opacity: .5; }
    100% { opacity: 0; transform: translateX(-10px); }
}
@media (max-width: 720px) { .calc-sil { display: none; } }

/* ---------- 价格滑杆 ---------- */
#calc-price-slider { width: 100%; margin-top: 8px; accent-color: var(--gold); }

/* ---------- 实时校验回话 ---------- */
.calc-live-err { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--red); }

/* ---------- 表盘：弹簧接管时关掉 CSS transition（C） ---------- */
.calc-gauge.spring .cg-needle, .calc-gauge.spring .cg-arc { transition: none; }

/* 合计滚动中的一点动感 */
[data-odometer].rolling { filter: blur(.6px); }

/* ---------- 收据打印 + 红章（D） ---------- */
.receipt-row.receipt-total { position: relative; }
.calc-stamp {
    /* 盖在合计行上、但压不到右侧的钱数——章是气氛，数字是内容 */
    position: absolute; right: 128px; top: 50%; width: 52px;
    transform: translateY(-56%) rotate(-12deg);
    opacity: .9; pointer-events: none;
}
@media (max-width: 640px) { .calc-stamp { right: 96px; width: 44px; } }
.calc-stamp svg { display: block; width: 100%; height: auto; }
.calc-stamp .st-ring { fill: none; stroke: var(--red); stroke-width: 3.5; }
.calc-stamp .st-ring.st-thin { stroke-width: 1.4; }
.calc-stamp .st-txt { fill: var(--red); font-family: var(--font-display); font-size: 13px; font-weight: 700; }
.calc-stamp .st-sub { fill: var(--red); font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 3px; }

.fx-print .receipt > * {
    animation: printRow .3s ease-out both;
    animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes printRow { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.fx-print .calc-stamp { animation: stampIn .4s cubic-bezier(.2,1.5,.45,1) both; }
@keyframes stampIn {
    from { opacity: 0; transform: translateY(-56%) rotate(-26deg) scale(2.1); }
    70% { opacity: .92; transform: translateY(-56%) rotate(-11deg) scale(.96); }
    to { opacity: .9; transform: translateY(-56%) rotate(-12deg) scale(1); }
}

/* ---------- 瀑布条（E）：车价里政策出的 vs 自己掏的 ---------- */
.calc-waterfall { margin: var(--sp-4) 0; }
.wf-head { font-size: var(--fs-xs); color: var(--text-meta); margin-bottom: 6px; }
.wf-track {
    display: flex; height: 18px; border-radius: 4px; overflow: hidden;
    border: 1px solid var(--line); background: var(--paper-2);
}
.wf-seg { display: block; height: 100%; flex: none; }
.wf-trade { background: var(--green); }
.wf-tax { background: var(--gold); }
.wf-local { background: var(--ai-badge); }
.wf-maybe {
    background: repeating-linear-gradient(135deg, var(--gold-wash), var(--gold-wash) 4px, var(--gold-light) 4px, var(--gold-light) 8px);
    border-right: 1px dashed var(--gold-dark);
}
.wf-net { flex: 1; background: transparent; }
.wf-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: var(--fs-xs); color: var(--ink-2); }
.wf-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 2px;
    margin-right: 5px; vertical-align: -1px;
}
.wf-key-net .wf-dot, .wf-dot.wf-net { background: var(--paper-2); border: 1px solid var(--line); }

/* ---------- 旧车处置对比（G′） ---------- */
.calc-compare { margin: var(--sp-4) 0; padding-top: var(--sp-3); border-top: 1px solid var(--line-2); }
.cc-head { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin-bottom: var(--sp-2); }
.cc-sub { font-weight: 400; font-size: var(--fs-xs); color: var(--text-meta); margin-left: 8px; }
.cc-row { display: grid; grid-template-columns: 96px 1fr 88px; gap: 10px; align-items: center; padding: 5px 0; }
.cc-label { font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.cc-you {
    display: inline-block; font-style: normal; margin-left: 5px; padding: 0 5px;
    border-radius: 3px; background: var(--gold-wash); color: var(--gold-text); font-size: var(--fs-xs);
}
.cc-track { height: 12px; border-radius: 3px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line-2); }
.cc-bar { display: block; height: 100%; border-radius: 2px; background: var(--ink-4); }
.cc-active .cc-label { font-weight: 700; color: var(--ink); }
.cc-active .cc-bar { background: var(--gold); }
.cc-val { text-align: right; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.cc-note { font-size: var(--fs-xs); color: var(--text-meta); line-height: 1.7; margin-top: 6px; }

/* ---------- 分享账单卡（H） ---------- */
.calc-share { margin-top: var(--sp-3); display: flex; align-items: center; gap: 10px; }
.calc-share-hint { font-size: var(--fs-xs); color: var(--text-meta); }

/* ---------- 减少动效：全部一步落位，内容不丢 ---------- */
@media (prefers-reduced-motion: reduce) {
    .calc-sil .sil.sil-on, .fx-print .receipt > *, .fx-print .calc-stamp { animation: none; }
    .sil-port-glow, .sil-puff { animation: none; opacity: .3; }
    .wf-seg, .cc-bar { transition: none !important; }
}
