/* ==========================================================================
   智齿拔除费用测算 —— 专属样式（阻生类型选择卡 + 费用区间标尺）
   依赖 biz-kit.css v2 的变量与骨架；sp-cell 复用自前序工具
   ========================================================================== */

/* ---------- 阻生类型选择卡 ---------- */
.wt-types {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.wt-type {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 11px 6px 9px;
    border: 1px solid var(--p-line);
    border-radius: 10px;
    background: var(--p-panel);
    color: var(--p-ink2);
    font: inherit;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.wt-type:hover { border-color: var(--p-accent); }

.wt-type.is-on {
    border-color: var(--p-accent);
    background: var(--bk-accent-soft);
    box-shadow: inset 0 0 0 1px var(--p-accent);
}

.wt-type b { font-size: 12px; color: var(--p-ink); font-weight: 700; }
.wt-type small { font-size: 9.5px; color: var(--p-ink3); text-align: center; line-height: 1.4; }
.wt-type.is-on b { color: var(--p-accent); }

/* 牙位示意小图（纯 CSS 画牙齿相对位置） */
.wt-type-art {
    width: 34px;
    height: 30px;
    position: relative;
    margin-bottom: 3px;
}

.wt-type-art::before {
    /* 邻牙（第二磨牙） */
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 9px;
    height: 26px;
    border-radius: 5px 5px 3px 3px;
    background: var(--p-line);
}

.wt-type-art i {
    position: absolute;
    border-radius: 5px 5px 3px 3px;
    background: var(--p-ink3);
    transition: background .16s ease;
}

.wt-type.is-on .wt-type-art i { background: var(--p-accent); }

.wt-type-art .a-v { left: 13px; top: 2px; width: 9px; height: 26px; }
.wt-type-art .a-m { left: 13px; top: 12px; width: 17px; height: 9px; border-radius: 3px 5px 5px 3px; transform: rotate(-18deg); }
.wt-type-art .a-h { left: 13px; top: 12px; width: 18px; height: 9px; border-radius: 3px 5px 5px 3px; }
.wt-type-art .a-i { left: 14px; top: 13px; width: 9px; height: 12px; border-radius: 50% 50% 40% 40%; opacity: .55; }

.wt-type-art .a-i::after {
    /* 骨埋伏的骨缘线 */
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    top: -3px;
    height: 2px;
    background: var(--p-line);
}

/* ---------- 加项 ---------- */
.wt-adds {
    margin-top: 12px;
    border: 1px solid var(--p-line);
    border-radius: 9px;
    background: var(--p-panel);
    padding: 11px 13px 12px;
}

.wt-adds-head {
    font-family: var(--bk-mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--p-ink3);
    font-weight: 700;
    margin-bottom: 8px;
}

.wt-adds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; }

.wt-adds-grid label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--p-ink2);
    cursor: pointer;
    min-width: 0;
}

.wt-adds-grid input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--p-accent);
    flex: none;
    cursor: pointer;
}

.wt-adds-grid label i {
    margin-left: auto;
    font-style: normal;
    font-family: var(--bk-mono);
    font-size: 9.5px;
    color: var(--p-ink3);
    white-space: nowrap;
}

/* ---------- 区间标尺 ---------- */
.wt-scale { position: relative; padding: 34px 0 26px; margin-top: 10px; }

.wt-scale-track {
    height: 14px;
    border-radius: 999px;
    background: var(--bk-line2);
    border: 1px solid var(--bk-line);
    overflow: hidden;
}

.wt-scale-band {
    position: absolute;
    top: 34px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--bk-accent) 55%, transparent), var(--bk-accent));
    min-width: 12px;
    transition: left .3s ease, width .3s ease;
}

.wt-scale-band::before,
.wt-scale-band::after {
    content: "";
    position: absolute;
    top: -5px;
    width: 2px;
    height: 24px;
    border-radius: 2px;
    background: var(--bk-accent);
}

.wt-scale-band::before { left: 0; }
.wt-scale-band::after { right: 0; }

.wt-scale-band em {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-style: normal;
    font-family: var(--bk-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--bk-accent);
    white-space: nowrap;
}

.wt-scale-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-family: var(--bk-mono);
    font-size: 9.5px;
    color: var(--bk-ink3);
}

/* ---------- 类型横向对比 ---------- */
.wt-compare { display: grid; gap: 8px; margin-top: 18px; }

.wt-compare-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 88px;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 9px;
    border: 1px solid transparent;
}

.wt-compare-row.is-cur { border-color: var(--bk-accent); background: var(--bk-accent-soft); }

.wt-compare-name { font-size: 12.5px; font-weight: 600; }
.wt-compare-name small { display: block; font-weight: 400; font-size: 9.5px; color: var(--bk-ink3); font-family: var(--bk-mono); margin-top: 1px; }

.wt-compare-track { position: relative; height: 10px; border-radius: 999px; background: var(--bk-line2); }
.wt-compare-track i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--bk-accent); opacity: .8; }
.wt-compare-row.is-cur .wt-compare-track i { opacity: 1; }

.wt-compare-val {
    text-align: right;
    font-family: var(--bk-mono);
    font-size: 11.5px;
    color: var(--bk-ink2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .wt-types { grid-template-columns: 1fr 1fr; }
    .wt-adds-grid { grid-template-columns: 1fr; }
    .wt-compare-row { grid-template-columns: 72px minmax(0, 1fr); }
    .wt-compare-val { grid-column: 1 / -1; text-align: left; padding-left: 84px; margin-top: -4px; }
}
