/* ================================================================
 * painting.css — the Painting Pack v1 (wave430-paint, 2026-11-07).
 * The Paint tab, the Painting start card, the Trade packs row + rate
 * table and the Budget's hours card. roofing.css's rules, re-prefixed:
 * phone first, 44px targets, the portal's tokens with neutral fallbacks;
 * gold is the core's btn-primary only — the one Save on the Paint tab.
 * ================================================================ */

.paint-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.paint-head { display: flex; flex-direction: column; gap: 4px; }
.paint-h { margin: 0; font-size: 1.15rem; }
.paint-src { margin: 0; font-size: .9rem; color: var(--muted, #5b6472); }
.paint-sec { display: flex; flex-direction: column; gap: 10px; }
.paint-sec > h4 { margin: 4px 0 0; font-size: 1rem; }
.paint-add { align-self: flex-start; min-height: 44px; }

.paint-room { border: 1px solid var(--line, #d5dae1); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--card, #fff); }
.paint-room-h { display: flex; align-items: center; gap: 10px; }
.paint-name { flex: 1 1 auto; min-width: 0; min-height: 44px; font-size: 16px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--line, #d5dae1); border-radius: 8px; background: var(--card, #fff); color: inherit; font-family: inherit; }
.paint-room-t { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.paint-del { min-width: 40px; min-height: 40px; }

.paint-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
@media (min-width: 640px) { .paint-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.paint-f { display: flex; flex-direction: column; gap: 4px; position: relative; min-width: 0; }
.paint-f > span { font-size: .82rem; font-weight: 600; color: var(--muted, #5b6472); }
.paint-f input, .paint-f select {
  min-height: 44px; font-size: 16px; 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;
}
.paint-f input[inputmode="decimal"] { padding-right: 52px; }
.paint-f input::placeholder { color: var(--muted, #8a93a1); font-size: .86rem; }
.paint-unit { position: absolute; right: 10px; bottom: 12px; font-style: normal; font-size: .82rem; color: var(--muted, #5b6472); pointer-events: none; }
.paint-check { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; align-self: end; }
.paint-check input { width: 22px; height: 22px; min-height: 0; }
.paint-hint { margin: 0; font-size: .86rem; color: var(--muted, #5b6472); }

.paint-opens summary, .paint-rates summary { cursor: pointer; font-weight: 600; font-size: .9rem; min-height: 32px; }
.paint-open { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin: 6px 0; }

.paint-surfs { display: flex; flex-direction: column; gap: 8px; }
.paint-surf { border-top: 1px dashed var(--line, #d5dae1); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.paint-surf-h { display: flex; align-items: center; gap: 10px; }
.paint-surf-h b { font-size: .95rem; }
.paint-surf-t { margin-left: auto; font-size: .86rem; font-variant-numeric: tabular-nums; color: var(--muted, #5b6472); text-align: right; }

.paint-addsurf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.paint-lbl { font-size: .82rem; font-weight: 600; color: var(--muted, #5b6472); margin-right: 2px; }
.paint-chip { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line, #d5dae1); background: var(--card, #fff); color: inherit; cursor: pointer; font-size: .88rem; }
.paint-chip:hover { border-color: var(--navy, #1d2b45); }
.paint-extras { border-top: 1px dashed var(--line, #d5dae1); padding-top: 10px; }

.paint-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 12px; background: var(--card-alt, #f3f5f8); position: sticky; bottom: 64px; z-index: 2; }
@media (min-width: 640px) { .paint-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.paint-sum-k { display: flex; flex-direction: column; }
.paint-sum-k b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.paint-sum-k span { font-size: .8rem; color: var(--muted, #5b6472); }

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

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

/* Settings — the Painting row and the rate table */
.paint-pack { margin-top: 12px; }
.paint-rates { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.paint-rates > .paint-grid { margin-top: 10px; }
.paint-rt-wrap { overflow-x: auto; margin-top: 8px; }
.paint-rt { border-collapse: collapse; width: 100%; font-size: .9rem; }
.paint-rt th { text-align: left; font-size: .8rem; color: var(--muted, #5b6472); padding: 6px 8px; border-bottom: 1px solid var(--line, #d5dae1); }
.paint-rt td { padding: 4px 8px; border-bottom: 1px solid var(--line, #eef0f3); }
.paint-rt input { width: 90px; min-height: 36px; font-size: 15px; padding: 4px 8px; border: 1px solid var(--line, #d5dae1); border-radius: 6px; background: var(--card, #fff); color: inherit; }
.paint-rt input:disabled { background: transparent; border-color: transparent; }
.paint-avg { font-style: normal; font-size: .72rem; padding: 1px 6px; border-radius: 999px; background: var(--card-alt, #f3f5f8); color: var(--muted, #5b6472); }

/* the New-project start card */
.paint-startcard .pf-start-pic { width: 100%; height: 64px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 4px; }

/* Budget — estimated vs actual hours */
.paint-hrs { border: 1px solid var(--line, #d5dae1); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.paint-hrs h4 { margin: 0 0 8px; }
.paint-hrs-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.paint-hrs-k p { margin: 0; }
.paint-hrs-l { font-size: .8rem; color: var(--muted, #5b6472); }
.paint-hrs-v { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.paint-hrs-v small { font-size: .8rem; font-weight: 500; }
.paint-hrs-s { font-size: .78rem; color: var(--muted, #5b6472); }
.paint-hrs-row.is-near .paint-hrs-v { color: var(--warn, #9a6700); }
.paint-hrs-row.is-over .paint-hrs-v { color: var(--bad, #b42318); }
