/*
 * Responsive layer for the public calculator.
 * Loaded after the component styles so themes and page builders cannot force
 * fixed widths back into the wizard on narrow viewports.
 */
.mmq,
.mmq__in,
.mmq .mmc,
.mmq .mmc__body,
.mmq .mmc__screens,
.mmq .mmc__screen {
  min-width: 0;
  max-width: 100%;
}

.mmq {
  width: 100%;
  overflow-x: clip;
}

.mmq .mmc :is(.mmc__title, .mmc__sub, .mmc__note-txt, .mmc__row-name, .mmc__row-desc, .mmc__review-row, .mmc__line-row, .mmc-proposal__row, .mmc-proposal__contact, .mmc-proposal__button) {
  overflow-wrap: anywhere;
}

.mmq .mmc :is(input, select, textarea, button) {
  max-width: 100%;
}

.mmq .mmc :is(.mmc__grid2, .mmc__opts, .mmc__modes, .mmc-review__options, .mmc-review__fields, .mmc-proposal__facts, .mmc-proposal__amounts, .mmc-proposal__includes, .mmc-proposal__actions) > * {
  min-width: 0;
}

@media (max-width: 960px) {
  .mmq {
    padding-block: 58px 72px;
  }

  .mmq__in {
    padding-inline: clamp(18px, 4vw, 30px);
  }

  .mmq .mmc {
    width: 100%;
    margin-top: 36px;
  }

  .mmq .mmc-proposal__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .mmq {
    padding-block: 44px 56px;
  }

  .mmq__title {
    font-size: clamp(32px, 8vw, 44px);
  }

  .mmq__sub {
    font-size: 15px;
  }

  .mmq .mmc__body {
    padding: 24px clamp(18px, 4vw, 28px) 28px;
  }

  .mmq .mmc__steps {
    width: 100%;
    justify-content: stretch;
  }

  .mmq .mmc__step {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }

  .mmq .mmc__line {
    flex: 0 1 44px;
    min-width: 12px;
  }

  .mmq .mmc__grid2,
  .mmq .mmc__opts,
  .mmq .mmc__modes,
  .mmq .mmc .mmc-review__options,
  .mmq .mmc .mmc-review__fields {
    grid-template-columns: 1fr;
  }

  .mmq .mmc__row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .mmq .mmc__row-info {
    flex: 1 1 180px;
  }

  .mmq .mmc__photo-btn {
    flex: 1 0 100%;
    width: 100%;
    min-height: 44px;
  }

  .mmq .mmc__step-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 20px !important;
  }

  .mmq .mmc__qty {
    min-width: 24px;
    font-size: 16px;
  }

  .mmq .mmc__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 15px clamp(16px, 4vw, 26px) calc(15px + env(safe-area-inset-bottom));
  }

  .mmq .mmc__footer .mmc__btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding-inline: 14px;
  }

  .mmq .mmc-proposal__contact {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .mmq .mmc-proposal__contact .mmc-proposal__button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .mmq {
    padding-block: 32px 42px;
  }

  .mmq__in {
    padding-inline: 12px;
  }

  .mmq__badge {
    padding: 8px 13px;
    letter-spacing: .11em;
  }

  .mmq .mmc {
    margin-top: 28px;
    border-radius: 16px;
  }

  .mmq .mmc__topbar {
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.45;
  }

  .mmq .mmc__body {
    padding: 20px 16px 24px;
  }

  .mmq .mmc__brand {
    margin-bottom: 18px;
  }

  .mmq .mmc__brand-name {
    font-size: 15px;
  }

  .mmq .mmc__steps {
    margin-bottom: 22px;
  }

  .mmq .mmc__step {
    gap: 5px;
  }

  .mmq .mmc__dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .mmq .mmc__slabel {
    font-size: 10px;
    line-height: 1.2;
  }

  .mmq .mmc__line {
    margin-top: 13px;
  }

  .mmq .mmc .mmc__title {
    font-size: clamp(22px, 7vw, 27px);
    line-height: 1.18;
  }

  .mmq .mmc .mmc__sub {
    font-size: 14px;
    line-height: 1.5;
  }

  .mmq .mmc :is(.mmc__input, .mmc__textarea, .mmc__select) {
    font-size: 16px !important;
  }

  .mmq .mmc :is(.mmc__input, .mmc__textarea) {
    padding-inline: 16px;
  }

  .mmq .mmc__pill {
    min-width: 0;
    gap: 10px;
    padding-inline: 16px;
  }

  .mmq .mmc__select {
    width: auto;
    min-width: 0;
    max-width: 58%;
    text-overflow: ellipsis;
  }

  .mmq .mmc__opt,
  .mmq .mmc__choice,
  .mmq .mmc__mode,
  .mmq .mmc .mmc-review__option {
    min-height: 50px;
  }

  .mmq .mmc__note,
  .mmq .mmc__tile,
  .mmq .mmc__ticket,
  .mmq .mmc .mmc-review__info,
  .mmq .mmc .mmc__location-help {
    padding-inline: 14px;
  }

  .mmq .mmc__review {
    padding-inline: 14px;
  }

  .mmq .mmc__review-row,
  .mmq .mmc__line-row,
  .mmq .mmc-proposal__row {
    gap: 12px;
  }

  .mmq .mmc__review-row > :last-child,
  .mmq .mmc__line-row > :last-child,
  .mmq .mmc-proposal__row > :last-child {
    min-width: 0;
    text-align: right;
  }

  .mmq .mmc .iti__dropdown-content {
    width: min(420px, calc(100vw - 40px)) !important;
    max-width: calc(100vw - 40px) !important;
  }

  .mmq .mmc-proposal__panel {
    padding-inline: 14px;
  }

  .mmq .mmc-proposal__amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mmc-payment-modal {
    padding: 12px;
  }

  .mmc-payment-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 28px 18px calc(20px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
}

@media (max-width: 480px) {
  .mmq__title {
    font-size: clamp(29px, 9.5vw, 38px);
  }

  .mmq__sub {
    font-size: 14px;
  }

  .mmq .mmc__date-field {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 11px 14px 8px;
    border-radius: 18px;
  }

  .mmq .mmc__date-field > span {
    font-size: 12px;
    white-space: normal;
  }

  .mmq .mmc__date-field input.mmc__input--date {
    width: 100% !important;
    max-width: none;
    padding: 6px 0 !important;
    text-align: left;
    font-size: 16px !important;
  }

  .mmq .mmc__pill {
    align-items: stretch;
    flex-direction: column;
    border-radius: 18px;
    padding-block: 13px;
  }

  .mmq .mmc__pill > span {
    font-size: 12px;
  }

  .mmq .mmc__select {
    width: 100%;
    max-width: 100%;
    min-height: 32px;
    text-align: left;
  }

  .mmq .mmc__row {
    padding: 13px 12px;
  }

  .mmq .mmc__thumb {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .mmq .mmc__row-info {
    flex-basis: calc(100% - 60px);
  }

  .mmq .mmc__count {
    margin-left: auto;
  }

  .mmq .mmc__stats {
    justify-content: space-around;
    gap: 12px;
  }

  .mmq .mmc__review-row,
  .mmq .mmc__line-row,
  .mmq .mmc-proposal__row {
    align-items: flex-start;
    flex-direction: column;
  }

  .mmq .mmc__review-row > :last-child,
  .mmq .mmc__line-row > :last-child,
  .mmq .mmc-proposal__row > :last-child {
    width: 100%;
    text-align: left;
  }

  .mmq .mmc .mmc__breakdown .mmc__line-row span:last-child {
    white-space: normal;
  }

  .mmq .mmc-proposal__facts,
  .mmq .mmc-proposal__amounts {
    grid-template-columns: 1fr;
  }

  .mmq .mmc-proposal__amounts > div + div {
    border-top: 1px solid #eef2f6;
    border-left: 0;
    padding-top: 14px;
  }

  .mmq .mmc-proposal__service {
    align-items: flex-start;
  }

  .mmq .mmc-proposal__contact {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mmq .mmc-proposal__contact-icon {
    display: flex;
    justify-content: center;
  }

  .mmq .mmc__footer {
    gap: 9px;
    padding-inline: 12px;
  }

  .mmq .mmc__footer .mmc__btn {
    min-height: 50px;
    padding: 12px 9px;
    font-size: 13px;
  }

  .mmc-payment-modal__dialog h2 {
    font-size: 23px;
  }

  .mmc-payment-modal__actions {
    flex-direction: column;
  }

  .mmc-payment-modal__actions .mmc__btn {
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 360px) {
  .mmq__in {
    padding-inline: 8px;
  }

  .mmq .mmc__body {
    padding-inline: 12px;
  }

  .mmq .mmc__slabel {
    font-size: 9px;
  }

  .mmq .mmc__line {
    min-width: 7px;
  }

  .mmq .mmc__footer {
    grid-template-columns: 1fr;
  }

  .mmq .mmc__btn--primary {
    grid-row: 1;
  }

  .mmq .mmc__btn--ghost {
    grid-row: 2;
  }

  .mmq .mmc__btn--ghost.is-hidden {
    display: none;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .mmc-payment-modal {
    align-items: start;
    overflow-y: auto;
  }

  .mmc-payment-modal__dialog {
    margin-block: 8px;
    max-height: none;
  }
}

