/* Raynz Quote Builder – mobile-first styles, scoped to .rqb */
.rqb {
  --rqb-navy: #1F3A5F;
  --rqb-gold: #B8860B;
  --rqb-bg: #F4F1EC;
  --rqb-line: #e3ded4;
  --rqb-text: #222;
  --rqb-muted: #6b6b6b;
  max-width: 860px;
  margin: 0 auto;
  color: var(--rqb-text);
  font-size: 16px;
  line-height: 1.45;
  box-sizing: border-box;
}
.rqb *, .rqb *::before, .rqb *::after { box-sizing: border-box; }
.rqb h2 { color: var(--rqb-navy); margin: 8px 0 4px; font-size: 1.5rem; }
.rqb h3.rqb-cat { color: var(--rqb-navy); margin: 22px 0 8px; font-size: 1.1rem; border-bottom: 2px solid var(--rqb-gold); padding-bottom: 4px; }
.rqb .rqb-sub { color: var(--rqb-muted); margin: 0 0 16px; }
.rqb .rqb-loading { padding: 24px; text-align: center; color: var(--rqb-muted); }

/* progress */
.rqb-progress { list-style: none; display: flex; gap: 2px; padding: 0; margin: 0 0 18px; overflow-x: auto; }
.rqb-progress li { flex: 1 0 auto; text-align: center; }
.rqb-progress button { background: none; border: 0; padding: 6px 8px; cursor: pointer; color: var(--rqb-muted); font: inherit; font-size: .78rem; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.rqb-progress button:disabled { cursor: default; }
.rqb-progress .n { width: 26px; height: 26px; border-radius: 50%; background: #e7e2d8; color: #555; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.rqb-progress .current .n { background: var(--rqb-navy); color: #fff; }
.rqb-progress .done .n { background: var(--rqb-gold); color: #fff; }
.rqb-progress .current button { color: var(--rqb-navy); font-weight: 700; }

/* form */
.rqb-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 640px) { .rqb-grid { grid-template-columns: 1fr 1fr; } }
.rqb-f { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.rqb-f span { font-weight: 600; color: var(--rqb-navy); }
.rqb-f input, .rqb-f select, .rqb-f textarea { width: 100%; padding: 11px 12px; border: 1px solid #c9c3b6; border-radius: 8px; font: inherit; background: #fff; min-height: 44px; }
.rqb-f input:focus, .rqb-f select:focus, .rqb-f textarea:focus { outline: 2px solid var(--rqb-gold); outline-offset: 1px; }
.rqb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* style picker */
.rqb-styles { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .rqb-styles { grid-template-columns: 1fr 1fr; } }
.rqb-style { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 2px solid var(--rqb-line); border-radius: 10px; cursor: pointer; background: #fff; }
.rqb-style input { position: absolute; opacity: 0; pointer-events: none; }
.rqb-style small { color: var(--rqb-muted); }
.rqb-style.on { border-color: var(--rqb-navy); background: #eef2f8; }

/* item cards */
.rqb-list { display: grid; gap: 10px; }
.rqb-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--rqb-line); border-radius: 10px; background: #fff; }
.rqb-card.on { border-color: var(--rqb-gold); background: #fffaf0; }
.rqb-name { font-weight: 700; }
.rqb-desc { color: var(--rqb-muted); font-size: .88rem; margin-top: 2px; }
.rqb-price { margin-top: 4px; font-size: .92rem; }
.rqb-price small, .rqb-hint { color: var(--rqb-muted); margin-left: 4px; }
.rqb-req { color: #8a6d00; font-weight: 600; }
.rqb-ctl { flex: 0 0 auto; }
.rqb-step { display: inline-flex; align-items: center; border: 1px solid #c9c3b6; border-radius: 8px; overflow: hidden; background: #fff; }
.rqb-step button { width: 42px; height: 42px; border: 0; background: #f4f1ec; font-size: 1.25rem; cursor: pointer; }
.rqb-step span { min-width: 36px; text-align: center; font-weight: 700; }

/* buttons */
.rqb-btn { appearance: none; border: 2px solid var(--rqb-navy); background: #fff; color: var(--rqb-navy); padding: 10px 16px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; min-height: 44px; }
.rqb-btn:hover { background: #eef2f8; }
.rqb-btn:disabled { opacity: .6; cursor: default; }
.rqb-added { background: var(--rqb-gold); border-color: var(--rqb-gold); color: #fff; }
.rqb-added:hover { background: #a2750a; }
.rqb-primary { background: var(--rqb-navy); color: #fff; }
.rqb-primary:hover { background: #17304f; }
.rqb-ghost { border-color: #c9c3b6; color: #444; }

/* review */
.rqb-sum { display: grid; gap: 10px; background: var(--rqb-bg); padding: 14px; border-radius: 10px; margin: 12px 0; font-size: .92rem; }
@media (min-width: 640px) { .rqb-sum { grid-template-columns: 1fr 1fr; } }
.rqb-block { border: 1px solid var(--rqb-line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.rqb-block-h { display: flex; justify-content: space-between; background: var(--rqb-navy); color: #fff; padding: 9px 14px; font-weight: 700; }
.rqb-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-top: 1px solid #f0ece3; }
.rqb-line small { display: block; color: var(--rqb-muted); }
.rqb-line.muted { color: var(--rqb-muted); }
.rqb-totals { border: 2px solid var(--rqb-navy); border-radius: 10px; padding: 8px 14px; margin: 16px 0; background: #fff; }
.rqb-totals div { display: flex; justify-content: space-between; padding: 5px 0; }
.rqb-totals .grand { border-top: 1px solid var(--rqb-line); margin-top: 4px; padding-top: 10px; font-size: 1.15rem; font-weight: 800; color: var(--rqb-navy); }
.rqb-warn { background: #fff7db; border: 1px solid #ecd37a; padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
.rqb-disc { color: var(--rqb-muted); font-size: .82rem; }

/* footer (sticky running total) */
.rqb-body { padding-bottom: 8px; }
.rqb-err { display: none; color: #b32d2e; background: #fdecec; border: 1px solid #f3c2c2; padding: 10px 12px; border-radius: 8px; margin: 10px 0; font-size: .92rem; }
.rqb-err:not(:empty) { display: block; }
.rqb-foot { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border-top: 2px solid var(--rqb-gold); padding: 10px 12px; margin-top: 16px; box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
.rqb-run small { display: block; color: var(--rqb-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.rqb-run b { font-size: 1.35rem; color: var(--rqb-navy); }
.rqb-nav { display: flex; gap: 8px; margin-left: auto; }

/* done */
.rqb-done { text-align: center; padding: 28px 12px; }
.rqb-check { width: 64px; height: 64px; border-radius: 50%; background: var(--rqb-gold); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }

/* v1.2 additions */
.rqb-note { background: var(--rqb-bg); border-left: 4px solid var(--rqb-gold); padding: 10px 12px; border-radius: 6px; margin: 0 0 8px; font-size: .92rem; }
.rqb-count { font-size: .78rem; font-weight: 600; color: var(--rqb-muted); margin-left: 6px; }
.rqb-incl { color: #2e7d32; }
.rqb-optwrap { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .85rem; }
.rqb-optwrap span { font-weight: 600; color: var(--rqb-navy); }
.rqb-opt { padding: 7px 8px; border: 1px solid #c9c3b6; border-radius: 6px; font: inherit; background: #fff; min-height: 38px; }
.rqb-totals .pp { color: var(--rqb-muted); font-size: .92rem; }
