/* ================================================================
 * roofing.css — the Roofing Pack v1 (wave46-roofing, 2026-10-21).
 * The Roof tab, the intake door, the Trade packs card and the Budget's
 * cost-per-square card. Phone first: one column, thumb-sized targets
 * (44px), wider screens get a grid. Colours ride the portal's existing
 * tokens (with neutral fallbacks); gold is the core's btn-primary only —
 * the one Save on the Roof tab.
 * ================================================================ */

.roof-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.roof-head { display: flex; flex-direction: column; gap: 4px; }
.roof-h { margin: 0; font-size: 1.15rem; }
.roof-src { margin: 0; font-size: .9rem; color: var(--muted, #5b6472); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.roof-seg { align-self: flex-start; }
.roof-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
@media (min-width: 640px) { .roof-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.roof-f { display: flex; flex-direction: column; gap: 4px; position: relative; min-width: 0; }
.roof-f > span { font-size: .82rem; font-weight: 600; color: var(--muted, #5b6472); }
.roof-f input, .roof-f select, .roof-f textarea {
  min-height: 44px; font-size: 16px; /* 16px stops iOS zooming the field */
  padding: 8px 10px; border: 1px solid var(--line, #d5dae1); border-radius: 8px; background: var(--card, #fff); color: inherit; width: 100%; box-sizing: border-box; font-family: inherit;
}
.roof-f input[inputmode="decimal"] { padding-right: 44px; }
.roof-unit { position: absolute; right: 10px; bottom: 12px; font-style: normal; font-size: .82rem; color: var(--muted, #5b6472); pointer-events: none; }
.roof-f-wide { grid-column: 1 / -1; }

.roof-step .roof-stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line, #d5dae1); border-radius: 8px; overflow: hidden; width: max-content; }
.roof-stepbtn { min-width: 44px; min-height: 44px; border: 0; background: var(--card-alt, #f3f5f8); font-size: 1.2rem; cursor: pointer; color: inherit; }
.roof-stepper b { min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }

.roof-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.roof-lbl { font-size: .82rem; font-weight: 600; color: var(--muted, #5b6472); }
.roof-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.roof-chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line, #d5dae1); background: var(--card, #fff); color: inherit; cursor: pointer; font-size: .92rem; }
.roof-chip.on { border-color: var(--navy, #1d2b45); background: var(--navy, #1d2b45); color: #fff; }

.roof-waste .roof-f { max-width: 140px; }
.roof-sugg { margin: 0; font-size: .9rem; }
.roof-link { background: none; border: 0; padding: 0 2px; color: var(--navy, #1d2b45); text-decoration: underline; cursor: pointer; font: inherit; }

.roof-facets { display: flex; flex-direction: column; gap: 10px; }
.roof-facet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 10px; border: 1px solid var(--line, #d5dae1); border-radius: 10px; position: relative; }
@media (min-width: 720px) { .roof-facet { grid-template-columns: auto 110px 130px auto 110px 110px auto auto; align-items: end; } }
.roof-facet-n { grid-column: 1 / -1; font-weight: 600; font-size: .9rem; }
@media (min-width: 720px) { .roof-facet-n { grid-column: auto; align-self: center; } }
.roof-or { grid-column: 1 / -1; font-size: .82rem; color: var(--muted, #5b6472); margin: -2px 0; }
.roof-facet-sq { grid-column: 1 / -1; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (min-width: 720px) { .roof-or, .roof-facet-sq { grid-column: auto; align-self: end; padding-bottom: 12px; margin: 0; } }
.roof-facet-del { position: absolute; top: 6px; right: 6px; min-width: 36px; min-height: 36px; }
@media (min-width: 720px) { .roof-facet-del { position: static; } }
.roof-addplane { align-self: flex-start; min-height: 44px; }
.roof-hint { margin: 0; font-size: .85rem; }

.roof-extras, .roof-report { border: 1px solid var(--line, #d5dae1); border-radius: 10px; padding: 8px 12px; }
.roof-extras > summary, .roof-report > summary { min-height: 36px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.roof-extras[open], .roof-report[open] { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.roof-upbtn { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; }

.roof-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; border-radius: 10px; background: var(--card-alt, #f3f5f8); font-size: .95rem; }
.roof-sum b { font-variant-numeric: tabular-nums; }
.roof-ok { margin: 0; color: var(--ok, #1f7a4a); }

.roof-savebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; bottom: 0; padding: 10px 0; background: var(--bg, #fff); border-top: 1px solid var(--line, #d5dae1); }
.roof-save { min-height: 44px; }

.roof-quotes { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line, #d5dae1); }
.roof-quotes h4, .roof-take h4, .roof-cps h4 { margin: 4px 0 0; }
.roof-opts { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .roof-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.roof-opt { border: 1px solid var(--line, #d5dae1); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.roof-opt.is-approved { border-color: var(--ok, #1f7a4a); box-shadow: inset 3px 0 0 var(--ok, #1f7a4a); }
.roof-opt-t, .roof-opt-s { margin: 0; font-size: .92rem; }
.roof-take { display: flex; flex-direction: column; gap: 4px; }
.roof-take-wait { margin: 0; }

.roof-intake-btn { margin-right: 8px; }
.roof-intake-note { font-size: .85rem; }

.roof-pack { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; }
.roof-pack-txt { flex: 1 1 320px; }
.roof-pack-txt p { margin: 4px 0 0; }
.roof-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 600; }
.roof-switch input { width: 22px; height: 22px; }

.roof-cps { margin: 0 0 14px; padding: 12px; border: 1px solid var(--line, #d5dae1); border-radius: 10px; }
.roof-cps h4 .muted { font-weight: 400; font-size: .85rem; }
.roof-cps-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
@media (min-width: 720px) { .roof-cps-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.roof-cps-k p { margin: 0; }
.roof-cps-l { font-size: .82rem; font-weight: 600; color: var(--muted, #5b6472); }
.roof-cps-v { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.roof-cps-v small { font-size: .8rem; font-weight: 400; }
.roof-cps-s { font-size: .8rem; color: var(--muted, #5b6472); }
.roof-cps-held { margin: 10px 0 0; font-size: .9rem; }
.roof-cps-note { margin: 6px 0 0; font-size: .85rem; }
