/* ================================================================
   菜刀客在线工具页 · standard-weight-calculator.html 私有样式
   需在 /css/common.css 之后加载。
   ================================================================ */

/* ---- 字段说明/备注 ---- */
.sw-note {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.7;
}

.sw-note b {
    color: #6b7280;
}

/* ---- 输入区美化（仅本页作用域） ---- */
.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;
}

/* ---- 判定徽章 ---- */
.sw-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.sw-under { background: #dbeafe; color: #2563eb; }
.sw-slight { background: #cffafe; color: #0e7490; }
.sw-normal { background: #dcfce7; color: #16a34a; }
.sw-over { background: #fef3c7; color: #d97706; }
.sw-obese { background: #fee2e2; color: #dc2626; }

/* ---- 体重分级条 ---- */
.sw-bar-pad {
    padding: 14px 14px 18px;
}

.sw-bar-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.sw-bar-head b {
    color: #4338ca;
}

.sw-bar-head > span:first-child {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    align-self: center;
}

.sw-bar-head > span:first-child b {
    font-size: 19px;
    font-weight: 700;
    color: #4338ca;
    margin-left: 2px;
    font-variant-numeric: tabular-nums;
}

.sw-bar {
    position: relative;
    display: flex;
    height: 22px;
    border-radius: 6px;
    overflow: visible;
    margin-top: 34px;
}

.sw-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
}

.sw-seg.under { background: #93c5fd; border-radius: 6px 0 0 6px; }
.sw-seg.slight { background: #67e8f9; }
.sw-seg.normal { background: #4ade80; }
.sw-seg.over { background: #fbbf24; }
.sw-seg.obese { background: #f87171; border-radius: 0 6px 6px 0; }

.sw-marker {
    position: absolute;
    top: -14px;
    bottom: -6px;
    width: 2px;
    background: #4338ca;
    transform: translateX(-1px);
}

.sw-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;
}

.sw-marker::after {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #4338ca;
}

.sw-scale {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* ---- 说明表格 ---- */
.seo-article h3 {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin: 18px 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;
}

/* 标准体重表整表展开：去掉 .table-wrap 固定高度与滚动条 */
.seo-article .table-wrap {
    max-height: none;
    overflow: visible;
}

.seo-article .table-wrap table {
    min-width: 0;
}

/* ---- 小屏适配 ---- */
@media (max-width: 600px) {
    .seo-article table {
        font-size: 12px;
    }

    .seo-article table th,
    .seo-article table td {
        padding: 6px 5px;
    }

    .sw-seg {
        font-size: 10px;
    }
}
