/* ================================================================
   菜刀客在线工具页 · body-fat-calculator.html 私有样式
   需在 /css/common.css 之后加载。
   ================================================================ */

/* ---- 字段说明/备注 ---- */
.bfr-note {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.7;
}

.bfr-note b {
    color: #6b7280;
}

.input-hint {
    font-size: 11px;
    color: #6366f1;
    background: #eef2ff;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 4px;
}

/* ---- 输入区美化（仅本页作用域） ---- */
.main .form-body .form-row {
    align-items: flex-end;
    gap: 12px;
}

.main .form-body .form-row > .form-group {
    flex: 1;
    min-width: 0;
}

.main .form-body .form-group > label {
    font-size: 12.5px;
    font-weight: 600;
    color: #4b5563;
    letter-spacing: 0.01em;
    transition: color 0.18s;
}

.main .form-body .form-group:focus-within > label {
    color: #4f46e5;
}

.main .form-body .form-control {
    padding: 11px 46px 11px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fbfcff;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.main .form-body .form-control::placeholder {
    color: #cbd5e1;
    font-weight: 500;
}

.main .form-body .form-control:hover {
    border-color: #c7d2fe;
}

.main .form-body .form-control:focus {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.13);
}

.main .form-body .form-control[type="number"]::-webkit-outer-spin-button,
.main .form-body .form-control[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.main .form-body .form-control[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.main .form-body .input-wrap .suffix {
    right: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #6366f1;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.18s, color 0.18s;
}

.main .form-body .input-wrap:focus-within .suffix {
    background: #6366f1;
    color: #ffffff;
}

/* ---- 判定徽章 ---- */
.bfr-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.bfr-under { background: #dbeafe; color: #2563eb; }
.bfr-normal { background: #dcfce7; color: #16a34a; }
.bfr-over { background: #fef3c7; color: #d97706; }
.bfr-obese { background: #fee2e2; color: #dc2626; }

/* ---- 体脂率分级条 ---- */
.bfr-bar-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.bfr-bar-head b {
    color: #4338ca;
}

.bfr-bar {
    position: relative;
    display: flex;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 16px;
}

.bfr-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.3s;
}

.bfr-seg.under { background: #93c5fd; }
.bfr-seg.normal { background: #4ade80; }
.bfr-seg.over { background: #fbbf24; }
.bfr-seg.obese { background: #f87171; }

.bfr-marker {
    position: absolute;
    top: -14px;
    bottom: -6px;
    width: 2px;
    background: #4338ca;
    transform: translateX(-1px);
}

.bfr-marker::before {
    content: attr(data-val);
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: #4338ca;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.bfr-marker::after {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4338ca;
    border: 2px solid #fff;
}

.bfr-scale {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* ---- 结果里的方式标题 ---- */
.method-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 4px 0 8px;
}

/* ---- 说明表格 ---- */
.seo-article table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 8px 0 4px;
}

.seo-article table th,
.seo-article table td {
    border: 1px solid #e5e7eb;
    padding: 7px 10px;
    text-align: center;
    color: #4b5563;
}

.seo-article table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.seo-article table td:first-child {
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.seo-article table td em {
    color: #9ca3af;
    font-style: normal;
}

/* ---- 小屏适配 ---- */
@media (max-width: 600px) {
    .seo-article table {
        font-size: 12px;
    }

    .seo-article table th,
    .seo-article table td {
        padding: 6px 5px;
    }

    .bfr-seg {
        font-size: 10px;
    }
}
