.membersearch-native {
  margin-top: 1rem;
  border-top: 1px solid #d5dce6;
  padding-top: 1.25rem;
}

.membersearch-form {
  display: grid;
  gap: 0.5rem;
}

.membersearch-field-row {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  align-items: center;
  gap: 0.625rem;
}

.membersearch-field-row label {
  font-size: 16px;
  color: #374151;
  margin: 0;
}

.membersearch-field-row > input {
  width: 100%;
  height: 38px;
  border: 1px solid #aebdd2;
  background: #fff;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 16px;
  color: #111827;
}

.member-tagbox-host {
  width: 100%;
}

.member-tagbox {
  position: relative;
  width: 100%;
  min-height: 38px;
  border: 1px solid #aebdd2;
  background: #fff;
  border-radius: 6px;
  padding: 4px 44px 4px 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.member-tagbox-clear {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  line-height: 1;
  width: 18px;
  height: 18px;
  padding: 0;
  cursor: pointer;
}

.member-tagbox-clear:hover {
  color: #334155;
}

.member-tagbox-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
  width: 18px;
  height: 18px;
  padding: 0;
  cursor: pointer;
}

.member-tagbox-toggle:hover {
  color: #334155;
}

.member-tagbox:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.member-tagbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.member-tagbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #c7d2e5;
  background: #eef4ff;
  color: #1f2937;
  font-size: 12px;
  line-height: 1;
  padding: 4px 6px;
}

.member-tagbox-chip-remove {
  border: 0;
  background: transparent;
  color: #475569;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-size: 14px;
}

.member-tagbox-chip-remove:hover {
  color: #0f172a;
}

.member-tagbox-input {
  border: 0;
  outline: 0;
  box-shadow: none;
  min-width: 180px;
  flex: 1 1 180px;
  height: 28px;
  font-size: 14px;
  color: #111827;
  background: transparent;
  padding: 0 4px;
}

.member-tagbox-dropdown {
  position: absolute;
  left: -1px;
  right: -1px;
  top: calc(100% + 2px);
  border: 1px solid #aebdd2;
  background: #fff;
  z-index: 30;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.member-tagbox-option {
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.3;
  padding: 8px 10px;
  cursor: pointer;
}

.member-tagbox-option:hover,
.member-tagbox-option.is-active {
  background: #eff6ff;
}

.member-tagbox-empty {
  padding: 8px 10px;
  font-size: 13px;
  color: #64748b;
}

.membersearch-field-row > input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.membersearch-match-row {
  margin-top: 0.25rem;
  display: grid;
  grid-template-columns: minmax(120px, max-content) repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
  align-items: center;
}

.membersearch-match-row > span {
  font-size: 16px;
  color: #374151;
}

.membersearch-match-row select {
  height: 32px;
  border: 1px solid #c7d2e5;
  background: #f8fafc;
  font-size: 14px;
  color: #334155;
  padding: 0 8px;
  border-radius: 6px;
}

.membersearch-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.membersearch-clear-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.membersearch-clear-btn:hover {
  background: #f8fafc;
}

.membersearch-view-tabs {
  margin-top: 1rem;
  border-bottom: 2px solid #8ab0ec;
  display: flex;
  gap: 0.2rem;
}

.membersearch-view-tabs button {
  border: 1px solid #8ab0ec;
  border-bottom: 0;
  background: #eaf2ff;
  color: #27508e;
  font-size: 14px;
  line-height: 1;
  padding: 8px 14px;
}

.membersearch-view-tabs button.active {
  background: #fff;
  font-weight: 700;
}

.membersearch-alpha {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 2px;
  margin: 0.75rem 0;
}

.member-alpha-btn {
  border: 1px solid #a8c2ee;
  background: #eaf2ff;
  color: #27508e;
  font-size: 12px;
  padding: 2px 0;
  line-height: 1.1;
}

.member-alpha-btn.active {
  background: #fff;
  font-weight: 700;
}

.member-alpha-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.membersearch-results-label {
  font-size: 15px;
  font-style: italic;
  color: #374151;
  margin: 0.2rem 0 0.5rem;
}

.membersearch-results-list {
  border: 1px solid #d3dce8;
  background: #f8fafc;
  max-height: 900px;
  overflow-y: auto;
}

.member-result {
  padding: 14px 14px 16px;
  border-bottom: 1px solid #e1e8f2;
  cursor: pointer;
}

.member-result:hover {
  background: #f1f5fb;
}

.member-result-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.member-result-logo-wrap {
  width: 160px;
  flex: 0 0 160px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-result-logo {
  display: block;
  max-width: 100%;
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.member-result-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.member-result h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.1;
  font-style: normal;
  font-weight: 700;
  color: #1f2937;
}

.member-result h3 a {
  color: inherit;
  text-decoration: none;
}



.member-result p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.35;
}

.membersearch-results-map {
  margin-top: 0.75rem;
  height: 560px;
  border: 1px solid #d3dce8;
  background: #eef2f7;
}

.member-map-info h4 {
  margin: 0 0 0.4rem;
  font-size: 16px;
}

.member-map-info p {
  margin: 0.35rem 0;
  font-size: 13px;
}

.member-map-info img {
  float: right;
  margin: 0 0 0.4rem 0.4rem;
}

.member-map-info form {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.member-map-info form input[type='text'] {
  width: 100%;
  height: 30px;
  border: 1px solid #cbd5e1;
  padding: 0 6px;
}

.member-map-info form button {
  width: fit-content;
  border: 1px solid #64748b;
  background: #fff;
  padding: 4px 10px;
  font-size: 12px;
}

.membersearch-empty,
.membersearch-loading {
  padding: 14px;
  color: #475569;
  font-size: 15px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .membersearch-field-row,
  .membersearch-match-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .member-result-body {
    flex-direction: column;
    gap: 8px;
  }

  .member-result-logo-wrap {
    width: auto;
    flex-basis: auto;
    justify-content: flex-start;
  }

  .membersearch-alpha {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .member-result h3 {
    font-size: 26px;
  }

  .member-result p {
    font-size: 16px;
  }
}
