/* Matching wait UI (draft matching.html) — used on save/canada report-block + steps last slide */

.matching-wait {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: calc(100vh - 72px);
  padding: 72px 20px 190px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    oklch(0.9789 0.006 73) 0%,
    oklch(0.95006 0.0097 72.8) 42%,
    oklch(0.902 0.018 62) 100%
  );
  text-align: center;
}

.matching-wait::before {
  position: absolute;
  inset: auto 0 0;
  height: 170px;
  content: '';
  opacity: 0.2;
  background: url('/images/funnel-city.svg') center bottom / 700px 170px no-repeat;
  pointer-events: none;
}

.matching-wait-copy {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
}

.matching-wait #processor-title,
.matching-wait .matching-wait-title {
  margin: 0;
  color: var(--sq-ink, #4a4a4a);
  font-family: var(--sq-font, Poppins, sans-serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.matching-wait #processor {
  width: min(500px, 100%);
  margin: 18px auto 0;
}

.matching-wait .matching-progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  background: #e0e4eb;
  border-radius: 999px;
}

.matching-wait .matching-progress[hidden] {
  display: none;
}

.matching-wait .matching-progress-fill {
  width: 0;
  height: 100%;
  background: var(--sq-blue, #4b80e0);
  border-radius: inherit;
}

.matching-wait #sub-title,
.matching-wait .matching-status {
  width: fit-content;
  max-width: 100%;
  margin: 44px auto 0;
  padding: 12px 22px;
  color: #fff;
  background: var(--sq-blue, #4b80e0);
  border-radius: 12px;
  font-family: var(--sq-font, Poppins, sans-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

/* Save / Canada: report-block replaces funnel slides */
body.save-page .report-block {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

body.save-page .wrapper.matching-active::before,
body.save-page .wrapper.matching-active::after {
  display: none !important;
}

body.save-page .wrapper.matching-active {
  background: transparent !important;
}

/* save-solarquiz forces #slider-block display:!important — hide nav on wait UI */
body.save-page .wrapper.matching-active #slider-block.btn-block,
body.save-page .wrapper.matching-active #next-block.btn-block,
body.save-page .wrapper.matching-active .back-link {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.save-page .report-block .matching-wait {
  min-height: calc(100vh - 72px - 182px);
}

body.save-page .report-block .v-center,
body.save-page .report-block .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Steps: last slick slide is matching wait (parent already has confirmation plane) */
body.step-page .step-matching .step-header,
body.step-page .step-matching .step-footer {
  display: none;
}

body.step-page .step-matching .step-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.step-page .step-matching .matching-wait {
  min-height: auto;
  padding: 40px 20px 80px;
  background: transparent;
}

body.step-page .step-matching .matching-wait::before {
  display: none;
}

body.step-page.has-matching-wait .progress-block {
  visibility: hidden;
}

@media (max-width: 767px) {
  .matching-wait {
    min-height: calc(100svh - 68px);
    padding: 58px 20px 170px;
  }

  .matching-wait #processor-title,
  .matching-wait .matching-wait-title {
    font-size: 30px;
  }

  .matching-wait #processor {
    margin-top: 16px;
  }

  .matching-wait #sub-title,
  .matching-wait .matching-status {
    margin-top: 36px;
    padding: 11px 18px;
    font-size: 16px;
  }

  body.save-page .report-block .matching-wait {
    min-height: calc(100svh - 68px - 160px);
  }
}
