/*
  prop-filters.css
  The white filter card above the property list: County, Min price, Max price, Sort and Search.
  Also holds the button styles the page uses (same as the shows and directory pages).
  Needs css/base.css.
*/

/* Phone: county and sort full width, the two prices side by side. Tablet: four across, Search below. Desktop: one row. */
.fm-filters { display: grid; align-items: end; gap: 0.9rem 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1.25rem; border-radius: var(--fm-radius); background: #fff; }
.fm-field--county, .fm-field--sort, .fm-filters__go { grid-column: 1 / -1; }
@media (min-width: 48rem) {
  .fm-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fm-field--county, .fm-field--sort { grid-column: auto; }
  .fm-filters__go { justify-self: start; }
}
@media (min-width: 62rem) {
  .fm-filters { grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)) auto; }
  .fm-filters__go { grid-column: auto; justify-self: stretch; }
}

/* ---------- Form fields ---------- */
.fm-field { display: grid; gap: 0.3rem; min-width: 0; }
.fm-field label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fm-muted); }
.fm-field :where(input, select) {
  width: 100%; min-height: 2.75rem; padding: 0.5rem 0.8rem;
  font: inherit; font-size: var(--fm-t-sm); color: var(--fm-ink);
  border: 1px solid var(--fm-rule); border-radius: 8px; background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
/* Hover darkens the border; focus is one solid blue line, no glow */
.fm-field :where(input, select):hover:not(:disabled, :focus-visible) { border-color: #a9bccb; }
.fm-field :where(input, select):focus-visible { outline: none; border-color: var(--fm-blue); box-shadow: inset 0 0 0 1px var(--fm-blue); }
.fm-field option:disabled { color: #8b99a4; }

/* ---------- Buttons ---------- */
.fm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.75rem; padding: 0.5rem 1.1rem;
  font: inherit; font-size: var(--fm-t-sm); font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  color: var(--fm-blue); background: #fff; border: 1px solid var(--fm-blue); border-radius: 999px;
}
.fm-btn:hover { background: var(--fm-blue-tint); }
/* Buttons that sit beside a field use the field's corner radius, so the row reads as one set of controls.
   Pills stay for chips, badges and stand-alone buttons. */
.fm-filters .fm-btn { border-radius: 8px; }
.fm-btn--primary { color: #fff; background: var(--fm-blue); }
.fm-btn--primary:hover { background: var(--fm-blue-deep); }
.fm-btn:focus-visible { outline: 2px solid var(--fm-blue); outline-offset: 3px; }

/* Dropdown arrow drawn by us so it sits a comfortable distance from the right edge (the browser's own sits hard against it) */
.fm-field select {
  appearance: none;
  padding-right: 2.75rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23566673' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1.1rem center / 0.62rem auto;
}
