/* /assets/css/machines/fluid-pump-valve/how-a-globe-valve-internal-trim-works-cutaway.css — 本页专属样式（en/zh 共用） */

/* ============ 零件本体/区分色（part bodies & per-part distinct fills） ============ */
.part .body{fill:var(--metal);stroke:#8ea0b5;stroke-width:1.6}
.part .body2{fill:var(--metal-2);stroke:#a9b7c9;stroke-width:1.2}
.part .body3{fill:#c6d0dd;stroke:none}
.part .accent{fill:none;stroke:#6b7b8c;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.part.is-active .body{fill:#cfe3fb;stroke:var(--accent)}
.part.is-active .body2{fill:#e3eefc;stroke:#60a5fa}
.part.is-active .body3{fill:var(--accent)}
.part.is-active .accent{stroke:var(--accent-2)}
.part.is-active{filter:drop-shadow(0 0 10px rgba(37,99,235,.35))}

/* ============ 管道流动（flow） ============ */
.pipe-flow{fill:none;stroke:var(--accent);stroke-width:6;stroke-linecap:round;stroke-dasharray:10 16;opacity:0;transition:opacity .4s}
.is-running .pipe-flow{opacity:.95;animation:flow 1.15s linear infinite}
@keyframes flow{to{stroke-dashoffset:-26}}

/* ============ 阀芯与阀杆运动（motion） ============ */
.plug,.stem-bar{transform-box:view-box;animation:gv-lift 4s ease-in-out infinite;animation-play-state:paused}
.is-running .plug,.is-running .stem-bar{animation-play-state:running}
@keyframes gv-lift{0%,22%{transform:translateY(0)} 38%,62%{transform:translateY(-34px)} 78%,100%{transform:translateY(0)}}

/* 流量随开度变化（inlet flow fades while throttled） */
.is-running .in-flow{animation:flow 1.15s linear infinite,gate 4s step-end infinite}
@keyframes gate{0%,22%{opacity:.95} 30%,70%{opacity:.35} 78%,100%{opacity:.95}}

/* ============ 各部件区分色 ============ */
body[data-topic="globe-valve"] .part[data-id="part-inlet"]:not(.is-active) .body{fill:#bcd9f2}
body[data-topic="globe-valve"] .part[data-id="part-inlet"]:not(.is-active) .body2{fill:#d6e9fb}
body[data-topic="globe-valve"] .part[data-id="part-outlet"]:not(.is-active) .body{fill:#bfe0f5}
body[data-topic="globe-valve"] .part[data-id="part-outlet"]:not(.is-active) .body2{fill:#e0f1fc}
body[data-topic="globe-valve"] .part[data-id="part-baffle"]:not(.is-active) .body3{fill:#aab9cd}
body[data-topic="globe-valve"] .part[data-id="part-seat"]:not(.is-active) .body2{fill:#c6cfda}
body[data-topic="globe-valve"] .part[data-id="part-plug"]:not(.is-active) .body{fill:#d3b184}
body[data-topic="globe-valve"] .part[data-id="part-stem"]:not(.is-active) .body{fill:#c2d1e4}
body[data-topic="globe-valve"] .part[data-id="part-bonnet"]:not(.is-active) .body2{fill:#c8c1e5}

@media (prefers-reduced-motion:reduce){
  .plug,.stem-bar{animation:none !important}
  .plug,.stem-bar{transform:translateY(-34px)}
}