/* Shared form alignment, loaded after the existing page/responsive styles. */
.directory-main .client-form,
.directory-main .client-submit {
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  min-width: 0;
}

/* Keep the administrator sign-in form at its existing compact width. */
.directory-main .client-form.admin-login {
  max-width: 580px;
}

.directory-main .retailer-search-form {
  width: 100%;
  max-width: 880px;
  margin: 24px auto 0;
}

.retailer-search-form .search-controls {
  width: 100%;
  max-width: none;
}

.directory-main .admin-search {
  width: 100%;
  max-width: 1000px;
  margin: 24px auto;
  justify-content: center;
}

/* Editor menus sit above the form, sharing the banner's horizontal center. */
.directory-main .form-editor-layout {
  width: 100%;
  max-width: 1000px;
  margin: 24px auto;
  grid-template-columns: minmax(0, 1fr);
}

.form-editor-layout > section {
  min-width: 0;
}

.form-editor-layout > .directory-section-menu {
  position: static;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.form-editor-layout > .directory-section-menu a {
  border: 1px solid var(--hs-line);
  text-align: center;
  overflow-wrap: anywhere;
}

/* Keep small sign-out forms in the centered account navigation toolbar. */
.directory-main .client-nav {
  max-width: 1000px;
  margin: 0 auto 24px;
  justify-content: center;
}

@media (max-width: 700px) {
  .form-editor-layout > .directory-section-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-main .admin-search {
    align-items: stretch;
  }
}
