/* Find a Home search bar: type a city or zip, see how many rentals each
   suggestion returns before clicking through to listings.stake.rent. */

.gys .find-search {
  position: relative;
  width: min(440px, 100%);
  margin-top: 38px;
  font-family: "Poppins", sans-serif;
}

/* the hero's map pins are absolutely positioned; the open menu sits above them */
.gys-find-hero > .find-search { z-index: 5; }

.gys .find-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 10px 0 18px;
  background: #FFFFFF;
  border: 2px solid #FFFFFF;
  border-radius: 10px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.gys .find-search.open .find-search-box,
.gys .find-search-box:focus-within {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.gys .find-search-glyph {
  flex-shrink: 0;
  color: var(--gys-ink);
  display: flex;
}

.gys .find-search-input {
  flex: 1 1 0;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: 500 15px/20px "Poppins", sans-serif;
  color: var(--gys-ink);
}

.gys .find-search-input::placeholder { color: #6B7280; }

/* the box itself is the focus indicator; the site's global outline would draw a second one inside it */
.gys .find-search-input:focus,
.gys .find-search-input:focus-visible { outline: none; box-shadow: none; }

.gys .find-search-clear {
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 12px;
  background: var(--gys-ink);
  color: #FFFFFF;
  cursor: pointer;
  padding: 0;
}

.gys .find-search.has-value .find-search-clear { display: flex; }

.gys .find-search-go {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--gys-mint);
  color: var(--gys-ink);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease;
}

.gys .find-search-go:hover { opacity: 0.85; }

.gys .find-search-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  flex-direction: column;
  padding: 8px 0;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(23, 25, 35, 0.08), 0 12px 32px rgba(23, 25, 35, 0.22);
  max-height: min(520px, calc(100vh - 220px));
  overflow-y: auto;
  text-align: left;
}

.gys .find-search.open .find-search-menu { display: flex; }

.gys .find-search-label {
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7280;
}

.gys .find-search-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.gys .find-search-row:hover,
.gys .find-search-row.active { background: #F3F4F6; }

.gys .find-search-row[aria-disabled="true"] { cursor: default; }
.gys .find-search-row[aria-disabled="true"]:hover { background: transparent; }

.gys .find-search-row-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--gys-ink);
}

.gys .find-search-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gys .find-search-row-title {
  font-size: 14px;
  line-height: 20px;
  color: var(--gys-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gys .find-search-row-title b { font-weight: 700; }

.gys .find-search-row-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: #6B7280;
}

.gys .find-search-row.empty .find-search-row-icon { color: #C4C9CF; }
.gys .find-search-row.empty .find-search-row-title,
.gys .find-search-row.empty .find-search-row-count { color: #9CA3AF; }

.gys .find-search-note {
  padding: 10px 16px 6px;
  font-size: 14px;
  line-height: 20px;
  color: #6B7280;
}

.gys .find-search-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 12px 16px 4px;
  border-top: 1px solid #E2E6E8;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: #6B7280;
}

.gys .find-search-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--gys-ink);
  text-decoration: none;
  white-space: nowrap;
}

.gys .find-search-foot a:hover { text-decoration: underline; }

.gys .find-search-foot a[aria-disabled="true"] {
  color: #9CA3AF;
  pointer-events: none;
}

@media (max-width: 640px) {
  .gys .find-search { width: 100%; }
  .gys .find-search-menu { max-height: min(440px, calc(100vh - 180px)); }
}
