/* Trex quotation wizard. Everything is scoped under .tq / .tq-page so it can sit inside a WordPress theme. */
@font-face { font-family: "Heebo"; src: url("fonts/Heebo.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

.tq-page { margin: 0; background: #f4f5f3; color: #1d1d1b; font-family: Heebo, Arial, sans-serif; }
.tq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  background: #fff; border-bottom: 1px solid #e3e5e1; position: sticky; top: 0; z-index: 5; }
.tq-logo { height: 34px; width: auto; display: block; }
.tq-help { font-size: 14px; color: #1f4d3a; text-decoration: none; font-weight: 600; white-space: nowrap; }
.tq-help:hover { text-decoration: underline; }

.tq { --g: #1f4d3a; --g2: #17251e; --g-soft: #eef4f0; --line: #dfe2dd; --muted: #5d625b; --err: #b3261e;
  max-width: 980px; margin: 0 auto; padding: 16px 16px 120px; font-family: Heebo, Arial, sans-serif; color: #1d1d1b;
  font-size: 16px; line-height: 1.45; box-sizing: border-box; }
.tq *, .tq *::before, .tq *::after { box-sizing: border-box; }
.tq h1 { font-size: 24px; line-height: 1.2; margin: 6px 0 4px; font-weight: 800; }
.tq h2 { font-size: 20px; margin: 0 0 4px; font-weight: 800; }
.tq p { margin: 0; }
.tq .tq-sub { color: var(--muted); font-size: 15px; }
.tq .tq-ltr { direction: ltr; unicode-bidi: isolate; }
.tq :focus-visible { outline: 3px solid #e3a21a; outline-offset: 2px; }
.tq .tq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tq-demo { background: #fff6dc; border: 1px solid #f0d58a; color: #5b4500; border-radius: 10px; padding: 8px 12px;
  font-size: 13.5px; margin-bottom: 12px; }
.tq-demo b { font-weight: 700; }

/* progress */
.tq-progress { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0; margin: 14px 0 18px; }
.tq-progress li { font-size: 12.5px; color: var(--muted); text-align: center; }
.tq-progress li::before { content: ""; display: block; height: 5px; border-radius: 3px; background: var(--line); margin-bottom: 5px; }
.tq-progress li.done::before, .tq-progress li.cur::before { background: var(--g); }
.tq-progress li.cur { color: var(--g); font-weight: 700; }
.tq-progress button { all: unset; cursor: pointer; }
.tq-progress button:focus-visible { outline: 3px solid #e3a21a; }

/* series cards */
.tq-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
@media (min-width: 560px) { .tq-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .tq-cards { grid-template-columns: repeat(4, 1fr); } }
.tq-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 2px solid var(--line);
  border-radius: 14px; overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tq-card:hover { border-color: #b9c4bc; }
.tq-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tq-card:has(input:focus-visible) { outline: 3px solid #e3a21a; outline-offset: 2px; }
.tq-card.sel { border-color: var(--g); box-shadow: 0 0 0 2px var(--g) inset; }
.tq-card .ph { position: relative; aspect-ratio: 16 / 9; background: #ddd; }
@media (min-width: 560px) { .tq-card .ph { aspect-ratio: 4 / 3; } }
.tq-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tq-card .bd { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tq-card .nm { direction: ltr; text-align: right; font-weight: 800; font-size: 18px; }
.tq-card .tg { color: var(--muted); font-size: 14px; }
.tq-card ul { margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.tq-card li { padding-right: 18px; position: relative; }
.tq-card li::before { content: "✓"; position: absolute; right: 0; color: var(--g); font-weight: 800; }
.tq-band { position: absolute; top: 8px; right: 8px; background: rgba(23,37,30,.82); color: #fff; font-size: 13px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; line-height: 1.4; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.tq-band b { font-weight: 800; letter-spacing: 1px; margin-right: 2px; }
.tq-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-direction: row-reverse; }
.tq-check { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--g);
  color: #fff; display: none; align-items: center; justify-content: center; font-weight: 800; }
.tq-card.sel .tq-check { display: flex; }
.tq-cgi { position: absolute; bottom: 6px; right: 6px; font-size: 11px; color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 3px; }
.tq-note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* colours */
.tq-hero { position: relative; border-radius: 14px; overflow: hidden; background: #ddd; aspect-ratio: 16 / 9; margin: 12px 0; }
@media (min-width: 760px) { .tq-hero { aspect-ratio: auto; height: 300px; } }
.tq-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tq-hero .cap { position: absolute; bottom: 10px; left: 10px; direction: ltr; background: rgba(0,0,0,.55); color: #fff; font-size: 13px;
  padding: 3px 9px; border-radius: 4px; }
.tq-group h3 { font-size: 15px; margin: 14px 0 8px; direction: ltr; text-align: right; color: var(--muted); font-weight: 700; letter-spacing: .5px; }
.tq-sw { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tq-swatch { position: relative; display: block; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; }
.tq-swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tq-swatch:has(input:focus-visible) { outline: 3px solid #e3a21a; outline-offset: 2px; }
.tq-swatch img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tq-swatch span { display: block; direction: ltr; text-align: center; font-size: 13.5px; font-weight: 600; padding: 5px 4px 6px; }
.tq-swatch.sel { border-color: var(--g); box-shadow: 0 0 0 2px var(--g) inset; }
.tq-swatch.sel span { background: var(--g); color: #fff; }

/* size */
.tq-seg { display: inline-flex; border: 1.5px solid var(--g); border-radius: 10px; overflow: hidden; margin: 12px 0; }
.tq-seg button { font: inherit; border: 0; background: #fff; color: var(--g); padding: 9px 14px; cursor: pointer; font-weight: 600; min-height: 44px; }
.tq-seg button[aria-pressed="true"] { background: var(--g); color: #fff; }
.tq-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.tq-field label, .tq-lbl { font-weight: 600; font-size: 15px; }
.tq-field small { color: var(--muted); font-size: 13px; }
.tq input[type=text], .tq input[type=tel], .tq input[type=email], .tq input[inputmode=decimal], .tq select {
  font: inherit; font-size: 16px; padding: 11px 12px; border: 1.5px solid #c9cec8; border-radius: 10px; background: #fff; width: 100%; min-height: 46px; }
.tq input[aria-invalid=true], .tq select[aria-invalid=true] { border-color: var(--err); }
.tq .tq-err { color: var(--err); font-size: 13.5px; font-weight: 600; }
.tq .tq-hint { color: #7a5800; font-size: 13.5px; }
.tq .tq-hint button { all: unset; color: var(--g); text-decoration: underline; cursor: pointer; font-weight: 700; }
.tq-rect { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: end; margin-bottom: 10px; }
.tq-rect .x { padding-bottom: 12px; color: var(--muted); }
.tq-rect .rm { font: inherit; border: 0; background: none; color: var(--err); cursor: pointer; padding: 12px 6px; min-height: 44px; }
.tq-add { font: inherit; background: none; border: 1.5px dashed #9aa59c; border-radius: 10px; padding: 9px 14px; color: var(--g); cursor: pointer; font-weight: 600; min-height: 44px; }
.tq-total { margin: 14px 0; background: var(--g-soft); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.tq-total b { font-size: 22px; }
.tq-incl { font-size: 14px; color: var(--muted); border-right: 3px solid var(--g); padding-right: 10px; }

/* details */
.tq-form { display: grid; grid-template-columns: 1fr; gap: 0 14px; max-width: 640px; }
@media (min-width: 640px) { .tq-form { grid-template-columns: 1fr 1fr; } .tq-form .wide { grid-column: 1 / -1; } }
.tq-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.tq-radios label { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #c9cec8; border-radius: 10px; padding: 8px 12px;
  cursor: pointer; font-weight: 500; min-height: 44px; }
.tq-radios label:has(input:checked) { border-color: var(--g); background: var(--g-soft); }
.tq-check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin-bottom: 10px; }
.tq-check-row input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--g); }
.tq-check-row a { color: var(--g); }
.tq-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.tq-chip { font: inherit; font-size: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.tq-chip:hover { border-color: var(--g); }

/* done */
.tq-done { background: #fff; border-radius: 16px; padding: 22px 18px; border: 1px solid var(--line); max-width: 640px; }
.tq-done .ok { width: 56px; height: 56px; border-radius: 50%; background: var(--g); color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.tq-done dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; font-size: 15px; }
.tq-done dt { color: var(--muted); }
.tq-done dd { margin: 0; font-weight: 600; }
.tq-done details { margin-top: 14px; font-size: 13px; }
.tq-done pre { direction: ltr; text-align: left; background: #f4f5f3; padding: 10px; border-radius: 8px; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-word; }

/* nav bar: sticky at the bottom on mobile */
.tq-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; justify-content: space-between; z-index: 6; }
.tq-nav .in { max-width: 948px; margin: 0 auto; width: 100%; display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.tq-btn { font: inherit; font-weight: 700; font-size: 16px; border-radius: 12px; padding: 12px 22px; cursor: pointer; min-height: 48px; border: 1.5px solid var(--g); }
.tq-btn.pri { background: var(--g); color: #fff; flex: 1; max-width: 360px; margin-right: auto; }
.tq-btn.pri[aria-disabled=true] { background: #9aa59c; border-color: #9aa59c; }
.tq-btn.sec { background: #fff; color: var(--g); }
.tq-foot { font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.tq h2[tabindex="-1"]:focus { outline: none; }
.tq-step[data-step=size] .tq-rect, .tq-step[data-step=size] .tq-add { max-width: 520px; }
.tq-step[data-step=size] .tq-total, .tq-step[data-step=size] .tq-incl { max-width: 520px; }
.tq-chip { color: #1f4d3a; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.tq-step[data-step=done] .tq-done, .tq-step[data-step=cladding] .tq-done { margin: 0 auto; }
@media (max-width: 559px) {
  .tq-card { flex-direction: row; min-height: 132px; }
  .tq-card .ph { aspect-ratio: auto; width: 36%; flex: none; }
  .tq-card .bd { padding: 9px 10px; gap: 2px; }
  .tq-card .top { flex-direction: column-reverse; align-items: flex-start; gap: 0; }
  .tq-card .nm { font-size: 16.5px; text-align: right; }
  .tq-card .tg { font-size: 13.5px; }
  .tq-card ul { font-size: 13px; gap: 1px; }
  .tq-card .tq-check { top: 6px; left: 6px; width: 24px; height: 24px; }
}
@media (max-width: 559px) { .tq-band { top: 6px; right: 6px; font-size: 11.5px; padding: 2px 7px; } }
