/* Request form, new structure preview (owner only, /request/?form_preview=1).
   Scoped to body.smc-rq-m3. Works on every width; the price summary sits in the
   sidebar on wide screens and inside each step on phones and tablets. */

body.smc-rq-m3 .smc-form-steps,
body.smc-rq-m3 .smc-step-panel > .smc-form-section-title,
body.smc-rq-m3 .smc-step-panel > .smc-step-actions,
body.smc-rq-m3 .smc-step-panel > .smc-estimate,
body.smc-rq-m3 .smc-rq-summary > .smc-rq-card:not(.m3-summary):not(.smc-rq-next),
body.smc-rq-m3 .m3-gone,
body.smc-rq-m3 .m3-hide-label { display: none !important; }
body.smc-rq-m3 .m3-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; margin: 0 !important; }
body.smc-rq-m3 .m3-view[hidden], body.smc-rq-m3 .m3-mode[hidden] { display: none !important; }

/* Step header: where you are and what is left, every step reachable once done */
body.smc-rq-m3 .m3-head { margin: 0 0 22px; }
body.smc-rq-m3 .m3-head-count { font-size: 13px; font-weight: 700; color: #0284c7; letter-spacing: .02em; }
body.smc-rq-m3 .m3-head-title { margin: 4px 0 4px; font-size: 1.3rem; line-height: 1.25; outline: none; }
body.smc-rq-m3 .m3-head-lead { margin: 0 0 14px; color: #475569; font-size: 14.5px; line-height: 1.5; }
body.smc-rq-m3 .m3-head-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
body.smc-rq-m3 .m3-head-bar li { min-width: 0; }
body.smc-rq-m3 .m3-head-bar button { display: block; width: 100%; padding: 10px 0 0; border: 0; background: none; text-align: left; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.2; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; position: relative; }
body.smc-rq-m3 .m3-head-bar button::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 4px; background: #e2e8f0; transition: background-color .3s ease-out; }
body.smc-rq-m3 .m3-head-bar li.is-done button { color: #0f172a; }
body.smc-rq-m3 .m3-head-bar li.is-done button::after { background: #7dd3fc; }
body.smc-rq-m3 .m3-head-bar li.is-on button { color: #0284c7; }
body.smc-rq-m3 .m3-head-bar li.is-on button::after { background: #0ea5e9; }
@media (max-width: 360px) {
  body.smc-rq-m3 .m3-head-bar button { font-size: 11px; }
}

/* Sections inside a step; the second part of a step starts with a clear line */
body.smc-rq-m3 .m3-view[data-box="3"]:not([hidden]), body.smc-rq-m3 .m3-view[data-box="6"]:not([hidden]) { margin-top: 6px; padding-top: 22px; border-top: 1px solid #e2e8f0; }
body.smc-rq-m3 .m3-view { animation: m3in .32s ease-out; }
@keyframes m3in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body.smc-rq-m3 .m3-sec, body.smc-rq-m3 .m3-mode > .smc-plan-block, body.smc-rq-m3 .m3-mode > .smc-addr-saved { margin: 0 0 26px; }
body.smc-rq-m3 .m3-sec-title, body.smc-rq-m3 .m3-mode .smc-plan-block-title { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: #0f172a; }
body.smc-rq-m3 .m3-sec-help { margin: 0 0 12px; font-size: 13.5px; color: #64748b; line-height: 1.5; }
body.smc-rq-m3 .smc-plan-block-grid { gap: 16px; }
body.smc-rq-m3 .smc-form-row { min-width: 0; }

/* Choices: rows that wrap, never sideways; any number of options stays tidy */
body.smc-rq-m3 .m3-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
body.smc-rq-m3 .m3-opts-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { body.smc-rq-m3 .m3-opts-two { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
body.smc-rq-m3 .m3-opts-rows { grid-template-columns: 1fr; }
@media (min-width: 900px) { body.smc-rq-m3 .m3-opts-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.smc-rq-m3 .m3-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 48px; padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 14px; background: #fff; font: inherit; text-align: left; color: #0f172a; cursor: pointer; transition: border-color .2s ease-out, background-color .2s ease-out, box-shadow .2s ease-out; }
body.smc-rq-m3 .m3-opt-name { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
body.smc-rq-m3 .m3-opt-sub { font-size: 12.5px; color: #64748b; line-height: 1.4; }
body.smc-rq-m3 .m3-opt-sub b { display: block; margin-top: 4px; color: #0f172a; font-weight: 700; }
body.smc-rq-m3 .m3-opt-sub .m3-save, body.smc-rq-m3 .m3-save { display: inline; color: #047857; }
body.smc-rq-m3 .m3-opt.is-on { border-color: #0ea5e9; background: #f0f9ff; box-shadow: 0 0 0 3px rgba(14, 165, 233, .12); }
@media (hover: hover) { body.smc-rq-m3 .m3-opt:hover { border-color: #93c5fd; } }
body.smc-rq-m3 .m3-opt:focus-visible, body.smc-rq-m3 .m3-addon-btn:focus-visible, body.smc-rq-m3 .m3-nav button:focus-visible, body.smc-rq-m3 .m3-step button:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }

/* Counts side by side */
body.smc-rq-m3 .m3-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
body.smc-rq-m3 .m3-counts .smc-form-row { margin: 0; padding: 10px 6px 8px; border: 1.5px solid #e2e8f0; border-radius: 14px; background: #fff; text-align: center; }
body.smc-rq-m3 .m3-counts .smc-label-line { justify-content: center; }
body.smc-rq-m3 .m3-counts .smc-form-label { font-size: 12.5px; font-weight: 700; color: #475569; margin: 0; }
body.smc-rq-m3 .m3-counts .smc-tip { display: none; }
body.smc-rq-m3 .m3-step { display: flex; align-items: center; justify-content: space-between; gap: 2px; margin-top: 6px; }
body.smc-rq-m3 .m3-step button { flex: 0 0 32px; height: 32px; border-radius: 50%; border: 0; background: #eef2f7; color: #0f172a; font-size: 18px; line-height: 1; cursor: pointer; transition: background-color .2s ease-out, transform .12s ease-out; }
body.smc-rq-m3 .m3-step button:active { transform: scale(.92); }
body.smc-rq-m3 .m3-step .smc-input { min-width: 0; width: 100%; height: 32px; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; text-align: center; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
body.smc-rq-m3 .m3-step .smc-input::-webkit-outer-spin-button, body.smc-rq-m3 .m3-step .smc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.smc-rq-m3 .m3-step .smc-input::placeholder { color: #94a3b8; opacity: 1; }
body.smc-rq-m3 .m3-mode .smc-plan-block-grid:has(> .smc-form-row:only-child) { display: block; }

/* Cleaning condition: the live cards as a clear vertical list */
body.smc-rq-m3 .smc-cond-toggle { display: grid !important; grid-template-columns: 1fr !important; gap: 8px; }
body.smc-rq-m3 .smc-cond-option { border: 1.5px solid #e2e8f0 !important; border-radius: 14px !important; background: #fff !important; box-shadow: none !important; padding: 12px 14px !important; transform: none !important; }
body.smc-rq-m3 .smc-cond-option.smc-plan-option-active { border-color: #0ea5e9 !important; background: #f0f9ff !important; box-shadow: 0 0 0 3px rgba(14, 165, 233, .12) !important; }
body.smc-rq-m3 .smc-cond-block > .smc-plan-small-help:first-of-type { margin-bottom: 12px; }

/* Plan cards on step 1 stay as they are, in one column on phones */
body.smc-rq-m3 .m3-sec .smc-plan-toggle { margin: 0; }

/* Add-ons: offers with what they include, time and price, one clear action */
body.smc-rq-m3 .m3-addons { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 900px) { body.smc-rq-m3 .m3-addons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.smc-rq-m3 .m3-addon { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; padding: 14px; border: 1.5px solid #e2e8f0; border-radius: 16px; background: #fff; transition: border-color .2s ease-out, background-color .2s ease-out; }
body.smc-rq-m3 .m3-addon.is-on { border-color: #0ea5e9; background: #f0f9ff; }
body.smc-rq-m3 .m3-addon[hidden] { display: none; }
body.smc-rq-m3 .m3-addon-name { font-size: 15px; font-weight: 700; color: #0f172a; line-height: 1.3; }
body.smc-rq-m3 .m3-addon-desc { margin-top: 3px; font-size: 13px; color: #475569; line-height: 1.45; }
body.smc-rq-m3 .m3-addon-meta { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; }
body.smc-rq-m3 .m3-addon-meta:empty { display: none; }
body.smc-rq-m3 .m3-addon-btn { min-width: 76px; height: 36px; padding: 0 14px; border: 1.5px solid #0ea5e9; border-radius: 999px; background: #fff; color: #0284c7; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color .2s ease-out, color .2s ease-out, transform .12s ease-out; }
body.smc-rq-m3 .m3-addon-btn:active { transform: scale(.96); }
body.smc-rq-m3 .m3-addon.is-on .m3-addon-btn { background: #0ea5e9; color: #fff; }
body.smc-rq-m3 .m3-addon-fc { background: #f8fafc; }
body.smc-rq-m3 .m3-addon-tag { align-self: start; padding: 6px 10px; border-radius: 999px; background: #e0f2fe; color: #075985; font-size: 12.5px; font-weight: 700; }
body.smc-rq-m3 .m3-addon-qty { grid-column: 1 / -1; display: none !important; margin: 10px 0 0 !important; padding: 10px 0 0 !important; border-top: 1px solid #dbeafe; align-items: center; justify-content: space-between; gap: 12px; }
body.smc-rq-m3 .m3-addon.is-on .m3-addon-qty { display: flex !important; max-height: none !important; height: auto !important; overflow: visible !important; opacity: 1 !important; visibility: visible !important; }
body.smc-rq-m3 .m3-addon-qty > .smc-form-label { margin: 0; font-size: 13px; font-weight: 600; color: #334155; }
body.smc-rq-m3 .m3-addon-qty .smc-stepper { flex: 0 0 132px; }

/* Errors in words, at the field */
body.smc-rq-m3 .m3-err { box-shadow: 0 0 0 2px #fca5a5; border-radius: 14px; }
body.smc-rq-m3 .m3-err-msg { margin: 6px 2px 0; font-size: 13px; font-weight: 600; color: #b42318; }

/* Price summary */
body.smc-rq-m3 .m3-summary { padding: 16px; border: 1.5px solid #e2e8f0; border-radius: 18px; background: #fff; }
body.smc-rq-m3 .m3-summary-inline { margin: 4px 0 18px; }
@media (min-width: 1024px) { body.smc-rq-m3 .m3-summary-inline { display: none; } }
@media (max-width: 1023px) { body.smc-rq-m3 .m3-summary-side { display: none !important; } }
body.smc-rq-m3[data-m3-view="1"] .m3-summary-side { display: none; }
body.smc-rq-m3 .m3-sum-empty { margin: 0; font-size: 13.5px; color: #64748b; }
body.smc-rq-m3 .m3-sum-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px; font-weight: 800; color: #0f172a; }
body.smc-rq-m3 .m3-sum-note { font-size: 12px; font-weight: 600; color: #64748b; }
body.smc-rq-m3 .m3-sum-lines { list-style: none; margin: 0; padding: 0; }
body.smc-rq-m3 .m3-sum-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 7px 0; border-top: 1px solid #f1f5f9; font-size: 13.5px; line-height: 1.35; font-variant-numeric: tabular-nums; }
body.smc-rq-m3 .m3-sum-lines li:first-child { border-top: 0; }
body.smc-rq-m3 .m3-sum-name { color: #0f172a; }
body.smc-rq-m3 .m3-sum-lines li.is-first .m3-sum-name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 7px 1px 0; border-radius: 50%; background: #f59e0b; vertical-align: middle; }
body.smc-rq-m3 .m3-sum-time { color: #64748b; white-space: nowrap; }
body.smc-rq-m3 .m3-sum-price { color: #0f172a; font-weight: 700; white-space: nowrap; min-width: 56px; text-align: right; }
body.smc-rq-m3 .m3-sum-total, body.smc-rq-m3 .m3-sum-next { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-variant-numeric: tabular-nums; }
body.smc-rq-m3 .m3-sum-total { margin-top: 8px; padding-top: 10px; border-top: 1.5px solid #e2e8f0; font-size: 14.5px; font-weight: 700; }
body.smc-rq-m3 .m3-sum-total strong { font-size: 1.3rem; font-weight: 800; color: #0f172a; }
body.smc-rq-m3 .m3-sum-next { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #ecfdf5; color: #065f46; font-size: 14px; font-weight: 600; }
body.smc-rq-m3 .m3-sum-next strong { font-size: 1.05rem; }
body.smc-rq-m3 .m3-sum-fine { margin: 10px 0 0; font-size: 12px; color: #64748b; line-height: 1.45; }

/* Review */
body.smc-rq-m3 .m3-rev { margin: 0; border: 1.5px solid #e2e8f0; border-radius: 18px; background: #fff; }
body.smc-rq-m3 .m3-rev-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 14px; border-top: 1px solid #f1f5f9; }
body.smc-rq-m3 .m3-rev-row:first-child { border-top: 0; }
body.smc-rq-m3 .m3-rev dt { font-size: 13px; font-weight: 600; color: #64748b; }
body.smc-rq-m3 .m3-rev dd { margin: 0; font-size: 14px; color: #0f172a; line-height: 1.45; overflow-wrap: anywhere; }
body.smc-rq-m3 .m3-rev-edit { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: #0284c7; cursor: pointer; }
@media (max-width: 380px) { body.smc-rq-m3 .m3-rev-row { grid-template-columns: minmax(0, 1fr) auto; } body.smc-rq-m3 .m3-rev dt { grid-column: 1 / -1; } }

/* One navigation, always in the same place: Back on the left, Continue on the right */
body.smc-rq-m3 .m3-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 18px; border-top: 1px solid #e2e8f0; }
body.smc-rq-m3 .m3-back { height: 48px; padding: 0 20px; border: 1.5px solid #cbd5e1; border-radius: 999px; background: #fff; color: #0f172a; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
body.smc-rq-m3 .m3-next { flex: 1 1 auto; max-width: 320px; height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: #0ea5e9; color: #fff; font: inherit; font-size: 15.5px; font-weight: 800; cursor: pointer; transition: background-color .2s ease-out, transform .12s ease-out; }
body.smc-rq-m3 .m3-next:active, body.smc-rq-m3 .m3-back:active { transform: scale(.98); }
@media (hover: hover) { body.smc-rq-m3 .m3-next:hover { background: #0284c7; } }
body.smc-rq-m3 .m3-nav > span:empty { flex: 0 0 0; }
body.smc-rq-m3 [data-view="1"] .m3-nav .m3-next { margin-left: auto; }

body.smc-rq-m3 .m3-badge { position: fixed; bottom: 12px; left: 12px; z-index: 80; padding: 4px 10px; border-radius: 999px; background: #0f172a; color: #fff; font-size: 11px; font-weight: 700; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  body.smc-rq-m3 .m3-view { animation: none; }
  body.smc-rq-m3 .m3-opt, body.smc-rq-m3 .m3-addon, body.smc-rq-m3 .m3-addon-btn, body.smc-rq-m3 .m3-next, body.smc-rq-m3 .m3-head-bar button::after { transition: none; }
}

/* Counted add-ons: the count is the control */
body.smc-rq-m3 .m3-qty-hold[hidden] { display: none !important; }
body.smc-rq-m3 .m3-qty { display: grid; grid-template-columns: 36px 30px 36px; align-items: center; height: 40px; border: 1.5px solid #cbd5e1; border-radius: 999px; background: #fff; overflow: hidden; }
body.smc-rq-m3 .m3-addon.is-on .m3-qty { border-color: #0ea5e9; }
body.smc-rq-m3 .m3-qty-btn { height: 100%; border: 0; background: none; color: #0284c7; font: inherit; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
body.smc-rq-m3 .m3-qty-btn:active { background: #e0f2fe; }
body.smc-rq-m3 .m3-qty-num { text-align: center; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: #0f172a; }
body.smc-rq-m3 .m3-addon-unit { margin-top: 2px; font-size: 12px; color: #64748b; }
body.smc-rq-m3 .m3-addon-btn, body.smc-rq-m3 .m3-qty { align-self: center; }

/* Price lines in fixed columns so times and prices line up */
body.smc-rq-m3 .m3-sum-lines li { grid-template-columns: minmax(0, 1fr) 72px 64px; }
body.smc-rq-m3 .m3-sum-time { text-align: right; }

/* The form's own floating price bar stays; the scroll-to-top button steps aside for it */
body.smc-rq-m3 .smc-scroll-top { display: none !important; }

/* Tasks and areas as cards */
body.smc-rq-m3 .m3-cards { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 900px) { body.smc-rq-m3 .m3-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.smc-rq-m3 .m3-cards > :not(.m3-addon):not(.m3-gone) { grid-column: 1 / -1; }

/* Counted add-ons: Add first; the count shows once the add-on is chosen */
body.smc-rq-m3 .m3-addon:not(.is-on) > .m3-qty,
body.smc-rq-m3 .m3-addon.is-on > .m3-qty-add { display: none; }
body.smc-rq-m3 .m3-addon > .m3-qty-add, body.smc-rq-m3 .m3-addon > .m3-qty { grid-column: 2; grid-row: 1; }
body.smc-rq-m3 .m3-addon.is-on > .m3-qty { animation: m3pop .2s ease-out; }
@keyframes m3pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.smc-rq-m3 .m3-addon.is-on > .m3-qty { animation: none; } }

/* Fill the row (owner 2026-11-03): a choice list, add-ons or cards always take the whole width of
   the step, whatever grid or narrow row the old form put them in; the cards share the row evenly
   (auto-fit stretches them, so no empty column is left on desktop). */
body.smc-rq-m3 .smc-form-row:has(> .m3-opts),
body.smc-rq-m3 .smc-form-row:has(> .m3-addons) { grid-column: 1 / -1; max-width: none !important; width: auto !important; }
body.smc-rq-m3 .smc-plan-block-grid:has(> .smc-form-row > .m3-opts) { grid-template-columns: minmax(0, 1fr) !important; }
body.smc-rq-m3 .m3-opts,
body.smc-rq-m3 .m3-opts-two { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (min-width: 900px) {
  body.smc-rq-m3 .m3-opts-rows { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
body.smc-rq-m3 .m3-opt { height: 100%; }
/* Saved addresses: the cards and the "another address" control use the full width. */
body.smc-rq-m3 .smc-addr-saved-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
body.smc-rq-m3 .smc-addr-saved-list > * { max-width: none !important; width: auto !important; margin: 0 !important; }
body.smc-rq-m3 .smc-addr-saved > button, body.smc-rq-m3 .smc-addr-saved > .smc-btn, body.smc-rq-m3 .smc-addr-saved summary { width: 100%; justify-content: center; }

/* Navigation: Continue fills the row next to Back (alone on the first step), never a short
   button stranded at one edge. */
body.smc-rq-m3 .m3-next { flex: 1 1 auto; max-width: none; }
body.smc-rq-m3 .m3-back { flex: 0 0 auto; min-width: 120px; }

/* Estimate as a receipt: Subtotal and HST at line size, one bold total, later visits in one quiet line */
body.smc-rq-m3 .m3-sum-calc { margin: 8px 0 0; padding-top: 10px; border-top: 1.5px solid #e2e8f0; display: grid; gap: 6px; }
body.smc-rq-m3 .m3-sum-calc > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-variant-numeric: tabular-nums; }
body.smc-rq-m3 .m3-sum-calc dt { margin: 0; font-size: 13.5px; font-weight: 500; color: #475569; }
body.smc-rq-m3 .m3-sum-calc dd { margin: 0; font-size: 13.5px; font-weight: 600; color: #0f172a; white-space: nowrap; }
body.smc-rq-m3 .m3-sum-calc .m3-sum-grand { margin-top: 2px; padding-top: 8px; border-top: 1px solid #f1f5f9; }
body.smc-rq-m3 .m3-sum-calc .m3-sum-grand dt { font-size: 15px; font-weight: 700; color: #0f172a; }
body.smc-rq-m3 .m3-sum-calc .m3-sum-grand dd { font-size: 1.15rem; font-weight: 800; color: #0f172a; }
body.smc-rq-m3 .m3-sum-later { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: #f0fdf4; color: #065f46; font-size: 13.5px; font-variant-numeric: tabular-nums; }
body.smc-rq-m3 .m3-sum-later strong { font-size: 14px; font-weight: 700; white-space: nowrap; }

/* The form shows once its new layout is drawn (no flash of the old form); the template hides it
   until request-m3.js adds body.m3-ready, with a time-out in case the script never runs. */
body.m3-ready .smc-request, body.m3-ready .smc-oe-cloak { visibility: visible !important; animation: none !important; }
