/* Standalone inquiry pages use the same viewport and document scroll as their header. */
.mgmrl-quote {
  --mgmrl-line: #d8e3ec;
  --mgmrl-panel: #f3f7fa;
  --mgmrl-ink: #172b3e;
  --mgmrl-blue: #244c6b;
  box-sizing: border-box;
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 3rem) 0 clamp(2.5rem, 5vw, 5rem);
  color: var(--mgmrl-ink);
}
body:has(.mgmrl-quote) .site-header.mgm-two-tier.mgm-mega-header {
  margin-bottom: 0 !important;
}
.mgmrl-quote > .mq-landing {
  width: 100%;
  margin: 0 0 clamp(1rem, 2.5vw, 1.75rem);
  padding: 0;
}
.mgmrl-quote .mq-landing h1 {
  margin: .3em 0 .25em;
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.mgmrl-quote .mq-landing p { margin: 0 0 .65rem; }
.mgmrl-quote .mq-landing a { color: var(--mgmrl-blue); text-decoration: underline; text-underline-offset: .2em; }
.mgmrl-quote :is(#quote-form, #quote, [data-mq-panel] > h3, .pq-panel > h3) { scroll-margin-block-start: 6.5rem; }

.mgmrl-quote [data-mgmrl-inline]:is(#product-quote, #patch-quote-dialog) {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  height: auto !important;
  max-width: none;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 1px solid var(--mgmrl-line);
  border-radius: 1.125rem;
  background: #fff;
  color: var(--mgmrl-ink);
  box-shadow: 0 8px 24px rgb(22 45 63 / .07);
}
.mgmrl-quote [data-mgmrl-inline] [hidden] { display: none !important; }
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] > form {
  display: grid;
  grid-template-columns: minmax(9.5rem, .8fr) minmax(0, 2.65fr) minmax(13rem, 1.15fr);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0;
  align-items: start;
  margin: 0;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(.mq-layout, .pq-layout) { display: contents !important; }
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(.mq-layout nav, .pq-step-nav) {
  display: grid;
  grid-area: 1 / 1 / 5 / 2;
  position: static;
  align-self: stretch;
  align-content: start;
  min-width: 0;
  padding: .75rem;
  gap: .375rem;
  overflow: visible;
  border: 0;
  border-radius: 1.125rem 0 0 1.125rem;
  background: var(--mgmrl-panel);
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-step], [data-pq-go]) {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  min-width: 0;
  padding: .45rem .65rem;
  border-radius: .5rem;
  border: 1px solid transparent;
  color: var(--mgmrl-ink);
  white-space: normal;
  text-align: start;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-step], [data-pq-go])[aria-current="step"] {
  border-color: var(--mgmrl-blue);
  background: var(--mgmrl-blue);
  color: #fff;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(.mq-stage, .pq-stage) {
  grid-area: 1 / 2;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0 !important;
  padding: clamp(.9rem, 2.5vw, 1.75rem);
  overflow: visible !important;
  overflow-wrap: anywhere;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(.mq-stage, .pq-stage, .mq-side, .pq-summary) h3 {
  margin: 0 0 .75rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.2;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(.mq-side, .pq-summary) {
  position: static;
  grid-area: 1 / 3 / 5 / 4;
  min-width: 0;
  align-self: stretch;
  overflow: visible !important;
  padding: clamp(.75rem, 1.6vw, 1.25rem);
  border: 0;
  border-radius: 0 1.125rem 1.125rem 0;
  background: var(--mgmrl-panel);
  overflow-wrap: anywhere;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] .mq-feedback {
  grid-area: 2 / 2;
  padding-inline: clamp(.9rem, 2.5vw, 1.75rem);
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(footer.mq-actions, .pq-dialog-foot) {
  display: grid !important;
  grid-area: 3 / 2;
  grid-template-columns: minmax(0, auto) 1fr minmax(0, auto);
  align-items: center;
  gap: .5rem;
  width: auto;
  margin: 0 !important;
  padding: .75rem clamp(.75rem, 2vw, 1.5rem) !important;
  border: 0;
  border-top: 1px solid var(--mgmrl-line);
  border-radius: 0;
  background: #fff;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-progress], #pq-step-caption) {
  grid-area: 1 / 2;
  justify-self: center;
  margin: 0;
  font-size: .9rem;
  text-align: center;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-back], [data-pq-back]) { grid-area: 1 / 1; justify-self: start; }
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-next], [data-mq-submit], [data-pq-next], [data-pq-submit]) {
  grid-area: 1 / 3;
  justify-self: end;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(footer.mq-actions, .pq-dialog-foot) button {
  box-sizing: border-box;
  min-width: 0 !important;
  min-height: 2.75rem;
  max-width: 100%;
  white-space: normal;
  line-height: 1.15;
}
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] [data-mq-back] .mgm-cta-icon svg { transform: rotate(180deg); }
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] .mq-schedule { table-layout: fixed; }
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] .pq-progress { padding: .75rem 1rem; }
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(input, select, textarea) { max-width: 100%; }
.mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(fieldset, label) { min-width: 0; }

