/* 基础体温记录曲线 bbt-chart | 复用 calc-common，深色模式适配 */

/* ---------- 图表 ---------- */
.bbt-chart-wrap {
    border: 1px solid var(--c-border);
    border-radius: 14px;
    background: var(--c-surface-soft);
    padding: 12px 8px 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.bbt-svg { display: block; width: 100%; min-width: 560px; height: auto; }
.bbt-grid { stroke: var(--c-border); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; }
.bbt-yt { font-size: 10.5px; fill: var(--c-text-muted); }
.bbt-xt { font-size: 10.5px; fill: var(--c-text-muted); }
.bbt-line { fill: none; stroke: #e0447c; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.bbt-pt { fill: #fff; stroke: #e0447c; stroke-width: 2; }
.bbt-pt.menses { fill: #e0447c; }
.bbt-cover { stroke: #0a7fc0; stroke-width: 1.6; stroke-dasharray: 7 5; }
.bbt-ov { fill: none; stroke: #f59e0b; stroke-width: 2.4; }
.bbt-ovt { font-size: 11px; font-weight: 800; fill: #d98a00; }

.bbt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 11.5px;
    color: var(--c-text-muted);
    margin: 2px 2px 12px;
}
.bbt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bbt-legend i {
    width: 14px; height: 0;
    border-top: 3px solid #e0447c;
    border-radius: 2px;
    display: inline-block;
}
.bbt-legend i.lg-cover { border-top: 2px dashed #0a7fc0; }
.bbt-legend i.lg-ov { width: 10px; height: 10px; border: 2px solid #f59e0b; border-radius: 50%; background: none; }
.bbt-legend i.lg-menses { width: 9px; height: 9px; border: none; border-radius: 50%; background: #e0447c; }

/* ---------- 经期标记 ---------- */
.bbt-mtag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: #e0447c;
}

/* ---------- 行内小按钮 ---------- */
.bbt-acts { white-space: nowrap; }
.bbt-mini {
    height: 26px;
    padding: 0 12px;
    margin-right: 6px;
    border-radius: 8px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    color: var(--c-text-sub);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .14s ease;
}
.bbt-mini:hover { border-color: var(--c-primary); color: var(--c-primary); }
.bbt-mini--del:hover { border-color: #e0447c; color: #e0447c; }

/* ---------- 测量小贴士 ---------- */
.bbt-tips {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--c-text-sub);
    background: rgba(224, 68, 124, 0.06);
    border: 1px dashed rgba(224, 68, 124, 0.3);
}
.bbt-tips b { color: var(--c-text); }

/* ---------- 结果区解读列表 ---------- */
.bbt-notes {
    margin: 0 0 4px;
    padding-left: 18px;
    font-size: 12.5px;
    line-height: 2;
    color: var(--c-text-sub);
}

/* ---------- Toast ---------- */
.bbt-toast {
    position: fixed;
    left: 50%;
    bottom: 36px;
    transform: translate(-50%, 16px);
    max-width: min(86vw, 460px);
    padding: 11px 20px;
    border-radius: 12px;
    background: rgba(20, 26, 40, 0.92);
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    z-index: 9999;
}
.bbt-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 黑夜模式 ---------- */
[data-theme="dark"] .bbt-pt { fill: #131c31; }
[data-theme="dark"] .bbt-pt.menses { fill: #e0447c; }
[data-theme="dark"] .bbt-cover { stroke: #58bdf0; }
[data-theme="dark"] .bbt-tips {
    background: rgba(224, 68, 124, 0.1);
    border-color: rgba(224, 68, 124, 0.34);
}
[data-theme="dark"] .bbt-toast { background: rgba(235, 240, 250, 0.94); color: #131c31; }

@media (max-width: 620px) {
    .bbt-chart-wrap { padding: 10px 4px 4px; }
    .bbt-svg { min-width: 520px; }
}
