/**
 * Loading overlay for the hospitals/urgent_care/pt_ot locator search results.
 *
 * Ported from the physicians directory's AJAX search overlay
 * (.hill-doctors-loading in doctors-redesign.css) — same mechanics, generic
 * class names since one engine (public/js/locator-search.js) serves all
 * three post types. Hand-authored directly here rather than through the
 * Sass/Tailwind build, matching how the physicians version is maintained.
 *
 * Injected into the results wrapper (config.resultsSelector) by
 * showLoading()/hideLoading() in locator-search.js while an AJAX
 * filter/pagination fetch is in flight, on a short delay so fast responses
 * don't flash it.
 */
.hill-locator-results--loading {
  position: relative;
}

.hill-locator-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6rem;
  background: rgba(255, 255, 255, 0.65);
  z-index: 5;
}

.hill-locator-loading__spinner {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 3px solid rgba(0, 74, 135, 0.25); /* dark-blue, faded ring */
  border-top-color: #004a87; /* dark-blue, active arc */
  animation: hill-locator-spin 0.8s linear infinite;
}

@keyframes hill-locator-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hill-locator-loading__spinner {
    animation-duration: 2.4s;
  }
}

/* =========================================================================
 * Zero-state: empty-result recovery + near-miss notice, ported verbatim
 * (same class names, same rules) from doctors-redesign.css so the hospitals/
 * urgent_care/pt_ot empty states render identically to the Find-a-Doctor
 * directory. Duplicated rather than shared because doctors-redesign.css is
 * only enqueued on the /doctors page and pulls in unrelated doctors-specific
 * layout rules that don't apply to these Tailwind-based locator pages.
 * ========================================================================= */

.hill-doctors-empty {
  max-width: 36rem;
  margin: 1.5rem auto 2.5rem;
  text-align: center;
}

.hill-doctors-empty__heading {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.hill-doctors-empty__message {
  font-size: 1rem;
  line-height: 1.5;
  color: #4D4F53;
  margin-bottom: 1rem;
}

.hill-doctors-empty__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}
/* Collapse the container (and its margin) when there are no chips — either
 * zero filters, or exactly one (populateChips() in locator-search.js
 * deliberately leaves it empty when only a single filter is active, since
 * one removable chip adds nothing over the Clear all filters button). */
.hill-doctors-empty__chips:empty {
  display: none;
}

.hill-doctors-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: #EDEDEE;
  border: 1px solid #DEDEDE;
  border-radius: 9999px;
  color: #4D4F53;
  font-size: 0.8125rem;
  line-height: 1.2;
  cursor: pointer;
}
.hill-doctors-chip:hover,
.hill-doctors-chip:focus {
  background: #DEDEDE;
}
.hill-doctors-chip__x {
  font-size: 1rem;
  line-height: 1;
}

.hill-doctors-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

/* Guarantee a comfortable mobile tap target for the recovery controls
 * regardless of the shared .btn padding. */
.hill-doctors-empty__action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hill-doctors-empty__contact {
  font-size: 0.9375rem;
  color: #4D4F53;
  margin-top: 1rem;
}
.hill-doctors-empty__contact a {
  color: #62A30D;
  text-decoration: underline;
}

/* Near-miss notice sits above the relaxed results when distance was widened. */
.hill-doctors-near-miss {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #4D4F53;
  background: #C7EAFC;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin: 0 0 1rem;
}
