/* =============================================
   IDEAL WEIGHT CALCULATOR — ideal_weight.css
   Tool-specific styles only.
   Common styles are in tool.css
   ============================================= */

.iw-calc { width: 100%; }

/* Reuse shared styles */
.bmi-radio-group { display: flex; gap: 24px; padding: 10px 0; }
.bmi-radio-label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
.bmi-radio-label input[type="radio"] { width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; }
.bmi-dual-input { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cal-hint { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }

/* Layout: inputs left, results right */
#iw-panel-us .mort-layout,
#iw-panel-metric .mort-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Results box */
.iw-results {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.iw-result-header {
    background: #16a34a;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 10px 16px;
}
.iw-result-subtitle {
    font-size: 13px;
    color: var(--text2);
    padding: 10px 16px 4px;
    margin: 0;
}

/* Formula table */
.iw-table {
    margin: 0 16px 0;
    width: calc(100% - 32px);
}
.iw-table thead th {
    background: var(--navy);
    color: #fff;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 700;
}
.iw-table thead th:first-child { text-align: left; border-radius: 6px 0 0 0; }
.iw-table thead th:last-child  { border-radius: 0 6px 0 0; }
.iw-value {
    color: #16a34a !important;
    font-weight: 700 !important;
    font-family: var(--font-mono);
}
.iw-range {
    color: var(--teal) !important;
}

/* Print row */
.bf-print-row {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--light);
    margin-top: 12px;
}

/* Unit converter */
.unit-subtabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.unit-subtab { padding: 8px 18px; background: none; border: none; border-bottom: 3px solid transparent; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: var(--font-main); transition: all 0.2s; margin-bottom: -2px; white-space: nowrap; }
.unit-subtab:hover { color: var(--navy); background: var(--light); }
.unit-subtab.active { color: var(--teal); border-bottom-color: var(--teal); }
.unit-converter-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.unit-col { display: flex; flex-direction: column; gap: 8px; }
.unit-col-label { font-size: 14px; font-weight: 700; color: var(--navy); }
.unit-from-input, .unit-to-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; font-family: var(--font-main); color: var(--text); background: var(--white); outline: none; box-sizing: border-box; transition: border-color 0.2s; }
.unit-from-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,201,167,0.1); }
.unit-to-input { background: var(--light); color: var(--muted); cursor: default; }
.unit-list { width: 100%; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: var(--font-main); color: var(--text); background: var(--white); outline: none; padding: 4px; min-height: 160px; cursor: pointer; }
.unit-list option { padding: 7px 10px; border-radius: 4px; font-size: 13px; }
.unit-list option:checked { background: var(--teal); color: var(--navy); }

@media (max-width: 768px) {
    #iw-panel-us .mort-layout,
    #iw-panel-metric .mort-layout,
    .unit-converter-wrap { grid-template-columns: 1fr; }
    .bmi-dual-input { grid-template-columns: 1fr 1fr; }
}
