/* /assets/css/machines/home-equipment/how-a-water-softener-ion-exchange-tank-works-cutaway.css — 本页专属样式（en/zh 共用） */

/* ===== 文字（对比度 ≥4.5:1） ===== */
body[data-topic="water-softener"] .svg-title{fill:#16202c}
body[data-topic="water-softener"] .tag   {fill:#334155;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:16px}
body[data-topic="water-softener"] .tag-sm{fill:#5b6472;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:13px}
body[data-topic="water-softener"] .legend{fill:#5b6472}

/* ===== 交互高亮 ===== */
body[data-topic="water-softener"] .part{cursor:pointer}
body[data-topic="water-softener"] .part.is-active{filter:drop-shadow(0 0 8px rgba(37,99,235,.65))}

/* ===== 外壳（半透明玻璃，可隐藏） ===== */
body[data-topic="water-softener"] .shell-layer{fill:#cbd5e1;stroke:#94a3b8;stroke-width:2}
body[data-topic="water-softener"] .stage[data-shell="glass"] .shell-layer{opacity:.15}

/* ===== 软化水流 ===== */
body[data-topic="water-softener"] .soften-flow{
  fill:none;stroke:#3b82f6;stroke-width:3;stroke-linecap:round;
  stroke-dasharray:10 10;
  animation:water-softener-flowDown 1.2s linear infinite;
}
/* 再生盐水 */
body[data-topic="water-softener"] .brine-flow{
  fill:none;stroke:#8b5cf6;stroke-width:3;stroke-linecap:round;
  stroke-dasharray:8 10;
  animation:water-softener-flowDown 1.5s linear infinite;
}
/* 排水 */
body[data-topic="water-softener"] .drain-flow{
  fill:none;stroke:#64748b;stroke-width:2.5;stroke-linecap:round;
  stroke-dasharray:6 8;
  animation:water-softener-flowUp 1.8s linear infinite;
}
/* 离子交换指示 */
body[data-topic="water-softener"] .ion-ca{
  fill:none;stroke:#ef4444;stroke-width:2.5;
  animation:water-softener-ionSwap 2s ease-in-out infinite;
}
body[data-topic="water-softener"] .ion-na{
  fill:none;stroke:#22c55e;stroke-width:2.5;
  animation:water-softener-ionSwap 2s ease-in-out infinite;
}
/* 控制阀活塞 */
body[data-topic="water-softener"] .piston{
  animation:water-softener-pistonMove 3s ease-in-out infinite;
}

@keyframes water-softener-flowDown{to{stroke-dashoffset:-20}}
@keyframes water-softener-flowUp{to{stroke-dashoffset:18}}
@keyframes water-softener-ionSwap{0%,100%{opacity:.3}50%{opacity:1}}
@keyframes water-softener-pistonMove{0%,100%{transform:translateY(0)}50%{transform:translateY(6px)}}

/* ===== 无障碍：减弱动效 ===== */
@media (prefers-reduced-motion:reduce){
  body[data-topic="water-softener"] .soften-flow,
  body[data-topic="water-softener"] .brine-flow,
  body[data-topic="water-softener"] .drain-flow,
  body[data-topic="water-softener"] .ion-ca,
  body[data-topic="water-softener"] .ion-na,
  body[data-topic="water-softener"] .piston{animation:none}
  body[data-topic="water-softener"] .soften-flow{stroke-dasharray:none;opacity:.5}
  body[data-topic="water-softener"] .brine-flow{stroke-dasharray:none;opacity:.4}
  body[data-topic="water-softener"] .drain-flow{stroke-dasharray:none;opacity:.4}
  body[data-topic="water-softener"] .ion-ca,
  body[data-topic="water-softener"] .ion-na{opacity:.6}
}
