/* ════════════════════════════════════════════════════════════════════════════
   RECATOOLS — Ideal Weight Calculator — style.css
   Tool-specific overrides only.
   Base styles live in /assets/css/tool-page.css.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Unit / gender toggle pills ─────────────────────────────────────────────── */
.toggle-group {
    display:    flex;
    gap:        0.375rem;
    margin-bottom: 0;
}

.toggle-pill {
    padding:         0.4rem 1.125rem;
    border-radius:   999px;
    border:          1.5px solid var(--border, #E2E4E8);
    background:      #fff;
    color:           var(--muted, #64748B);
    font-size:       0.875rem;
    font-weight:     600;
    cursor:          pointer;
    transition:      background 0.18s, color 0.18s, border-color 0.18s;
    white-space:     nowrap;
}

.toggle-pill:hover {
    border-color: var(--accent, #E8472F);
    color:        var(--accent, #E8472F);
}

.toggle-pill.active {
    background:   var(--accent, #E8472F);
    border-color: var(--accent, #E8472F);
    color:        #fff;
}

/* ── Input rows ──────────────────────────────────────────────────────────────── */
.input-row {
    display:        flex;
    flex-direction: column;
    gap:            0.375rem;
    margin-bottom:  0;
}

.input-row label {
    font-size:   0.8125rem;
    font-weight: 600;
    color:       var(--muted, #64748B);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input-row .input-hint {
    font-size:  0.75rem;
    color:      var(--muted, #64748B);
    margin-top: 0.2rem;
}

/* Height imperial: two inputs side by side */
.height-imperial-fields {
    display:     flex;
    gap:         0.625rem;
    align-items: center;
}

.height-imperial-fields .unit-field {
    display:     flex;
    align-items: center;
    gap:         0.375rem;
}

.height-imperial-fields input {
    width: 5rem;
}

.height-imperial-fields .field-unit {
    font-size:   0.875rem;
    font-weight: 600;
    color:       var(--muted, #64748B);
    min-width:   1.5rem;
}

/* Current weight row: input + unit badge */
.cw-input-wrap {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
}

.cw-input-wrap input {
    flex: 1;
    max-width: 12rem;
}

.cw-unit-badge {
    font-size:   0.875rem;
    font-weight: 700;
    color:       var(--muted, #64748B);
    background:  var(--bg, #FFFFFF);
    border:      1.5px solid var(--border, #E2E4E8);
    border-radius: 8px;
    padding:     0.35rem 0.75rem;
    white-space: nowrap;
}

/* ── Form layout ─────────────────────────────────────────────────────────────── */
.iwc-form {
    display:        flex;
    flex-direction: column;
    gap:            1.25rem;
}

.form-row {
    display:        flex;
    flex-direction: column;
    gap:            0.5rem;
}

.form-row-label {
    font-size:      0.8125rem;
    font-weight:    600;
    color:          var(--muted, #64748B);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-row-hint {
    font-size:  0.75rem;
    color:      var(--muted, #64748B);
    margin-top: 0.125rem;
}

/* ── Results panel ───────────────────────────────────────────────────────────── */
.results-panel {
    margin-top: 1.75rem;
    display:    flex;
    flex-direction: column;
    gap:        1.25rem;
    animation:  fadeInUp 0.28s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Consensus range hero block */
.consensus-range-block {
    text-align:    center;
    background:    #fff7f3;
    border:        2px solid var(--accent, #E8472F);
    border-radius: 14px;
    padding:       1.5rem 1.25rem 1.25rem;
}

.consensus-label {
    font-size:   0.8125rem;
    font-weight: 700;
    color:       var(--accent, #E8472F);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.375rem;
}

.consensus-value {
    font-family: 'IBM Plex Serif', serif;
    font-size:   2.5rem;
    font-weight: 400;
    color:       var(--accent, #E8472F);
    line-height: 1.1;
    margin-bottom: 0.375rem;
}

.consensus-sub {
    font-size:  0.8125rem;
    color:      var(--muted, #64748B);
}

/* ── Formula table ───────────────────────────────────────────────────────────── */
.formula-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.formula-table-heading {
    font-size:     1rem;
    font-weight:   700;
    color:         var(--text, #0D1B2A);
    margin-bottom: 0.75rem;
}

.formula-table {
    width:           100%;
    border-collapse: collapse;
    font-size:       0.9rem;
    line-height:     1.5;
}

.formula-table thead th {
    text-align:      left;
    padding:         0.5rem 0.75rem;
    font-size:       0.75rem;
    font-weight:     700;
    text-transform:  uppercase;
    letter-spacing:  0.04em;
    color:           var(--muted, #64748B);
    border-bottom:   2px solid var(--border, #E2E4E8);
    white-space:     nowrap;
}

.formula-table tbody tr {
    border-bottom: 1px solid var(--border, #E2E4E8);
    transition:    background 0.12s;
}

.formula-table tbody tr:hover {
    background: #fafaf9;
}

.formula-table tbody tr:last-child {
    border-bottom: none;
}

.formula-table td {
    padding: 0.625rem 0.75rem;
    vertical-align: middle;
}

.formula-name {
    font-weight: 600;
    color:       var(--text, #0D1B2A);
    white-space: nowrap;
}

.formula-result {
    font-weight:  700;
    color:        var(--accent, #E8472F);
    white-space:  nowrap;
    font-variant-numeric: tabular-nums;
}

.formula-notes {
    color:     var(--muted, #64748B);
    font-size: 0.8125rem;
}

/* Consensus footer row */
.formula-table tfoot .consensus-row {
    background:   #fff7f3;
    border-top:   2px solid var(--accent, #E8472F);
}

.formula-table tfoot .consensus-row td {
    padding: 0.75rem;
}

.formula-table tfoot .consensus-result {
    font-size: 1rem;
    color:     var(--accent, #E8472F);
}

/* ── ASEAN callout ───────────────────────────────────────────────────────────── */
.asean-callout {
    display:       flex;
    gap:           0.875rem;
    align-items:   flex-start;
    background:    #fff7f3;
    border:        1.5px solid #f5d1bc;
    border-radius: 12px;
    padding:       1rem 1.125rem;
}

.asean-callout-icon {
    font-size:   1.375rem;
    line-height: 1.4;
    flex-shrink: 0;
    margin-top:  0.1rem;
}

.asean-callout p {
    font-size:   0.9rem;
    line-height: 1.65;
    color:       var(--text, #0D1B2A);
    margin:      0;
}

.asean-callout strong {
    color: var(--accent, #E8472F);
}

/* ── Current weight comparison ───────────────────────────────────────────────── */
.current-weight-compare {
    display:       flex;
    align-items:   flex-start;
    gap:           0.75rem;
    padding:       0.875rem 1.125rem;
    border-radius: 10px;
    font-size:     0.9375rem;
    line-height:   1.55;
}

.current-weight-compare .cw-icon {
    font-size:   1.25rem;
    line-height: 1.4;
    flex-shrink: 0;
    font-weight: 700;
}

.current-weight-above {
    background:  #fff3f3;
    border:      1.5px solid #f5bcbc;
    color:       #8b1a1a;
}

.current-weight-above .cw-icon {
    color: #c0392b;
}

.current-weight-below {
    background:  #f3f7ff;
    border:      1.5px solid #bccdf5;
    color:       #1a2c8b;
}

.current-weight-below .cw-icon {
    color: #2563eb;
}

.current-weight-within {
    background:  #f3fff6;
    border:      1.5px solid #bcf5c9;
    color:       #1a5c2a;
}

.current-weight-within .cw-icon {
    color: #16a34a;
}

/* ── Health disclaimer ───────────────────────────────────────────────────────── */
.health-disclaimer {
    font-size:   0.8125rem;
    color:       var(--muted, #64748B);
    line-height: 1.6;
    padding:     0.75rem 1rem;
    background:  var(--bg, #FFFFFF);
    border-radius: 8px;
    border:      1px solid var(--border, #E2E4E8);
    margin:      0;
}

/* ── Error message ───────────────────────────────────────────────────────────── */
.error-msg {
    color:       #c0392b;
    font-size:   0.875rem;
    font-weight: 600;
    padding:     0.5rem 0.75rem;
    background:  #fff3f3;
    border:      1px solid #f5bcbc;
    border-radius: 8px;
    margin-top:  0.25rem;
}

/* ── Responsive adjustments ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .consensus-value {
        font-size: 2rem;
    }

    .formula-table {
        font-size: 0.8125rem;
    }

    .formula-table thead th,
    .formula-table td {
        padding: 0.5rem 0.5rem;
    }

    .formula-notes {
        display: none; /* hide notes column on very small screens */
    }

    .asean-callout {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .toggle-group {
        flex-wrap: wrap;
    }

    .toggle-pill {
        font-size: 0.8125rem;
        padding:   0.35rem 0.875rem;
    }

    .height-imperial-fields {
        flex-wrap: wrap;
    }
}

/* cache-buster: 2026-05-24T05:06:05Z */
