/* Instant Quote Calculator v1.2 — all styles are scoped under .qc so they never clash with the host website. */

.qc {
  --qc-accent: #0f766e;
  --qc-accent-text: #ffffff;
  --qc-ink: #1c1917;
  --qc-muted: #78716c;
  --qc-line: #e7e5e4;
  --qc-surface: #ffffff;
  --qc-bg: #fafaf9;
  --qc-radius: 16px;
  --qc-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --qc-tint: color-mix(in srgb, var(--qc-accent) 9%, var(--qc-surface));
  --qc-tint-strong: color-mix(in srgb, var(--qc-accent) 18%, var(--qc-surface));

  container-type: inline-size;
  display: block;
  font-family: var(--qc-font);
  color: var(--qc-ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.qc *, .qc *::before, .qc *::after { box-sizing: border-box; }
.qc [hidden] { display: none !important; }
/* Resets use :where() (low priority) so component styles always win. */
.qc :where(h2, h3, p, ul, dl, dd, fieldset) { margin: 0; padding: 0; }
.qc :where(fieldset) { border: 0; min-width: 0; }
.qc :where(ul) { list-style: none; }
.qc :where(button, input) { font-family: inherit; color: inherit; }
.qc :where(svg) { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.qc-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.qc__layout { display: grid; gap: 20px; align-items: start; }
.qc__card, .qc__summary {
  background: var(--qc-surface);
  border: 1.5px solid var(--qc-line);
  border-radius: var(--qc-radius);
}
.qc__card { padding: 22px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.qc__summary { padding: 24px; position: sticky; top: 20px; }

@container (min-width: 760px) {
  .qc__layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .qc__card { padding: 32px; }
  .qc__mobile-price { display: none !important; }
  .qc.is-done .qc__layout { grid-template-columns: minmax(0, 1fr); }
  .qc.is-done .qc__summary { display: none; }
}

/* ---------- header ---------- */
.qc__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--qc-accent);
}
.qc__head { display: grid; gap: 12px; }
.qc__progress { display: grid; gap: 8px; }
.qc__steplabel { font-size: 13px; color: var(--qc-muted); font-weight: 600; }
.qc__bar { height: 6px; background: var(--qc-line); border-radius: 99px; overflow: hidden; }
.qc__bar span { display: block; height: 100%; background: var(--qc-accent); border-radius: inherit; transition: width .35s ease; }
.qc__mobile-price {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  background: var(--qc-tint); border-radius: 12px; padding: 12px 16px;
}
.qc__mobile-price span { font-size: 13px; color: var(--qc-muted); font-weight: 600; }
.qc__mobile-price strong { white-space: nowrap; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.qc__mobile-price strong small { font-size: 13px; font-weight: 600; color: var(--qc-muted); }
.qc__mobile-price strong.is-pending { font-size: 14px; font-weight: 600; color: var(--qc-muted); }

/* ---------- step content ---------- */
.qc__step { display: grid; gap: 14px; animation: qc-in .25s ease; }
@keyframes qc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qc__step { animation: none; } .qc__bar span { transition: none; } }

.qc__title { font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; outline: none; }
.qc__subtitle { font-size: 18px; font-weight: 700; }
.qc__help { color: var(--qc-muted); font-size: 15px; }
.qc__opt { color: var(--qc-muted); font-weight: 500; }

/* Service options */
.qc__options { display: grid; gap: 12px; margin-top: 6px; }
.qc__option {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 16px; border: 1.5px solid var(--qc-line); border-radius: 14px; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.qc__option:hover { border-color: color-mix(in srgb, var(--qc-accent) 45%, var(--qc-line)); }
.qc__option input, .qc__pill input, .qc__extra input { position: absolute; opacity: 0; pointer-events: none; }
.qc__option-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--qc-bg); color: var(--qc-accent); font-size: 22px;
}
.qc__option-text { display: grid; gap: 2px; }
.qc__option-text strong { font-weight: 700; }
.qc__option-text small { color: var(--qc-muted); font-size: 13.5px; }
.qc__option-price { font-size: 13px; font-weight: 700; color: var(--qc-muted); white-space: nowrap; }
.qc__option:has(input:checked) { border-color: var(--qc-accent); background: var(--qc-tint); box-shadow: 0 0 0 1px var(--qc-accent); }
.qc__option:has(input:checked) .qc__option-icon { background: var(--qc-accent); color: var(--qc-accent-text); }
.qc__option:has(input:checked) .qc__option-price { color: var(--qc-accent); }
.qc__option:has(input:focus-visible), .qc__pill:has(input:focus-visible), .qc__extra:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--qc-accent) 40%, transparent); outline-offset: 2px;
}

