/* R201 mobile contact alignment. Loaded only by the eight audited pages.
   The contact content has one viewport gutter instead of two nested gutters.
   Form visibility, validation, submission and desktop styles remain owned by
   the existing form code and styles. */
@media (max-width: 760px) {
  body.cf197-site {
    --cf201-contact-gutter: 20px;
  }

  /* The old homepage rule sets main .wrap to width:100% !important.
     Match that priority here and provide padding on the same element. */
  body.cf197-site.h191-home #kontakt > .wrap {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    padding-left: var(--cf201-contact-gutter) !important;
    padding-right: var(--cf201-contact-gutter) !important;
  }

  /* Subpage main wrappers have different inherited side paddings. Center
     the contact area relative to the viewport without changing those wrappers
     or shrinking the fields with another padded card. */
  body.cf197-site.cf197-service #kontakt.r115-contact {
    box-sizing: border-box;
    width: calc(100vw - var(--cf201-contact-gutter) * 2) !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw + var(--cf201-contact-gutter)) !important;
    margin-right: calc(50% - 50vw + var(--cf201-contact-gutter)) !important;
    padding: 24px 0 !important;
    border-left: 0;
    border-right: 0;
    border-radius: 0 !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body.cf197-site.cf197-service #kontakt.r115-contact > div {
    min-width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.cf197-site #kontakt :is(.cta-form, .cta-fields, .cta-field, .cta-row) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  body.cf197-site #kontakt .cta-form {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  body.cf197-site #kontakt .cta-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px !important;
  }

  body.cf197-site #kontakt .cta-field-wide {
    grid-column: auto;
  }

  body.cf197-site #kontakt .cta-field :is(input, textarea) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    font-size: 16px !important;
  }

  body.cf197-site #kontakt .cta-field textarea {
    min-height: 128px !important;
    resize: vertical;
  }

  body.cf197-site #kontakt #kontakt-send {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
  }

  body.cf197-site #kontakt :is(.r115-contact-intro, .h194-contact-intro > p) {
    max-width: none;
  }
}

@media (max-width: 380px) {
  body.cf197-site {
    --cf201-contact-gutter: 16px;
  }
}
