/* ForumX R23 — members search cleanup, spacing and footer rhythm */

body.fx-forumx.forumx-v25-members-page .page-shell,
body.fx-unified-v31.forumx-v25-members-page .page-shell {
  padding-bottom: 28px !important;
}

body.fx-forumx.forumx-v25-members-page .site-footer,
body.fx-unified-v31.forumx-v25-members-page .site-footer {
  margin-top: 20px !important;
}

body.fx-forumx.forumx-v25-members-page .forumx-v25-member-browser,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-member-browser {
  padding: 18px !important;
  margin-top: 16px !important;
}

/* Search must read as ONE field, not a field inside another field. */
body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 10px !important;
  align-items: stretch !important;
  margin: 0 0 18px !important;
}

body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > label,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > label {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid #314052 !important;
  border-radius: 12px !important;
  background: #111923 !important;
  box-shadow: none !important;
  color: #9db0c6 !important;
}

body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > label:focus-within,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > label:focus-within {
  border-color: #4f8bd9 !important;
  background: #121c28 !important;
  box-shadow: 0 0 0 3px rgba(79, 139, 217, .10) !important;
}

body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > label > .forumx-icon,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > label > .forumx-icon {
  width: 19px !important;
  height: 19px !important;
  flex: 0 0 19px !important;
  margin: 0 !important;
  color: #9cb1c9 !important;
}

body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar input,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar input {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #edf3fa !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 48px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar input::placeholder,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar input::placeholder {
  color: #7f8fa3 !important;
  opacity: 1 !important;
  font-weight: 550 !important;
}

body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > .button,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > .button {
  width: auto !important;
  min-width: 112px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > .button .forumx-icon,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > .button .forumx-icon {
  width: 18px !important;
  height: 18px !important;
}

/* Keep the member result close to the search controls. */
body.fx-forumx.forumx-v25-members-page .forumx-v25-member-grid,
body.fx-unified-v31.forumx-v25-members-page .forumx-v25-member-grid {
  gap: 12px !important;
}

@media (max-width: 980px) {
  body.fx-forumx.forumx-v25-members-page .page-shell,
  body.fx-unified-v31.forumx-v25-members-page .page-shell {
    padding-bottom: 24px !important;
  }

  body.fx-forumx.forumx-v25-members-page .forumx-v25-member-browser,
  body.fx-unified-v31.forumx-v25-members-page .forumx-v25-member-browser {
    padding: 16px !important;
  }

  body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar,
  body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar {
    grid-template-columns: minmax(0, 1fr) 116px !important;
  }

  body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > label,
  body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > label {
    grid-column: auto !important;
  }

  body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > .button-secondary,
  body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > .button-secondary {
    grid-column: 1 / -1 !important;
    justify-self: start !important;
    width: auto !important;
  }
}

@media (max-width: 560px) {
  body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar,
  body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar {
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > label,
  body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > label,
  body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar > .button,
  body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar > .button {
    grid-column: 1 !important;
    width: 100% !important;
  }

  body.fx-forumx.forumx-v25-members-page .forumx-v25-searchbar input,
  body.fx-unified-v31.forumx-v25-members-page .forumx-v25-searchbar input {
    font-size: 16px !important;
  }
}