/* Steppers */
.qc__steppers { display: grid; gap: 12px; margin-top: 6px; }
.qc__stepper {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 16px; border: 1.5px solid var(--qc-line); border-radius: 14px;
}
.qc__stepper-label { font-weight: 700; }
.qc__stepper-ctrl { display: flex; align-items: center; gap: 14px; }
.qc__count { min-width: 56px; text-align: center; font-size: 20px; font-weight: 800; }
.qc__round {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--qc-line); background: var(--qc-surface);
  font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: border-color .15s, background .15s, color .15s;
}
.qc__round:hover:not(:disabled) { border-color: var(--qc-accent); color: var(--qc-accent); background: var(--qc-tint); }
.qc__round:disabled { opacity: .35; cursor: not-allowed; }

/* Frequency pills */
.qc__pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.qc__pill { position: relative; cursor: pointer; }
.qc__pill > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px;
  padding: 10px; border: 1.5px solid var(--qc-line); border-radius: 12px; font-weight: 700; text-align: center;
  transition: border-color .15s, background .15s;
}
.qc__pill:hover > span { border-color: color-mix(in srgb, var(--qc-accent) 45%, var(--qc-line)); }
.qc__pill input:checked + span { border-color: var(--qc-accent); background: var(--qc-tint); box-shadow: 0 0 0 1px var(--qc-accent); }
.qc__pill.is-disabled { cursor: not-allowed; opacity: .45; }
.qc__save {
  font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--qc-accent);
  background: var(--qc-tint-strong); padding: 2px 8px; border-radius: 99px;
}
@container (min-width: 520px) { .qc__pills { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Fields */
.qc__field { display: grid; gap: 6px; }
.qc__field--date { margin-top: 8px; }
.qc__field > label { font-size: 14px; font-weight: 700; }
.qc__field input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--qc-line); border-radius: 10px;
  background: var(--qc-surface); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.qc__field input:focus { outline: none; border-color: var(--qc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--qc-accent) 20%, transparent); }
.qc__field input[aria-invalid="true"] { border-color: #dc2626; }
.qc__check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--qc-muted); cursor: pointer; margin-top: 4px; }
.qc__check input { width: 18px; height: 18px; accent-color: var(--qc-accent); }

/* Extras */
.qc__extras { display: grid; gap: 10px; margin-top: 6px; }
@container (min-width: 560px) { .qc__extras { grid-template-columns: 1fr 1fr; } }
.qc__extra {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  border: 1.5px solid var(--qc-line); border-radius: 12px; transition: border-color .15s, background .15s;
}
.qc__extra:hover { border-color: color-mix(in srgb, var(--qc-accent) 45%, var(--qc-line)); }
.qc__tick {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--qc-line); color: transparent; font-size: 15px; transition: all .15s;
}
.qc__tick svg { stroke-width: 2.6; }
.qc__extra-label { flex: 1; font-weight: 600; }
.qc__extra-price { font-weight: 700; color: var(--qc-muted); font-size: 14px; }
.qc__extra:has(input:checked) { border-color: var(--qc-accent); background: var(--qc-tint); }
.qc__extra:has(input:checked) .qc__tick { background: var(--qc-accent); border-color: var(--qc-accent); color: var(--qc-accent-text); }
.qc__extra:has(input:checked) .qc__extra-price { color: var(--qc-accent); }

/* Estimate + breakdown */
.qc__estimate { background: var(--qc-bg); border: 1.5px solid var(--qc-line); border-radius: 14px; padding: 20px; display: grid; gap: 4px; }
.qc__estimate-label { font-size: 13px; font-weight: 700; color: var(--qc-muted); text-transform: uppercase; letter-spacing: .06em; }
.qc__estimate-total { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--qc-ink); }
.qc__estimate-note { font-size: 13px; color: var(--qc-muted); margin-bottom: 10px; }
.qc__lines { display: grid; gap: 8px; font-size: 14.5px; }
.qc__lines li { display: flex; justify-content: space-between; gap: 12px; }
.qc__lines li span:first-child { color: var(--qc-muted); }
.qc__lines li span:last-child { font-weight: 700; white-space: nowrap; }
.qc__lines li.is-discount span { color: var(--qc-accent); }
.qc__lines li.is-note { font-size: 13px; padding-top: 8px; border-top: 1px dashed var(--qc-line); }
.qc__lines li.is-note span:last-child { color: var(--qc-ink); }

