/*
 * hs-grants-filters-2026-11-10: grants search panel.
 *
 * Served as its own stylesheet, enqueued from includes/functions/grants-search.php,
 * rather than added to sass/partials/_grants.scss: the gulp 3 build in this theme
 * no longer runs on a current Node, so css/app.css cannot be recompiled. This is
 * the same arrangement as css/flinn-scholars.css and css/azneuroarts.css.
 *
 * Colours are the ones already on the panel: brand blue #002E5F, panel grey
 * #E0E0E0, field grey #FAFAFA on a #CCC border, 3px radius, Open Sans.
 */

.gs-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.panel.grant-search .gs-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4b4b4b;
  line-height: 1.3;
}

/* ---------------------------------------------------------------- keyword */

.panel.grant-search .gs-keyword {
  width: 100%;
  height: 37px;
  margin-bottom: 1rem;
  padding: 0 10px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.panel.grant-search .gs-keyword::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.panel.grant-search .gs-keyword:focus {
  background: #fff;
  border-color: #002e5f;
  outline: none;
}

.panel.grant-search .gs-keyword::placeholder {
  color: #8c8c8c;
  opacity: 1;
}

/* ----------------------------------------------------------- amount range */

.panel.grant-search .gs-amount {
  margin-bottom: 1rem;
}

.panel.grant-search .gs-amount__head {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: baseline;
  -ms-flex-align: baseline;
  align-items: baseline;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.panel.grant-search .gs-amount__readout {
  font-size: 13px;
  font-weight: 600;
  color: #002e5f;
  white-space: nowrap;
}

/* Two range inputs stacked on one track. Each input is transparent and
   ignores the pointer; only its thumb takes events, so both stay grabbable. */

.panel.grant-search .gs-amount__slider {
  position: relative;
  height: 26px;
  margin: 0 10px 10px;
}

.panel.grant-search .gs-amount__slider[hidden] {
  display: none;
}

.panel.grant-search .gs-amount__track,
.panel.grant-search .gs-amount__fill {
  position: absolute;
  top: 11px;
  height: 4px;
  border-radius: 2px;
}

.panel.grant-search .gs-amount__track {
  left: -10px;
  right: -10px;
  background: #c4c4c4;
}

.panel.grant-search .gs-amount__fill {
  left: 0;
  width: 0;
  background: #002e5f;
}

.panel.grant-search .gs-amount__handle {
  position: absolute;
  left: -10px;
  top: 0;
  width: calc(100% + 20px);
  height: 26px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  pointer-events: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.panel.grant-search .gs-amount__handle:focus {
  outline: none;
}

.panel.grant-search .gs-amount__handle::-webkit-slider-runnable-track {
  height: 26px;
  background: transparent;
  border: 0;
}

.panel.grant-search .gs-amount__handle::-moz-range-track {
  height: 26px;
  background: transparent;
  border: 0;
}

.panel.grant-search .gs-amount__handle::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #002e5f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  pointer-events: auto;
}

.panel.grant-search .gs-amount__handle::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #002e5f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  pointer-events: auto;
}

.panel.grant-search .gs-amount__handle:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(0, 46, 95, 0.35);
}

.panel.grant-search .gs-amount__handle:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(0, 46, 95, 0.35);
}

/* Round-number markers under the track. The scale is logarithmic, so these
   are what make the uneven spacing readable instead of puzzling. */

.panel.grant-search .gs-amount__ticks {
  position: relative;
  height: 14px;
  margin: -6px 10px 10px;
  font-size: 11px;
  color: #8c8c8c;
}

.panel.grant-search .gs-amount__ticks[hidden] {
  display: none;
}

.panel.grant-search .gs-amount__tick {
  position: absolute;
  top: 0;
  -webkit-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  transform: translateX(-50%);
  white-space: nowrap;
}

.panel.grant-search .gs-amount__tick::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 1px;
  height: 4px;
  background: #b0b0b0;
}

/* ------------------------------------------------------- amount  spinners */

.panel.grant-search .gs-amount__spinners {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
  gap: 8px;
}

.panel.grant-search .gs-amount__spinner {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 0%;
  flex: 1 1 0%;
  min-width: 0;
}

.panel.grant-search .gs-amount__spinner label {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #6b6b6b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel.grant-search .gs-amount__field {
  position: relative;
}

.panel.grant-search .gs-amount__prefix {
  position: absolute;
  top: 0;
  left: 9px;
  line-height: 35px;
  font-size: 14px;
  color: #8c8c8c;
  pointer-events: none;
}

.panel.grant-search .gs-amount__field input[type="number"] {
  width: 100%;
  height: 37px;
  margin: 0;
  padding: 0 6px 0 20px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: none;
}

.panel.grant-search .gs-amount__field input[type="number"]:focus {
  background: #fff;
  border-color: #002e5f;
  outline: none;
}

/* Both engines hide the spin buttons until hover or focus. Keep them on, so
   the control reads as a spinner at a glance. */
.panel.grant-search .gs-amount__field input[type="number"] {
  -moz-appearance: number-input;
}

.panel.grant-search .gs-amount__field input[type="number"]::-webkit-inner-spin-button,
.panel.grant-search .gs-amount__field input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 33px;
}

.panel.grant-search .gs-amount__dash {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  padding-bottom: 9px;
  color: #8c8c8c;
}

/* --------------------------------------------------------------- controls */

.panel.grant-search .gs-actions {
  margin-top: 2px;
}

.panel.grant-search .gs-actions__reset {
  line-height: 36px;
  text-align: right;
}

.panel.grant-search .gs-reset {
  font-size: 13px;
  color: #002e5f;
  text-decoration: underline;
}

.panel.grant-search .gs-reset:hover,
.panel.grant-search .gs-reset:focus {
  text-decoration: none;
}

/* ------------------------------------------------------- results  summary */

.gs-summary {
  margin: 0 0 1rem;
  font-size: 14px;
  color: #4b4b4b;
}

.gs-summary strong {
  color: #002e5f;
}

@media only screen and (max-width: 40em) {
  .panel.grant-search .gs-amount__head {
    display: block;
  }

  .panel.grant-search .gs-amount__readout {
    margin-top: 2px;
  }

  .panel.grant-search .gs-actions__reset {
    text-align: left;
    line-height: 1.4;
    padding-top: 10px;
  }
}
