/* ---------- search bar (home page only, see search_bar.stpl) + city field
   (also reused by the add/edit profile form's own city field) ---------- */

.search-pill {
  display: flex;
  align-items: center;
  max-width: 700px;
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(107, 31, 69, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-pill:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(243, 163, 92, 0.2);
}
.search-pill .search-pill-text {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 0.9rem;
  padding: 6px 12px;
}
/* Text-search field's own × clear button, styled the same as .city-field-clear/.city-field-arrow
   just below but scoped to a lone clear button (no dropdown arrow) — see the
   .search-text-input handlers in extra_scripts.stpl. */
.search-text-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
}
.search-text-field .search-text-input {
  padding-right: 26px !important;
  width: 100%;
}
.search-text-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.search-text-clear {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gold);
  opacity: 0.75;
  font-size: 1.1rem;
  line-height: 1;
}
.search-text-clear:hover {
  opacity: 1;
}
.search-text-clear.is-visible {
  display: flex;
}
.search-pill .city-field {
  border-right: 1px solid var(--line);
}
.search-pill .search-pill-city {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 0.9rem;
  padding: 6px 12px;
  width: 11rem;
}
.search-pill .search-pill-city::placeholder,
.search-pill .search-pill-text::placeholder {
  color: var(--muted);
}
.search-pill .search-pill-city:focus,
.search-pill .search-pill-text:focus {
  outline: none;
  box-shadow: none;
}

/* "Dropdown + search" city field: a text input with a visible clear (×) and dropdown (▾) button,
   shared by the nav search pill's city field and the profile form's city field. Native <input
   list=…> affordances (built-in dropdown arrows, the type=search clear-x) are inconsistent and
   often invisible across browsers once the field is custom-styled, so both are built explicitly
   here instead — see the .city-typeahead handlers in extra_scripts.stpl. */
.city-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.city-field .city-typeahead {
  padding-right: 46px !important;
  width: 100%;
}
/* Chromium draws its own native dropdown indicator on any text input with a list= attribute —
   on top of the custom .city-field-arrow button above, that reads as two overlapping arrows.
   Suppress the native one; the custom button is the only affordance users see. */
.city-typeahead::-webkit-calendar-picker-indicator {
  display: none !important;
}
.city-field-clear,
.city-field-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gold);
  opacity: 0.75;
}
.city-field-clear:hover,
.city-field-arrow:hover {
  opacity: 1;
}
.city-field-arrow {
  right: 4px;
  display: flex;
  font-size: 0.7rem;
}
.city-field-clear {
  right: 22px;
  display: none;
  font-size: 1.1rem;
  line-height: 1;
}
.city-field-clear.is-visible {
  display: flex;
}
.card .city-field-clear,
.card .city-field-arrow,
.form-group .city-field-clear,
.form-group .city-field-arrow {
  color: var(--wine);
}

.search-pill .search-pill-submit {
  background-color: var(--gold);
  color: var(--velvet);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 20px;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.search-pill .search-pill-submit:hover {
  background-color: #e2894a;
}