@media (max-width: 960px) {
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] > form {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(.mq-layout nav, .pq-step-nav) {
    grid-area: 1 / 1;
    padding: .4rem .75rem;
    border-radius: 1.125rem 1.125rem 0 0;
  }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] .pq-step-nav { border-radius: 0; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-step], [data-pq-go]):not([aria-current="step"]) { display: none; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-step], [data-pq-go])[aria-current="step"] {
    border-color: transparent;
    background: transparent;
    color: var(--mgmrl-blue);
    font-weight: 700;
  }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(.mq-stage, .pq-stage) { grid-area: 2 / 1; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] .mq-feedback { grid-area: 3 / 1; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(footer.mq-actions, .pq-dialog-foot) { grid-area: 4 / 1; border-radius: 0 0 1.125rem 1.125rem; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] .pq-dialog-foot { border-radius: 0; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] .mq-side { display: none; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] .pq-summary {
    grid-area: 5 / 1;
    border-radius: 0 0 1.125rem 1.125rem;
  }
}
@media (max-width: 540px) {
  .mgmrl-quote { width: calc(100% - 1.25rem); }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(footer.mq-actions, .pq-dialog-foot) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-progress], #pq-step-caption) {
    display: block;
    grid-area: 1 / 1 / 2 / -1;
  }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-back], [data-pq-back]) { grid-area: 2 / 1; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is([data-mq-next], [data-mq-submit], [data-pq-next], [data-pq-submit]) { grid-area: 2 / 2; }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(footer.mq-actions, .pq-dialog-foot) .mgm-cta {
    padding-inline: .6rem .35rem !important;
    gap: .3rem !important;
    font-size: .9rem !important;
  }
  .mgmrl-quote:not(.mgmrl-lanyard) [data-mgmrl-inline] :is(footer.mq-actions, .pq-dialog-foot) .mgm-cta-icon {
    inline-size: 1.65rem;
    block-size: 1.65rem;
  }
}

/* The lanyard configurator presents all sections at once with a sticky jump rail. */
.mgmrl-lanyard [data-mgmrl-inline] .mq-layout nav {
  top: 4rem;
  border-radius: 1.125rem 1.125rem 0 0;
}
.mgmrl-lanyard [data-mgmrl-inline] .mq-layout > .mq-side { top: calc(4rem + var(--lanyard-rail-height)); }
.mgmrl-lanyard [data-mgmrl-inline] form > footer {
  box-sizing: border-box;
  width: 100%;
  z-index: 1;
}
@media (max-width: 580px) {
  .mgmrl-lanyard [data-mgmrl-inline] form > footer { grid-template-columns: auto minmax(0, 1fr) auto; }
  .mgmrl-lanyard [data-mgmrl-inline] form > footer [data-mq-progress] { grid-area: 1 / 2; }
  .mgmrl-lanyard [data-mgmrl-inline] form > footer :is([data-mq-back], [data-mq-next], [data-mq-submit]) {
    min-width: 0;
    padding-inline: .65rem;
    white-space: normal;
  }
}

/* Keep quote controls in view and put long forms inside their content scroller. */
dialog#product-quote.mq-dialog[open]:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) {
  box-sizing: border-box;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}

dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) > .mq-head {
  flex: none;
  padding: clamp(.7rem, 2.5vh, 1rem) clamp(.8rem, 3vw, 1.4rem);
}

dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) > form,
dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-layout {
  flex: 1 1 auto;
  min-block-size: 0;
}

dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-layout {
  grid-template-rows: minmax(0, 1fr);
}

dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-layout > :is(nav, .mq-stage, .mq-side) {
  min-inline-size: 0;
  min-block-size: 0;
  overscroll-behavior-y: contain;
}

dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-stage {
  scroll-padding-block: .75rem;
}

dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-stage :is(legend, .mq-checks label) {
  overflow-wrap: anywhere;
}

dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) > form > footer.mq-actions {
  flex: none;
  box-sizing: border-box;
  width: 100%;
  min-block-size: 0;
  margin: 0;
  border-radius: 0;
  overflow: visible;
  padding: .625rem clamp(.75rem, 3vw, 1.4rem);
}

dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-actions [data-mq-back] .mgm-cta-icon svg {
  transform: rotate(180deg);
}

@media (max-width: 700px), (max-width: 1024px) and (max-height: 580px) {
  dialog#product-quote.mq-dialog[open]:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) {
    max-height: none;
  }

  dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) > .mq-head {
    padding: max(7px, env(safe-area-inset-top)) var(--quote-right, .75rem) 7px var(--quote-left, .75rem);
  }

  dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-layout > nav {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-padding-inline: var(--quote-gutter, .75rem);
    align-items: stretch;
  }

  dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-layout > nav > button {
    position: relative;
    flex: 1 0 2.75rem;
    min-inline-size: 2.75rem;
    min-block-size: 2.75rem;
  }

  dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) .mq-layout > .mq-stage {
    flex: 1 1 auto;
  }

  dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) > form > footer.mq-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    padding: .5rem var(--quote-right, .75rem) max(.5rem, env(safe-area-inset-bottom)) var(--quote-left, .75rem);
  }

  dialog#product-quote.mq-dialog:not([data-mq-coin-parity], [data-mq-family="lanyards"], .ml-native) footer.mq-actions > .mgm-cta {
    gap: .375rem !important;
    padding-inline: .75rem .375rem !important;
    font-size: .9375rem !important;
  }
}

/* A later product layout can expose the legacy form alongside the dedicated Golf quote. */
main:has(.gq-section[data-golf-quote] form#quote-form) .ml-configuration > dialog#pqc-dialog.ml-native {
  display: none !important;
}
