/* Nendaz V20.1 — desktop DN8 modal sizing correction.
   Fixes clipped/narrow forms on short or split-screen desktop viewports.
   Mobile/tablet architecture and all form logic remain unchanged. */
@media (min-width: 901px) {
  /* The existing wizard asked for 1320px but its parent still capped it at 1120px. */
  #enquiries > .wrap {
    width: min(1320px, calc(100vw - 48px));
    max-width: 1320px;
  }
  #lead-wizard {
    width: 100%;
    max-width: 1320px;
  }

  /* Critical flex fix: never force a 650px layout into a shorter viewport shell. */
  #lead-wizard .wizard-layout {
    min-height: 0;
  }
}

/* Short desktop / split-screen browser windows. */
@media (min-width: 901px) and (max-height: 820px) {
  #enquiries:not([hidden]) {
    padding: 12px;
  }
  #enquiries > .wrap {
    width: min(1320px, calc(100vw - 24px));
  }
  #lead-wizard {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    margin: 0 auto;
  }
  #lead-wizard .wizard-head {
    min-height: 82px;
    padding: .85rem 1.35rem;
  }
  #lead-wizard .wizard-head h3 {
    font-size: clamp(1.45rem, 2.3vw, 2rem);
  }
  #lead-wizard .wizard-layout {
    grid-template-columns: minmax(180px, 210px) minmax(0, 1fr);
    min-height: 0;
  }
  #lead-wizard .wizard-rail {
    padding: 1rem .95rem;
  }
  #lead-wizard .wizard-main {
    min-height: 0;
    padding: 1rem clamp(1.25rem, 3vw, 2.25rem);
    overflow: hidden;
  }
  #lead-wizard #wizard-stage {
    min-height: 0;
  }
  #lead-wizard .wizard-stage-heading {
    margin-bottom: .65rem;
  }
  #lead-wizard .wizard-quick-card {
    margin: .45rem auto .9rem;
  }
  #lead-wizard .choice-card > span,
  #lead-wizard .check-item > span {
    min-height: 82px;
    padding: .75rem .95rem;
  }
  #lead-wizard .property-context-banner {
    margin-bottom: .6rem;
    padding: .65rem .75rem;
  }
  #lead-wizard .property-context-banner__note textarea {
    min-height: 58px;
  }

  /* Owner form launched from the off-market case study: use the same available viewport. */
  #owner-review-modal.interaction-modal {
    padding: 12px;
  }
  #owner-review-modal .interaction-dialog--owner {
    width: min(1180px, 100%);
    height: 100%;
    max-height: 100%;
  }
  #owner-review-modal .owner-review-modal__head {
    padding: .7rem 1rem;
  }
  #owner-review-modal .owner-review-modal__head h2 {
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  }
}
