/* Full-page guest intake forms. The fixed quick-consultation bar has its own layout. */
@media (max-width: 767.98px) {
  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm) {
    --intake-ink: var(--ss-ink, #111);
    --intake-secondary: #555;
    --intake-line: #aaa;
    --intake-label: max(1rem, 16px);
    --intake-help: max(.9375rem, 15px);
    min-width: 0;
    color: var(--intake-ink);
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-label, .cm-row-l, .cm-up-l, .cm-ph-t, .cm-rm-interest-t) {
    font-size: var(--intake-label);
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-input, .cm-in, .ss-country-code) {
    min-width: 0;
    min-height: 48px;
    padding-inline: .75rem;
    border-color: var(--intake-line);
    font-size: var(--intake-label);
    line-height: 1.4;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-input, .cm-in)::placeholder {
    color: #666;
    font-size: var(--intake-label);
    opacity: 1;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.ss-international-phone, .ss-country-code, .ss-international-phone > input) {
    width: 100%;
    max-width: 100%;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  .ss-international-phone {
    display: grid;
    grid-template-columns: minmax(9rem, 40%) minmax(0, 1fr);
    gap: .5rem;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-chk, .mb-radio, .mb-terms-more, .cs-consent-link, .cm-radio, .cm-agree,
      .cm-rm-consent-chk, .cm-rm-consent-link) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    font-size: var(--intake-label);
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-chk-box, .mb-radio-dot, .cm-radio-dot, .ss-check-box) {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-msg-note, .cm-ph-notes, .cm-ph-notes li, .cm-rm-consent-note, .cs-policy,
      .mb-terms-head .mb-chk-t, .mb-chk-t, .mb-opt, .cs-opt-t) {
    color: var(--intake-secondary);
    font-size: var(--intake-help);
    font-weight: 400;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-msg:not(.mb-msg-note), .cm-rm-msg) {
    font-size: var(--intake-help);
    line-height: 1.5;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-terms-more, .cs-consent-link, .cm-rm-consent-link) {
    color: var(--intake-ink);
    font-size: var(--intake-help);
    text-decoration: underline;
    text-underline-offset: .16em;
  }

  :is(form[data-cs="reserve"], form[data-cs="event"]) .cs-select select {
    padding-right: 2.25rem;
  }

  form[data-cs="event"] .cs-opt {
    flex-wrap: wrap;
    gap: .5rem;
  }

  form[data-cs="event"] .cs-opt-name {
    flex: 1 1 9rem;
  }

  form[data-cs="event"] .cs-opt-price {
    margin-inline-start: auto;
  }

  #cmRmForm .cm-rm-pills {
    gap: .5rem;
  }

  #cmRmForm .cm-chk-pill span {
    min-height: 44px;
    height: auto;
    padding: .45rem .8rem;
    font-size: var(--intake-label);
    line-height: 1.35;
    white-space: normal;
  }

  #cmRmForm .cm-file-btn {
    min-height: 44px;
    height: auto;
    width: auto;
    max-width: 70%;
    padding: .55rem .85rem;
    border: 1px solid var(--intake-line);
    background: white;
    color: var(--intake-ink);
    font-size: var(--intake-help);
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
  }

  #cmRmForm .cm-file.is-on .cm-file-btn {
    border-color: var(--intake-ink);
    background: var(--intake-ink);
    color: white;
  }

  #cmRmForm .cm-file-name {
    font-size: var(--intake-help);
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-submit, .cm-rm-go) {
    width: 100%;
    max-width: none;
    min-height: 50px;
    height: auto;
    padding: .75rem 1rem;
    border-color: var(--ss-point, #ff8ac4);
    background: var(--ss-point, #ff8ac4);
    color: var(--intake-ink);
    font-size: max(1.0625rem, 17px);
    font-weight: 650;
    line-height: 1.4;
    white-space: normal;
  }
}

@media (max-width: 575.98px) {
  /* A selected country can be long. Giving both controls their own row also
     keeps the international number fully visible on a 320px phone. */
  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  .ss-international-phone {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(form[data-cs="reserve"], form[data-cs="event"], #cmRmForm)
  :is(.mb-terms-head, .cs-consent, .cm-rm-consent-row) {
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
  }

  #cmRmForm .cm-up {
    grid-template-columns: minmax(0, 1fr);
  }

  #cmRmForm .cm-up-item {
    min-width: 0;
  }
}
