/**
 * @file
 * Search Results — accordion, loading, expand animations, and distance token.
 * Card styling lives in Search Content paragraphs (Drupal admin).
 */

.location-distance {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem;
  background-color: var(--footer-color, #ffffff);
  border: 1px solid var(--border-color, #dedede);
  color: var(--title-font-color, #000000);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  margin: 0 0.5rem;
}

.search-results-paragraph .location-search-card--loading {
  min-height: 4rem;
  opacity: 0.5;
}

.search-results-paragraph .search-results-container--loading {
  pointer-events: none;
}

.location-country-header {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.location-country-header:first-child {
  margin-top: 0;
}

.location-province-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 2px solid var(--link-color);
  cursor: pointer;
  user-select: none;
}

.location-province-header:first-child {
  padding-top: 0;
}

.location-province-header.expanded {
  border-bottom: none;
}

.province-chevron {
  margin-left: 0.5rem;
}

.province-content {
  display: none;
  margin: 1rem 0;
  overflow: hidden;
}

.province-content.expanded {
  display: block;
  overflow: visible;
  animation: slideDown 0.3s ease;
}

.province-content.expanded > * {
  animation: fadeInSlideUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(15px);
}

.province-content.expanded > *:nth-child(1) { animation-delay: 0.05s; }
.province-content.expanded > *:nth-child(2) { animation-delay: 0.1s; }
.province-content.expanded > *:nth-child(3) { animation-delay: 0.15s; }
.province-content.expanded > *:nth-child(4) { animation-delay: 0.2s; }
.province-content.expanded > *:nth-child(5) { animation-delay: 0.25s; }
.province-content.expanded > *:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 5000px;
  }
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
