/* Shared control geometry. Typography is defined by the site's font system. */
.p1-button {
  min-height: 50px;
  max-width: 100%;
  padding: 13px 24px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.p1-header .p1-button {
  min-height: 44px;
  padding: 10px 18px;
  white-space: nowrap;
}

.p1-header select,
.info-language,
.language-toggle {
  min-height: 44px;
  max-width: 100%;
}

.p1-header select {
  padding: 10px 6px;
}

.p1-nav a,
.info-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.p1-actions {
  align-items: stretch;
  gap: 12px;
}

.p1-hero .p1-button {
  min-height: 52px;
  padding: 14px 24px;
}

.p1-tabs button {
  min-height: 44px;
  min-width: 0;
  padding: 11px 8px;
}

/* Keep the two contact actions aligned despite different copy lengths. */
.p1-contact {
  display: flex;
  flex-direction: column;
}

.p1-contact > .p1-small:last-of-type {
  margin-bottom: auto;
}

.p1-contact .p1-button {
  align-self: flex-start;
  margin-top: 24px;
}

.p1-route .p1-button,
.p1-contact .p1-button {
  min-width: min(220px, 100%);
}

body[data-message-page="copy"] .header-actions {
  align-items: center;
}

body[data-message-page="copy"] a,
.screen-zoom button {
  min-height: 44px;
  padding: 10px 16px;
}

@media (max-width: 850px) {
  .p1-nav {
    padding-block: 0;
  }
}

/* Paired cards stay side by side here; reserve two lines for longer labels. */
@media (min-width: 561px) and (max-width: 850px) {
  .p1-contact .p1-button {
    width: 100%;
    min-width: 0;
    min-height: 70px;
    padding-inline: 14px;
  }
}

@media (max-width: 560px) {
  .p1-header-actions {
    gap: 8px;
  }

  .p1-header .p1-button {
    padding: 10px 12px;
  }

  .p1-actions {
    gap: 12px;
  }

  .p1-actions .p1-button,
  .p1-route .p1-button,
  .p1-contact .p1-button {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 14px 18px;
  }

  .screen-zoom button {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }
}

/* Contact actions follow the supporting copy at every screen size. */
.p1-contact.p1-contact-unified {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: none;
}
.p1-contact-unified > h3,
.p1-contact-unified > p:not(.p1-small) {
  grid-column: 1;
  margin: 0;
}
.p1-contact-unified > .p1-button {
  grid-column: 1;
  grid-row: auto;
  justify-self: start;
  width: auto;
  min-width: 180px;
  min-height: 48px;
  margin: 8px 0 0;
  padding: 12px 24px;
  line-height: 22px;
}
@media (max-width: 850px) {
  .p1-contact.p1-contact-unified {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .p1-contact-unified > .p1-button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 8px;
  }
}
@media (max-width: 560px) {
  .p1-contact-unified > .p1-button {
    width: 100%;
    min-width: 0;
  }
}
