/* /assets/css/machines/industrial-mech/how-an-air-compressor-works-cutaway.css — 本页专属样式（en/zh 共用） */

/* ============ 机器类目基线（part bodies & 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:#aab9cd;stroke:none}
.part .accent{fill:none;stroke:#6b7b8c;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.part.is-active .body{fill:#9dc3f5;stroke:#1d4ed8;stroke-width:2.2}
.part.is-active .body2{fill:#c4daf8;stroke:#3b82f6;stroke-width:1.4}
.part.is-active .body3{fill:#1d4ed8}
.part.is-active .accent{stroke:#1d4ed8}
.part.is-active{filter:drop-shadow(0 0 12px rgba(29,78,216,.5))}

/* ============ 管道流动（flow） ============ */
.pipe-case{fill:none;stroke:#94a3b8;stroke-width:16;stroke-linecap:round;stroke-linejoin:round}
.pipe-flow{fill:none;stroke:#38bdf8;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:10 16;opacity:0;transition:opacity .4s}
.pipe-flow.hot{stroke:#ea580c}
.is-running .pipe-flow{opacity:.95;animation:flow 1.1s linear infinite}
@keyframes flow{to{stroke-dashoffset:-26}}

/* ============ 本页专属材质 / 动画 ============ */
.part .air{fill:#7cc7ef;fill-opacity:.55;stroke:#0284c7;stroke-width:1.2}
.part.is-active .air{fill:#38bdf8;fill-opacity:.8}

.teeth{fill:none;stroke:#8ea0b5;stroke-width:12;stroke-dasharray:6 9}
.part.is-active .teeth{stroke:#1d4ed8}
.cooler-box{fill:none;stroke:#8ea0b5;stroke-width:2;stroke-dasharray:8 6}
.part.is-active .cooler-box{stroke:#1d4ed8}

.crank{transform-box:view-box;transform-origin:250px 470px;animation:spin 1.4s linear infinite;animation-play-state:paused}
.is-running .crank{animation-play-state:running}
@keyframes spin{to{transform:rotate(360deg)}}

.slider{animation:slide 1.4s ease-in-out infinite;animation-play-state:paused}
.is-running .slider{animation-play-state:running}
@keyframes slide{0%,100%{transform:translateY(-16px)}50%{transform:translateY(16px)}}

/* ============ 各部件区分色（:not(.is-active) 保证全局高亮仍生效） ============ */
body[data-topic="air-compressor"] .part[data-id="part-motor"]:not(.is-active) .body{fill:#c8c1e5}
body[data-topic="air-compressor"] .part[data-id="part-motor"]:not(.is-active) .body2{fill:#e2ddf3}
body[data-topic="air-compressor"] .part[data-id="part-crank"]:not(.is-active) .body{fill:#b7c9dd}
body[data-topic="air-compressor"] .part[data-id="part-crank"]:not(.is-active) .body2{fill:#d8e3ef}
body[data-topic="air-compressor"] .part[data-id="part-rod"]:not(.is-active) .body{fill:#a9bccf}
body[data-topic="air-compressor"] .part[data-id="part-piston"]:not(.is-active) .body{fill:#c2d1e4}
body[data-topic="air-compressor"] .part[data-id="part-piston"]:not(.is-active) .body2{fill:#e0e9f4}
body[data-topic="air-compressor"] .part[data-id="part-cylinder"]:not(.is-active) .body{fill:#bcc9db}
body[data-topic="air-compressor"] .part[data-id="part-inlet"]:not(.is-active) .body{fill:#c9e2d6}
body[data-topic="air-compressor"] .part[data-id="part-outlet"]:not(.is-active) .body{fill:#e8c79a}
body[data-topic="air-compressor"] .part[data-id="part-tank"]:not(.is-active) .body{fill:#bfe0f5}
body[data-topic="air-compressor"] .part[data-id="part-switch"]:not(.is-active) .body{fill:#c6cfda}
body[data-topic="air-compressor"] .part[data-id="part-shell-cover"]:not(.is-active) .body{fill:#cbd7e7}