/* Shared quote component. Only JavaScript opts the long form into steps. */
dialog.quote-modal {
  width: min(620px, 100%); max-width: none; max-height: 90vh;
  margin: auto; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px; background: var(--surface); color: var(--white);
  box-shadow: 0 40px 100px #08121999;
}
.quote-modal[open] { display: flex; flex-direction: column; }
.quote-modal::backdrop { background: #081219bd; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-form { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; font-family: var(--font-body); }
.modal-form [hidden] { display: none !important; }
.modal-form .modal-head { flex: none; padding: 22px 31px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.modal-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.quote-mark { width: 24px; height: 24px; flex: none; }
.modal-form .modal-title { margin: 0; font: 700 15px/1.5 var(--font-body); text-transform: none; letter-spacing: -.3px; }
.modal-close { display: grid; place-items: center; flex: none; width: 38px; height: 38px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; background: #ffffff08; color: var(--white); cursor: pointer; }
.modal-close svg { width: 19px; height: 19px; }
.modal-close:hover { background: #ffffff1a; }
.modal-form [data-step-ui] { display: none; }
.modal-form.is-stepped [data-step-ui] { display: block; }
.quote-progress { height: 6px; margin-top: 17px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.quote-progress-fill { height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.quote-count { margin-top: 8px; font-size: 12px; line-height: 18px; color: var(--muted); }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 25px 31px 28px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #ffffff40 transparent; }
.quote-step, .quote-compact { min-width: 0; padding: 0; border: 0; margin: 0 0 32px; }
.is-stepped .quote-step { margin: 0; }
.is-stepped .quote-step:not(.is-current) { display: none; }
.is-stepped .quote-step.is-current { animation: quote-step-in .2s ease both; }
.modal-form .quote-question { max-width: 100%; margin: 0; padding: 0; font: 800 26px/1.3 var(--font-body); letter-spacing: -1px; text-transform: none; text-wrap: balance; }
.quote-question:focus, .quote-success h3:focus { outline: none; }
.quote-explanation { margin: 9px 0 24px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.quote-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.quote-options-long { grid-template-columns: minmax(0,1fr); }
.quote-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; min-height: 56px; padding: 14px 16px; border: 1.5px solid rgba(255,255,255,.16); border-radius: 12px; cursor: pointer; transition: border-color .15s, background-color .15s; font-size: 14px; line-height: 1.5; }
.quote-option span { overflow-wrap: anywhere; }
.quote-option:hover { border-color: #ffffff66; }
.quote-option:has(:checked) { border-color: var(--accent); background: rgba(236, 104, 16, .07); }
.quote-option:has(:focus-visible) { outline: 2px solid white; outline-offset: 3px; }
.quote-option input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 2px solid #ffffff40; border-radius: 50%; background: transparent; }
.quote-option input:checked { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 8px white; }
.quote-option input:focus-visible { outline: none; }
.modal-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 16px; }
.modal-fields > label { display: flex; flex-wrap: wrap; align-content: start; align-items: baseline; gap: 8px 4px; min-width: 0; font-size: 14px; font-weight: 600; }
.modal-form .req { color: var(--accent); }
.modal-form .opt { color: var(--muted); font-weight: 400; }
.modal-form .span-2 { grid-column: 1 / -1; }
.quote-location { margin-top: 22px; }
.modal-form .m-field { flex: 0 0 100%; width: 100%; min-width: 0; max-width: 100%; height: 52px; padding: 0 16px; background: var(--tile); border: 1px solid #ffffff52; border-radius: 12px; color: var(--white); font: 400 16px/1.5 var(--font-body); }
.modal-form .m-field:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-form .m-field[aria-invalid="true"] { border-color: #ff8f8f; }
.modal-form .m-field::placeholder { color: var(--muted); opacity: 1; }
.modal-form textarea.m-field { height: auto; min-height: 150px; padding: 14px 16px; resize: vertical; }
.modal-fields > .file-field { flex-direction: column; align-items: stretch; gap: 14px; border: 1.5px dashed #ffffff52; border-radius: 12px; padding: 18px; }
.file-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.file-label svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.modal-form input[type="file"] { display: block; width: 100%; min-width: 0; max-width: 100%; color: var(--muted); font: 400 13px var(--font-body); }
.modal-form input[type="file"]::file-selector-button { padding: 10px 12px; margin-right: 10px; border: 0; border-radius: 8px; background: #ffffff18; color: white; font: 600 13px var(--font-body); cursor: pointer; }
.file-list { padding: 0; list-style: none; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.file-list:empty { display: none; }
.quote-compact { margin-bottom: 22px; }
.quote-compact > legend { margin-bottom: 10px; padding: 0; font-size: 14px; font-weight: 600; }
.quote-compact .quote-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.quote-compact .quote-option { min-height: 48px; padding: 10px 12px; font-size: 13px; }
.modal-consent { display: flex; align-items: flex-start; gap: 11px; margin-top: 24px; font-size: 13px; line-height: 1.6; color: #d8dee3; cursor: pointer; }
.modal-consent input { width: 17px; height: 17px; flex: none; margin: 3px 0 0; accent-color: var(--accent); }
.modal-consent input[aria-invalid="true"] { outline: 2px solid #ff8f8f; outline-offset: 3px; }
.modal-note { margin-top: 14px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.quote-field-error { margin-top: 8px; font-size: 13px; font-weight: 500; line-height: 1.5; color: #ff8f8f; }
.modal-fields .quote-field-error { flex: 0 0 100%; margin-top: 0; }
.modal-form .quote-status { margin: 16px 0 0; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.modal-form .quote-status:empty { display: none; }
.quote-status a { display: inline-block; text-decoration: underline; text-underline-offset: 4px; }
.modal-form .quote-status.is-error { color: #ff8f8f; }
.modal-form .quote-status.is-ok { color: #d8dee3; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: none; padding: 16px 31px; border-top: 1px solid rgba(255,255,255,.08); }
.quote-primary { min-height: 48px; padding: 12px 23px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font: 700 14px/1.5 var(--font-body); cursor: pointer; }
.quote-primary:hover { background: var(--accent-deep); }
.quote-primary:disabled { opacity: .65; cursor: progress; }
.quote-secondary { min-height: 48px; padding: 11px 22px; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: transparent; color: #fff; font: 700 14px/1.5 var(--font-body); cursor: pointer; transition: border-color .2s, background-color .2s; }
.quote-secondary:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }
.quote-text-button { min-height: 44px; padding: 8px 0; border: 0; background: none; color: white; font: 700 14px/1.5 var(--font-body); cursor: pointer; }
.quote-text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.modal-form .quote-back { margin-right: auto; }
.modal-form button:focus-visible, .modal-consent input:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.quote-success { text-align: center; padding: 24px 0 0; }
.quote-success-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 22px; border: 1px solid #ec681055; background: #ec681012; border-radius: 50%; color: var(--accent); }
.quote-success-icon svg { width: 30px; height: 30px; }
.modal-form .quote-success h3 { font: 800 26px/1.3 var(--font-body); letter-spacing: -.7px; text-transform: none; overflow-wrap: anywhere; }
.is-success .quote-status { text-align: center; }
.quote-success-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 0 8px; }
.inline-quote { min-width: 0; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--surface); }
.inline-quote .is-stepped { max-height: min(810px, calc(100dvh - var(--header-h) - 30px)); }
#quote-form { scroll-margin-top: 3px; }
@keyframes quote-step-in { from { opacity: 0; transform: translateX(9px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 639px) {
  dialog.quote-modal { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .modal-form .modal-head { padding: 17px 20px 16px; }
  .modal-body { padding: 24px 20px; }
  .modal-form .quote-question { font-size: 22px; letter-spacing: -.7px; }
  .quote-options, .modal-fields { grid-template-columns: minmax(0,1fr); }
  .quote-explanation { margin-bottom: 22px; }
  .modal-foot { padding: 14px 20px max(14px, env(safe-area-inset-bottom)); gap: 10px; }
  .quote-primary { padding-inline: 16px; font-size: 13px; }
  .quote-compact .quote-option { gap: 8px; padding-inline: 10px; }
  .inline-quote .modal-head, .inline-quote .modal-body, .inline-quote .modal-foot { padding-inline: 18px; }
  /* Keep the embedded footer above the existing floating contact buttons. */
  .inline-quote .is-stepped { max-height: calc(100dvh - var(--header-h) - 100px); }
}
@media (prefers-reduced-motion: reduce) {
  .is-stepped .quote-step.is-current { animation: none; }
  .quote-progress-fill, .quote-option { transition: none; }
}
.callback-schedule { margin-top: 22px; }
.callback-schedule input, .callback-schedule select { color-scheme: dark; }
.modal-form .callback-schedule input[type="date"] { appearance: none; -webkit-appearance: none; }
.modal-form select.m-field { padding-right: 8px; }
.quote-success .enquiry-whatsapp { margin-top: 4px; }
