/* agents-directory.css — filter card + three-column grid for the agent directory.
 * Same field language as the listings filter: 1.5px rule, 8px radius, 16px text, navy accents.
 */

.agent-filter {
  display: grid;
  gap: 16px;
  margin: 0 0 32px;
  padding: 20px;
  border: 1px solid var(--dark-outline);
  border-radius: 16px;
  background: #fff;
}

.agent-filter-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.agent-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 3.25rem;
  padding: 0 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
}

.agent-search > span { display: inline-flex; flex: none; color: var(--body-display); }

.agent-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 1rem;
  color: #141414;
  outline: none;
}

.agent-search:focus-within {
  border-color: var(--cb-light-blue);
  box-shadow: 0 0 0 3px rgba(31, 105, 255, 0.15);
}

.agent-filter-reset {
  flex: none;
  min-height: 3.25rem;
  padding: 0 18px;
  border: 1.5px solid var(--dark-outline);
  border-radius: 8px;
  background: #fff;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 0.9375rem;
  color: var(--dark);
  cursor: pointer;
}

.agent-filter-reset:hover { border-color: var(--cb-blue); color: var(--cb-blue); }

.agent-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.agent-field { display: grid; gap: 8px; min-width: 0; }

.agent-field-label {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--body-display);
}

.agent-results {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 0.9375rem;
  color: var(--body-display);
  padding-bottom: 13px;
}

.agent-results strong { color: var(--dark); font-weight: 600; }

/* the shared dropdown component, unscoped for this page */
.agent-filter .select { position: relative; min-width: 0; }

.agent-filter .select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.5rem 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 1rem;
  color: #141414;
  cursor: pointer;
  text-align: left;
}

.agent-filter .select-button:hover { border-color: var(--dark-outline); }

.agent-filter .select-button[aria-expanded="true"] {
  border-color: var(--cb-light-blue);
  box-shadow: 0 0 0 3px rgba(31, 105, 255, 0.15);
}

.agent-filter .select-button svg { flex: none; color: var(--body-display); }

.agent-filter .select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-filter .select-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 288px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--dark-outline);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(1, 33, 105, 0.14);
}

.agent-filter .select-option {
  padding: 9px 12px;
  border-radius: 6px;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 0.9375rem;
  color: var(--dark);
  cursor: pointer;
}

.agent-filter .select-option.is-active { background: var(--pin-stripe); }
.agent-filter .select-option.is-selected { color: var(--cb-blue); font-weight: 600; }

/* ---------------------------------------------------------------- three columns */
.team-member-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.team-member-list .agent-card[hidden] { display: none; }

@media (max-width: 991px) {
  .team-member-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-filter-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .agent-results { grid-column: 1 / -1; padding-bottom: 0; }
}

@media (max-width: 640px) {
  .team-member-list { grid-template-columns: minmax(0, 1fr); }
  .agent-filter-top { flex-wrap: wrap; }
  .agent-filter-row { grid-template-columns: minmax(0, 1fr); }
}
/* Keep the filter's menus above the card hover overlays. */
.agent-filter { position: relative; z-index: 600; }
.agent-filter .select-menu { z-index: 1000; }
/* The filter is a full-width card above the grid, not a sidebar column. */
.agent-filter { width: 100%; margin: 0 auto 32px; max-width: 1280px; }
