/*
 * The refrigerant family (lane L2, site/pages/free-tools/refrigerant.php): the PT chart, superheat and subcooling
 * pages. On top of ft-base.css (with the chart table, .ft-table) and ft-calc.css (fields, result card). Tokens of
 * assets/css/nf/tokens.css only.
 */

.ft-ref__target {
    margin: var(--sp-2) 0 0;
    padding: var(--sp-4) 0 0;
    border: 0;
    border-top: 1px solid var(--c-line);
}

.ft-ref__legend {
    padding: 0;
    margin: 0 0 var(--sp-3);
    font-weight: var(--fw-semibold);
    color: var(--c-ink);
}

/* a field with a ± button: a phone's decimal keypad may have no minus key */
.ft-ref__signed {
    display: flex;
    gap: var(--sp-2);
    align-items: stretch;
}

.ft-ref__signed .ft-input {
    flex: 1 1 auto;
    min-width: 0;
}

.ft-ref__plain {
    display: block;
}

.ft-ref__sign {
    flex: 0 0 auto;
    min-width: 48px;
    min-height: 44px;
    padding: 0 var(--sp-3);
    font-size: var(--fs-lg);
    font-variant-numeric: tabular-nums;
}

/* as wide as the chart below it (ft-base's .ft-narrow caps text at 56rem), so Print sits over the chart's right edge */
.ft-narrow > .ft-ref__chart-head {
    max-width: none;
}

.ft-ref__chart-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-2) var(--sp-4);
}

.ft-ref__print {
    min-height: 44px;
}

.ft-ref__reading {
    margin: var(--sp-3) 0 0;
    color: var(--c-ink);
}

.ft-ref__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
}

.ft-ref__actions .btn {
    min-height: 44px;
}

/* the chart: a tall table scrolls in its own box, so the matching row can be brought into view without moving the page */
#chart .ft-table-wrap {
    max-height: 30rem;
    overflow-y: auto;
}

#chart .ft-table thead th {
    position: sticky;
    top: 0;
    background: var(--c-surface);
}

/* the matching row: tinted and bold, so colour is not the only sign */
#chart .ft-table .is-match th,
#chart .ft-table .is-match td {
    font-weight: var(--fw-semibold);
    box-shadow: inset 0 -2px 0 var(--c-brand);
}

/* "Print the chart": the H1, the result and the chart on one Letter page, readable at arm's length (10 pt) */
@media print {
    .ft-body main > #chart {
        display: block !important;
        padding: 0;
    }

    .ft-ref .ft-calc__inputs,
    .ft-ref__actions,
    .ft-ref__print,
    .ft-top .hero__lead,
    #chart .ft-note {
        display: none !important;
    }

    #chart .ft-table-wrap {
        max-height: none;
        overflow: visible;
        border: 0;
    }

    #chart .ft-table {
        font-size: 10pt;
    }

    #chart .ft-table th,
    #chart .ft-table td {
        padding: 0 6pt;
        line-height: 1.25;
    }

    #chart .ft-table-note {
        margin: 4pt 0 0;
        font-size: 8pt;
    }
}