/* Form */
.qc__form { display: grid; gap: 14px; margin-top: 10px; padding-top: 22px; border-top: 1.5px solid var(--qc-line); }
.qc__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.qc__error { color: #dc2626; font-size: 14px; font-weight: 600; min-height: 0; }
.qc__error:empty { display: none; }
.qc__field-error { color: #dc2626; font-size: 13.5px; font-weight: 600; }
.qc__field-error:empty { display: none; }
.qc__fine { font-size: 12.5px; color: var(--qc-muted); text-align: center; }

/* Buttons */
.qc__nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qc__nav:empty { display: none; }
.qc__btn {
  appearance: none; border: 1.5px solid transparent; border-radius: 12px; padding: 13px 24px;
  font-weight: 700; font-size: 15.5px; cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s, opacity .15s;
}
.qc__btn:active:not(:disabled) { transform: translateY(1px); }
.qc__btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--qc-accent) 40%, transparent); outline-offset: 2px; }
.qc__btn--primary { background: var(--qc-accent); color: var(--qc-accent-text); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--qc-accent) 70%, transparent); }
.qc__btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--qc-accent) 88%, #000); }
.qc__btn--primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.qc__btn--ghost { background: transparent; border-color: var(--qc-line); color: var(--qc-ink); }
.qc__btn--ghost:hover { background: var(--qc-bg); }
.qc__btn--block { width: 100%; padding: 15px 24px; font-size: 16px; }

/* Summary panel */
.qc__summary { display: none; }
@container (min-width: 760px) { .qc__summary { display: grid; gap: 10px; } }
.qc__sum-total { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.qc__sum-total small { font-size: 15px; font-weight: 600; color: var(--qc-muted); letter-spacing: 0; }
.qc__sum-total.is-pending { font-size: 18px; color: var(--qc-muted); font-weight: 700; letter-spacing: 0; }
.qc__sum-note { font-size: 13px; color: var(--qc-muted); padding-bottom: 12px; border-bottom: 1.5px solid var(--qc-line); }
.qc__trust { display: grid; gap: 12px; padding-top: 4px; }
.qc__trust li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; }
.qc__trust svg { flex: none; margin-top: 2px; color: var(--qc-accent); stroke-width: 2.4; font-size: 18px; }

/* Done */
.qc__done { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 16px 0 8px; }
.qc__done-icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--qc-tint-strong); color: var(--qc-accent); font-size: 32px;
}
.qc__done-icon svg { stroke-width: 2.4; }
.qc__done .qc__help { max-width: 440px; }
.qc__recap { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 6px 0; }
.qc__recap div { background: var(--qc-bg); border: 1.5px solid var(--qc-line); border-radius: 12px; padding: 12px 18px; min-width: 160px; }
.qc__recap dt { font-size: 12px; font-weight: 700; color: var(--qc-muted); text-transform: uppercase; letter-spacing: .06em; }
.qc__recap dd { font-size: 18px; font-weight: 800; }
.qc__badge { font-size: 13px; font-weight: 700; color: var(--qc-accent); background: var(--qc-tint); padding: 6px 12px; border-radius: 99px; }

@container (max-width: 420px) {
  .qc__card { padding: 18px; }
  .qc__title { font-size: 21px; }
  .qc__option { grid-template-columns: auto 1fr; }
  .qc__option-price { grid-column: 2; }
  .qc__estimate-total { font-size: 34px; }
}

/* Staff view (owner/staff only) */
.qc__staff {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: #fffbeb; border: 1.5px dashed #f59e0b;
}
.qc__staff-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #92400e; margin-bottom: 8px !important; }
.qc__staff-title span { font-weight: 600; text-transform: none; letter-spacing: 0; color: #a16207; margin-left: 6px; }
.qc__staff .qc__lines { font-size: 14px; gap: 6px; }
.qc__staff .qc__lines li span:first-child { color: #78350f; }
.qc__staff .qc__lines li.is-profit span:last-child { color: #15803d; }
.qc__staff .qc__lines li.is-loss span:last-child { color: #dc2626; }

/* PDF + done actions */
.qc__btn--pdf { margin-top: 2px; }
.qc__done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
