/* ==========================================================================
   净水器滤芯更换周期计算器 —— 专属样式（日历排期设计）
   依赖 biz-kit.css v2 的变量与骨架；本文件只做本工具的独有组件
   ========================================================================== */

/* 面板内：单价微表格 */
.wf-price-grid {
    margin-top: 12px;
    border: 1px solid var(--p-line);
    border-radius: 9px;
    background: var(--p-panel);
    padding: 11px 13px 13px;
}

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

.wf-price-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.wf-price-row label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 11.5px;
    color: var(--p-ink2);
    white-space: nowrap;
}

.wf-price-row .bk-input { padding: 0 8px; }
.wf-price-row input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--p-ink); font-family: var(--bk-mono); font-size: 12.5px; padding: 5px 0; font-variant-numeric: tabular-nums; }

/* ---------- 全年日历 ---------- */
.wf-cal {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
    margin-top: 6px;
}

.wf-cal-cell {
    position: relative;
    border: 1px solid var(--bk-line);
    border-radius: 10px;
    background: var(--bk-card);
    padding: 10px 10px 9px;
    min-height: 86px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.wf-cal-cell.is-now {
    border-color: var(--bk-accent);
    box-shadow: inset 0 0 0 1px var(--bk-accent);
}

.wf-cal-cell.is-busy { background: var(--bk-accent-soft); }
.wf-cal-cell.is-done { opacity: .55; }

.wf-cal-month {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    font-family: var(--bk-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--bk-ink2);
}

.wf-cal-month em {
    font-style: normal;
    font-weight: 400;
    font-size: 9.5px;
    color: var(--bk-ink3);
    letter-spacing: .06em;
}

.wf-cal-cell.is-busy .wf-cal-month { color: var(--bk-accent); }

.wf-cal-dots { display: flex; flex-wrap: wrap; gap: 5px; min-height: 10px; }

.wf-cal-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid transparent;
    flex: none;
}

.wf-cal-dot.is-done { border-color: var(--bk-ink3); background: transparent !important; }

.wf-cal-cell.is-busy .wf-cal-names { color: var(--bk-accent); font-weight: 600; }

.wf-cal-names {
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--bk-ink3);
    margin-top: auto;
}

.wf-cal-done-btn {
    position: absolute;
    inset: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    font: inherit;
    color: transparent;
}

.wf-cal-done-btn:focus-visible { outline: 2px solid var(--bk-accent); outline-offset: -3px; }

.wf-cal-legend {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 18px;
    margin: 14px 0 0;
    padding: 0;
    font-size: 11.5px;
    color: var(--bk-ink3);
}

.wf-cal-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: -1px;
}

.wf-cal-legend b { font-family: var(--bk-mono); color: var(--bk-ink2); font-weight: 600; }

/* ---------- 分级周期条 ---------- */
.wf-stages { display: grid; gap: 14px; margin-top: 4px; }

.wf-stage { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; }

.wf-stage-name { font-size: 13px; font-weight: 700; }
.wf-stage-name small { display: block; font-weight: 400; font-size: 10px; color: var(--bk-ink3); font-family: var(--bk-mono); margin-top: 1px; }

.wf-stage-track {
    height: 22px;
    border-radius: 999px;
    background: var(--bk-line2);
    position: relative;
    overflow: hidden;
}

.wf-stage-track i {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: var(--stage, var(--bk-accent));
    transition: width .3s ease;
}

.wf-stage-meta {
    text-align: right;
    font-family: var(--bk-mono);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.wf-stage-meta b { font-size: 15px; color: var(--bk-ink); }
.wf-stage-meta span { color: var(--bk-ink3); font-size: 10.5px; margin-left: 3px; }

@media (max-width: 700px) {
    .wf-cal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .wf-price-row { grid-template-columns: 1fr 1fr; }
    .wf-stage { grid-template-columns: 64px minmax(0, 1fr); }
    .wf-stage-meta { grid-column: 1 / -1; text-align: left; }
    .wf-cal-cell { min-height: 78px; padding: 8px; }
}
