/* ==========================================================================
   VFC and 317 vaccine provider finder
   Finder-only styles. Loads after njdoh-core, njdoh-landing and
   njdoh-components; uses their tokens, fields and buttons.
   ========================================================================== */

/* ---------- Program cards: top edge matches the program color in the results ---------- */

.vfc-program.vfc-program--vfc { border-top-color: var(--njdoh-blue); }
.vfc-program.vfc-program--317 { border-top-color: var(--njdoh-success); }

/* ---------- Search panel ---------- */

.vfc-finder__controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1.25rem;
  padding: 1.5rem;
  margin: 0 0 1.25rem;
  background: var(--njdoh-white);
  border: 1px solid var(--njdoh-border-strong);
  border-radius: var(--njdoh-radius);
}

.vfc-finder__controls .njdoh-field {
  max-width: none;
  margin: 0;
}

/* Search icon inside the box; the browser's own clear "x" is hidden so they don't collide */
.vfc-finder__search-input {
  padding-right: 2.75rem;
  background: var(--njdoh-white) url("/health/vaccines/assets/images/magnifying-glass-solid.svg") no-repeat right 0.9rem center / 18px 18px;
}

.vfc-finder__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

@media (max-width: 767.98px) {
  .vfc-finder__controls {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem 1rem;
  }
}

/* ---------- Results summary ---------- */

.vfc-finder__summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1rem;
}

.vfc-finder__summary {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--njdoh-navy);
}

.vfc-finder .vfc-finder__clear {
  font-weight: 600;
  color: var(--njdoh-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vfc-finder__clear[hidden],
.vfc-finder__more-wrap[hidden] {
  display: none;
}

/* ---------- Result cards ---------- */

.vfc-finder__results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vfc-card {
  padding: 1.75rem 2rem 2rem;
  background: var(--njdoh-white);
  border: 1px solid var(--njdoh-border-strong);
  border-radius: var(--njdoh-radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.vfc-card:hover,
.vfc-card:focus-within {
  border-color: var(--njdoh-navy);
  box-shadow: var(--njdoh-shadow-hover);
}

.vfc-card__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--njdoh-text-slate);
}

/* Who the program serves: blue for VFC, green for 317 */
.vfc-card__audience {
  color: var(--njdoh-blue);
}

.vfc-card--317 .vfc-card__audience {
  color: var(--njdoh-green-dark);
}

.vfc-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--njdoh-navy);
}

.vfc-card__title:focus {
  outline: 3px solid var(--njdoh-blue);
  outline-offset: 2px;
}

.vfc-card__address {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--njdoh-text);
}

.vfc-card__actions {
  margin: 0;
}

/* "Phone not listed" sits where the call button would be */
.vfc-card__no-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  color: var(--njdoh-text-muted);
}

@media (max-width: 479.98px) {
  .vfc-card {
    padding: 1.5rem 1.25rem;
  }

  .vfc-card__actions > a {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vfc-card {
    transition: none;
  }
}

/* ---------- Empty, error, and show more ---------- */

.vfc-finder__empty {
  padding: 1.5rem;
  background: var(--njdoh-white);
  border: 1px dashed var(--njdoh-border-field);
  border-radius: var(--njdoh-radius);
}

.vfc-finder__empty p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--njdoh-text);
}

.vfc-finder__empty .vfc-finder__empty-title {
  margin-bottom: 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--njdoh-navy);
}

.vfc-finder__more-wrap {
  margin: 1.5rem 0 0;
  text-align: center;
}
