/* ==========================================================================
   ExtractHelp — project brief form (homepage and contact page)
   ========================================================================== */

.section--quote { background: var(--bg); }
.quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px clamp(28px, 4vw, 56px); align-items: start; }
.quote-layout__form h2 { margin-block-end: 10px; }
.quote-layout__intro { color: var(--muted); font-size: 1.06rem; max-width: 60ch; margin-block-end: 26px; }
@media (max-width: 1000px) { .quote-layout { grid-template-columns: 1fr; } }

.quote-form, .quote-success {
  position: relative; padding: clamp(20px, 3.2vw, 36px); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow);
}

/* Progress */
.quote-progress { margin-block-end: 26px; }
.quote-progress__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
.quote-progress__steps li { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 650; color: var(--muted); min-width: 0; }
.quote-progress__num { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: .78rem; background: var(--surface); transition: background-color .2s, color .2s, border-color .2s; }
.quote-progress__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-progress__bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.quote-progress__bar span { display: block; height: 100%; width: 25%; border-radius: 4px; background: linear-gradient(90deg, var(--brand-orange), #FF8A4C); transition: width .35s var(--ease); }
.quote-progress__bar span:dir(rtl) { margin-inline-start: auto; }
.quote-form[data-step="2"] .quote-progress__bar span { width: 50%; }
.quote-form[data-step="3"] .quote-progress__bar span { width: 75%; }
.quote-form[data-step="4"] .quote-progress__bar span { width: 100%; }
.quote-progress__steps li.is-current { color: var(--heading); }
.quote-progress__steps li.is-current .quote-progress__num { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.quote-progress__steps li.is-done .quote-progress__num { background: var(--brand-orange); border-color: var(--brand-orange); color: #061238; }

@media (max-width: 560px) { .quote-progress__label { display: none; } .quote-progress__steps li.is-current .quote-progress__label { display: inline; } }
html:not(.js) .quote-progress { display: none; }

.quote-alert { display: flex; gap: 10px; align-items: flex-start; margin-block-end: 20px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--heading); font-size: .92rem; font-weight: 600; }
.quote-alert .icon { width: 20px; height: 20px; color: var(--danger); }

/* Steps */
.quote-step { display: none; gap: 20px; margin: 0; padding: 0; border: 0; min-width: 0; }
.quote-step.is-active { display: grid; animation: step-in .28s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.quote-step.is-active:dir(rtl) { animation-name: step-in-rtl; }
@keyframes step-in-rtl { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
html:not(.js) .quote-step { display: grid; }
html:not(.js) .quote-step + .quote-step { margin-block-start: 32px; padding-block-start: 32px; border-block-start: 1px solid var(--line); }
html:not(.js) .quote-nav [data-next], html:not(.js) .quote-nav [data-back] { display: none; }
.quote-step__title { float: left; width: 100%; display: flex; align-items: baseline; gap: 12px; padding: 0; margin: 0; font-size: 1.3rem; font-weight: 720; color: var(--heading); line-height: 1.25; }
.quote-step__index { font-family: var(--font-mono); font-size: .8rem; font-weight: 600; color: var(--accent-text); }
.quote-step__title + * { clear: both; }
.quote-step__text { margin: -10px 0 0; color: var(--muted); font-size: .94rem; }

/* Service area choices */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .choice-grid { grid-template-columns: minmax(0, 1fr); } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__box {
  display: flex; align-items: center; gap: 10px; height: 100%; min-height: 56px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--heading); font-weight: 620; font-size: .92rem; line-height: 1.3; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.choice__box .icon { width: 20px; height: 20px; color: var(--muted); transition: color .15s; }
.choice__box > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choice:hover .choice__box { border-color: var(--heading); }
.choice input:checked + .choice__box { border-color: var(--brand-orange); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--brand-orange); }
.choice input:checked + .choice__box .icon { color: var(--accent-text); }
.choice input:focus-visible + .choice__box { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-grid.has-error .choice__box { border-color: var(--danger); }

.pill-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-choice { position: relative; cursor: pointer; }
.pill-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-choice > span { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: .9rem; font-weight: 600; color: var(--text); transition: border-color .15s, background-color .15s, color .15s; }
.pill-choice .icon { width: 16px; height: 16px; }
.pill-choice:hover > span { border-color: var(--heading); }
.pill-choice input:checked + span { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

.pill-choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.textarea--short { min-height: 76px; }

/* File upload */
.dropzone { position: relative; }
.dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__label {
  display: grid; justify-items: center; gap: 4px; padding: 22px 16px; border-radius: var(--r); border: 1.5px dashed var(--line-strong);
  background: var(--bg-soft); color: var(--text); text-align: center; font-size: .93rem; transition: border-color .15s, background-color .15s;
}
.dropzone__label > .icon { width: 26px; height: 26px; color: var(--accent); margin-block-end: 4px; }
.dropzone__browse { color: var(--accent-text); font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
.dropzone:hover .dropzone__label, .dropzone.is-over .dropzone__label { border-color: var(--brand-orange); background: var(--accent-soft); }
.dropzone__input:focus-visible + .dropzone__label { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone.has-file .dropzone__input, .dropzone.has-file .dropzone__label { display: none; }
.dropzone__file { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; padding-inline: 14px 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--bg-soft); }
.dropzone__file > .icon { width: 18px; height: 18px; color: var(--accent); }
.dropzone__name { flex: 1; min-width: 0; font-weight: 600; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone__size { font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Phone */
.phone-field { display: flex; align-items: stretch; }
.phone-field__code { display: grid; place-items: center; min-width: 62px; padding: 0 12px; border: 1px solid var(--line-strong); border-inline-end: 0; border-start-start-radius: var(--r-sm); border-end-start-radius: var(--r-sm); background: var(--bg-soft); font-weight: 650; color: var(--heading); font-variant-numeric: tabular-nums; }
.phone-field .input { border-start-start-radius: 0; border-end-start-radius: 0; }

/* Review */
.quote-summary { padding: 18px 20px; border-radius: var(--r); background: var(--bg-soft); border: 1px solid var(--line); }
.quote-summary__title { margin: 0 0 10px; font-weight: 700; color: var(--heading); }
.quote-summary dl { margin: 0; display: grid; gap: 0; }
.quote-summary dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-block-end: 1px dashed var(--line-strong); align-items: baseline; font-size: .92rem; }
.quote-summary dl > div:last-child { border-block-end: 0; }
.quote-summary dt { color: var(--muted); font-weight: 600; }
.quote-summary dd { margin: 0; color: var(--heading); overflow-wrap: anywhere; white-space: pre-line; }
.quote-summary dd.is-empty { color: var(--muted); font-style: italic; }
.quote-summary .link-button { font-size: .84rem; font-weight: 650; color: var(--accent-text); }
@media (max-width: 560px) { .quote-summary dl > div { grid-template-columns: 1fr auto; } .quote-summary dd { grid-column: 1 / -1; } }

/* Navigation */
.quote-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-block-start: 6px; }
.quote-nav [data-next]:only-child { margin-inline-start: auto; }
.quote-nav [data-submit] { margin-inline-start: auto; }
.quote-nav .btn.is-loading { pointer-events: none; opacity: .85; }
.quote-nav .btn.is-loading .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.quote-draft { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-block-start: 18px; padding-block-start: 14px; border-block-start: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.quote-draft > span { display: inline-flex; align-items: center; gap: 6px; }
.quote-draft .icon { width: 15px; height: 15px; color: var(--success); }
.quote-draft .link-button { color: var(--accent-text); font-weight: 650; }

/* Success */
.quote-success { display: grid; justify-items: start; gap: 10px; }
.quote-success:focus { outline: none; }
.quote-success__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--success-soft); color: var(--success); }
.quote-success__icon .icon { width: 30px; height: 30px; }
.quote-success h3 { margin: 6px 0 0; font-size: 1.5rem; }
.quote-success p { margin: 0; color: var(--muted); max-width: 56ch; }
.quote-success__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 10px; }

/* Side panel */
.quote-layout__side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.side-card { padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.side-card--quiet { background: var(--bg-soft); }
.side-card__title { margin: 0 0 6px; font-weight: 700; color: var(--heading); font-size: 1.05rem; }
.side-card > p { margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.side-contacts { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.side-contacts a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .15s; }
.side-contacts a:hover { border-color: var(--accent); }
.side-contacts__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--navy-soft); color: var(--heading); flex: none; }
.side-contacts__icon .icon { width: 19px; height: 19px; }
.side-contacts span:last-child { display: grid; font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.side-contacts strong { color: var(--heading); font-size: .94rem; }
.next-steps { display: grid; gap: 12px; margin: 10px 0 16px; padding: 0; list-style: none; counter-reset: next; }
.next-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: .92rem; counter-increment: next; }
.next-steps li::before { content: counter(next); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); font-size: .78rem; font-weight: 700; color: var(--heading); }
.side-card__note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding-block-start: 14px; border-block-start: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.side-card__note .icon { width: 16px; height: 16px; margin-block-start: 2px; color: var(--accent); }
@media (max-width: 1000px) { .quote-layout__side { position: static; grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .quote-layout__side { grid-template-columns: 1fr; } }

/* Dark mode (light/dark switch in the header) ------------------------------------ */
:root[data-theme="dark"] .quote-progress__steps li.is-current .quote-progress__num { background: var(--navy-strong); border-color: #7FA2FF; }
:root[data-theme="dark"] .pill-choice input:checked + span { background: var(--navy-strong); border-color: #7FA2FF; }
/* System dark mode (no theme chosen on the site): the same overrides as [data-theme="dark"] above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .quote-progress__steps li.is-current .quote-progress__num { background: var(--navy-strong); border-color: #7FA2FF; }
  :root:not([data-theme="light"]) .pill-choice input:checked + span { background: var(--navy-strong); border-color: #7FA2FF; }
}
