/* Body Fat Calculator — style.css v1.0 */

.bfc-wrap {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* Header */
.bfc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.bfc-icon   { font-size: 34px; line-height: 1; }
.bfc-title  {
    font-size: 22px !important; font-weight: 600 !important;
    margin: 0 0 3px !important; padding: 0 !important;
    border: none !important; color: #1a1a1a !important;
}
.bfc-sub { font-size: 13px; color: #666; margin: 0; }

/* Unit toggle */
.bfc-unit-toggle {
    display: flex; border: 1px solid #d0d0d0;
    border-radius: 9px; overflow: hidden; margin-bottom: 18px;
}
.bfc-utbtn {
    flex: 1; padding: 9px 10px; font-size: 13px;
    border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s, color .13s;
}
.bfc-utbtn:last-child { border-right: none; }
.bfc-utbtn.act { background: #e8f5e9; color: #1B5E20; font-weight: 600; }
.bfc-utbtn:hover:not(.act) { background: #fafafa; }

/* Section label */
.bfc-section-lbl {
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px;
}

/* Gender toggle */
.bfc-gender-row {
    display: flex; border: 1px solid #d0d0d0;
    border-radius: 8px; overflow: hidden; height: 40px;
    margin-bottom: 4px;
}
.bfc-gbtn {
    flex: 1; border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555; font-size: 13px;
    cursor: pointer; transition: background .13s, color .13s;
}
.bfc-gbtn:last-child { border-right: none; }
.bfc-gbtn.act { background: #e8f5e9; color: #1B5E20; font-weight: 600; }

/* Grid */
.bfc-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 14px; margin-bottom: 12px;
}
@media (max-width: 460px) { .bfc-grid { grid-template-columns: 1fr; } }

/* Labels */
.bfc-lbl {
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
    font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px;
}
.bfc-tip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; border-radius: 50%;
    background: #ebebeb; font-size: 10px; color: #777;
    cursor: help; flex-shrink: 0; font-style: normal;
}
.bfc-female-badge {
    font-size: 10px; color: #ec4899; background: #fdf2f8;
    border: 1px solid #f9a8d4; border-radius: 10px;
    padding: 1px 6px; font-weight: 400;
}

/* Inputs */
.bfc-iw { position: relative; }
.bfc-iw input[type="number"] {
    width: 100%; box-sizing: border-box;
    padding: 9px 36px 9px 12px;
    border: 1px solid #d0d0d0; border-radius: 8px;
    font-size: 14px; color: #1a1a1a; background: #fff;
    outline: none; transition: border-color .15s;
    -moz-appearance: textfield;
}
.bfc-iw input::-webkit-inner-spin-button,
.bfc-iw input::-webkit-outer-spin-button { -webkit-appearance: none; }
.bfc-iw input:focus { border-color: #2E7D32; box-shadow: 0 0 0 3px rgba(46,125,50,.1); }
.bfc-suf {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: #999; pointer-events: none;
}

/* Measurement guide */
.bfc-measure-guide {
    font-size: 12px; color: #888; background: #f8f8f8;
    border: 1px solid #e8e8e8; border-radius: 8px;
    padding: 9px 12px; margin-bottom: 4px;
}
.bfc-measure-guide strong { color: #555; }

/* Main cards */
.bfc-main-cards {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 10px; margin-top: 18px; margin-bottom: 4px;
    animation: bfc-in .22s ease;
}
@media (max-width: 440px) { .bfc-main-cards { grid-template-columns: 1fr 1fr; } }
@keyframes bfc-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

.bfc-main-card {
    border-radius: 12px; padding: 14px 10px;
    text-align: center; border: 1px solid;
}
.bfc-card-val { font-size: 24px; font-weight: 700; margin-bottom: 3px; }
.bfc-card-lbl { font-size: 11px; opacity: .8; line-height: 1.3; }

/* Category color classes */
.bfc-cat-essential  { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.bfc-cat-athletes   { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.bfc-cat-fitness    { background: #f0fdf4; border-color: #86efac; color: #166534; }
.bfc-cat-average    { background: #fefce8; border-color: #fde047; color: #854d0e; }
.bfc-cat-obese      { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* Method comparison */
.bfc-method-card {
    display: flex; align-items: center; gap: 12px;
    background: #f8f9ff; border: 1px solid #e0e7ff;
    border-radius: 10px; padding: 12px 16px; margin-bottom: 8px;
}
.bfc-method-pct { font-size: 22px; font-weight: 700; color: #1a1a1a; min-width: 60px; }
.bfc-method-info { flex: 1; }
.bfc-method-name { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.bfc-method-desc { font-size: 12px; color: #888; margin-top: 2px; }
.bfc-method-badge {
    font-size: 11px; padding: 3px 10px; border-radius: 12px;
    font-weight: 600; white-space: nowrap;
}

/* Body composition bars */
.bfc-comp-card {
    background: #f8f8f8; border: 1px solid #e8e8e8;
    border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
}
.bfc-comp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bfc-comp-row:last-child { margin-bottom: 0; }
.bfc-comp-lbl  { font-size: 13px; color: #555; width: 80px; flex-shrink: 0; }
.bfc-comp-track{ flex: 1; height: 12px; background: #e0e0e0; border-radius: 6px; overflow: hidden; }
.bfc-comp-fill { height: 100%; border-radius: 6px; transition: width .5s ease; }
.bfc-comp-val  { font-size: 13px; font-weight: 600; color: #1a1a1a; width: 90px; text-align: right; flex-shrink: 0; }

/* Category table */
table.bfc-cat-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px;
}
table.bfc-cat-table th {
    padding: 7px 10px; text-align: left; color: #888;
    font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
    border-bottom: 1px solid #e8e8e8; background: #fafafa; font-weight: 600;
}
table.bfc-cat-table th:not(:first-child):not(:nth-child(2)) { text-align: center; }
table.bfc-cat-table td {
    padding: 8px 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px;
}
table.bfc-cat-table td:not(:first-child):not(:nth-child(2)) { text-align: center; }
table.bfc-cat-table tr.bfc-current-row td { font-weight: 700; }
table.bfc-cat-table tr:last-child td { border-bottom: none; }

/* Ideal weight */
.bfc-ideal-card {
    background: #e8f5e9; border: 1px solid #a5d6a7;
    border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
    font-size: 13px;
}
.bfc-ideal-card strong { color: #1B5E20; font-size: 15px; }
.bfc-ideal-range { margin-top: 6px; color: #555; }

/* Disclaimer */
.bfc-disclaimer { font-size: 11px; color: #bbb; text-align: center; margin-top: 10px; }
.bfc-reset-btn {
    display: block; width: 100%; margin-top: 10px; padding: 9px;
    font-size: 13px; color: #999; background: none;
    border: 1px solid #e8e8e8; border-radius: 8px;
    cursor: pointer; transition: background .13s;
}
.bfc-reset-btn:hover { background: #f5f5f5; color: #333; }
