/* 제조 AI계산기 공통 화면: 경로 표시, 빈 화면·계산 중 화면, 결과 등장, 계산 버튼 */
/* 상단 헤더: 견적 요청 페이지(.page-head.visual)와 같은 모양 */
.tool-head.visual{display:flex;align-items:center;min-height:202px;margin-bottom:0}
.tool-head .wrap{width:100%}
.tool-head a.step{text-decoration:none;transition:background .15s}
.tool-head a.step:hover{background:rgba(255,255,255,.22);color:#fff}
.tool-head-dimension{--bg:url(/img/metal.png)}
.tool-head-model{--bg:url(/img/printing-tray.jpg)}
.tool-head-cut{--bg:url(/img/metal.png)}
.tool-head-bend{--bg:url(/img/metal_2.png)}
.tool-head-sheet{--bg:url(/img/housing.png)}
.tool-head-cargo{--bg:url(/img/case-truck.jpg)}
.tool-head-hub{--bg:url(/img/machine_2.png)}
@media(max-width:720px){.tool-head.visual{min-height:0}}

/* 빈 화면(화물 계산기와 같은 모양) */
.tool-stage{display:grid!important;min-height:clamp(300px,40vw,520px);align-content:center;justify-items:center;gap:16px;margin-top:12px;padding:22px;text-align:center;background:radial-gradient(ellipse at 50% 26%,#e5efff,#f7faff 72%);border:1px solid #dce6f4;border-radius:9px;color:#435675;font-size:14px;line-height:1.7}
.tool-stage[hidden]{display:none!important}
.tool-stage strong{display:block;color:#1e3553;font-size:17px}
.tool-stage .tool-busy-art{width:min(220px,70%)}

/* 계산 중 */
.tool-busy{display:grid;min-height:clamp(300px,40vw,520px);align-content:center;justify-items:center;gap:14px;margin-top:12px;padding:22px;text-align:center;background:radial-gradient(ellipse at 50% 26%,#e5efff,#f7faff 72%);border:1px solid #dce6f4;border-radius:9px}
.tool-busy[hidden]{display:none}
.tool-busy-art{width:min(220px,70%);height:auto;overflow:visible}
.tool-busy-art .tb-frame{fill:#eef4fd;stroke:#97add0;stroke-width:1.2}
.tool-busy-art .tb-piece{opacity:0}
.tool-busy-art .tb-c0{fill:#5583d9}.tool-busy-art .tb-c1{fill:#3d9c98}.tool-busy-art .tb-c2{fill:#cf8744}.tool-busy-art .tb-c3{fill:#8a6cc2}
.tool-busy:not([hidden]) .tb-piece{animation:tb-drop 1.9s cubic-bezier(.21,.75,.37,1) var(--d,0s) infinite}
.tool-busy-art .tb-saw{stroke:#e0523f;stroke-width:2;stroke-dasharray:4 3;opacity:.8}
.tool-busy:not([hidden]) .tb-saw{animation:tb-saw 1.9s linear infinite}
.tool-stage .tb-piece{opacity:1}
.tool-stage .tb-saw{display:none}
.tool-busy-copy{display:grid;gap:3px}
.tool-busy-copy strong{color:#1e3553;font-size:17px}
.tool-busy-copy span{color:#435675;font-size:13px}
.tool-busy-steps{display:grid;gap:6px;width:min(330px,100%);margin:0;padding:0;list-style:none;text-align:left}
.tool-busy-steps li{display:flex;align-items:center;gap:8px;color:#8494aa;font-size:13px;transition:color .2s}
.tool-busy-steps li i{flex:none;width:16px;height:16px;box-sizing:border-box;border:2px solid #c7d4e6;border-radius:50%}
.tool-busy-steps li[data-state=active]{color:#1e3553;font-weight:650}
.tool-busy-steps li[data-state=active] i{border-color:#3669c5;border-right-color:transparent;animation:tb-spin .7s linear infinite}
.tool-busy-steps li[data-state=done]{color:#2f6b45}
.tool-busy-steps li[data-state=done] i{border:0;background:#2f9e5b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat}
.tool-busy-bar{width:min(330px,100%);height:4px;border-radius:4px;background:#d8e4f6;overflow:hidden}
.tool-busy-bar i{display:block;width:var(--p,6%);height:100%;border-radius:4px;background:linear-gradient(90deg,#3669c5,#5b8ef0);transition:width .3s ease}
.tool-busy-time{min-height:1em;color:#7a8aa0;font-size:11px;font-variant-numeric:tabular-nums}
@keyframes tb-drop{0%{opacity:0;transform:translateY(-14px)}18%,78%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(0)}}
@keyframes tb-saw{from{transform:translateX(14px)}to{transform:translateX(166px)}}
@keyframes tb-spin{to{transform:rotate(360deg)}}

/* 결과 등장 */
.tool-reveal{animation:tool-reveal .28s ease-out both}
@keyframes tool-reveal{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

/* 원가 요약 */
.tool-cost{margin:12px 0 0;padding:12px 14px;border:1px solid #cfe3d6;border-radius:10px;background:#f3fbf6}
.tool-cost h3{margin:0 0 6px;color:#14532d;font-size:15px}
.tool-cost table{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums;color:#1f3b2b}
.tool-cost th,.tool-cost td{padding:5px 6px;border-bottom:1px solid #d9ecdf;text-align:right}
.tool-cost tr > :first-child{text-align:left}
.tool-cost thead th{color:#3f6a50;font-size:12px;font-weight:650}
.tool-cost tfoot th,.tool-cost tfoot td{border-bottom:0;font-weight:700;color:#14532d}
.tool-cost p{margin:6px 0 0;color:#3f6a50;font-size:12px;line-height:1.6}
.tool-cost[data-empty]{border-style:dashed;background:#f8fbf9}
.tool-cost button{margin-left:4px}

/* 계산 버튼: PC에서는 화면 아래에 붙어 따라옴 */
@media(min-width:901px){.tool-sticky{position:sticky;bottom:14px;z-index:3;box-shadow:0 8px 20px rgba(37,99,235,.25)}}
@media(prefers-reduced-motion:reduce){.tool-busy .tb-piece,.tool-busy .tb-saw,.tool-busy-steps li i,.tool-reveal{animation:none!important}.tool-busy .tb-piece{opacity:1}}
@media print{.tool-busy,.tool-head .step,.tool-head p{display:none!important}.tool-head.visual{min-height:0;padding:0 0 8px;background:none;color:#111}.tool-cost{break-inside:avoid}}
.tool-head + .weight-tool{padding-top:24px}
/* 중량 계산기: 적용 밀도 · kg당 단가 한 행 */
.tool-density-row{align-items:end}
.tool-density-row label{margin-bottom:0}
.tool-density-note{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin:8px 0 14px}
.tool-density-note .tool-density{flex:1 1 220px;margin:0}
.tool-density-note button{padding:5px 10px;font-size:12px;white-space:nowrap}
