/* The site-wide form widths (25% above 768px, 85% below) make these fields
   tiny on landscape phones, so size them to the content instead */
.suggestions .form select,
.suggestions .form textarea,
.suggestions .form input[type='submit'] {
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}

.suggestions .form textarea {
  height: 7rem;
}

.suggestions__collapsible summary {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  list-style: none;
}

.suggestions__collapsible summary::-webkit-details-marker {
  display: none;
}

.suggestions__summary {
  font-size: 1.2em;
}

.suggestions__change {
  color: var(--color-links);
  text-decoration: underline;
}

.suggestions__collapsible[open] .suggestions__change {
  display: none;
}

.suggestions__loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 60px 20px;
  text-align: center;
}

.suggestions.is-loading .suggestions__form,
.suggestions.is-loading .suggestions__results {
  display: none;
}

.suggestions.is-loading .suggestions__loading {
  display: flex;
}

.suggestions__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-secondary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: suggestions-spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .suggestions__spinner {
    animation-duration: 3s;
  }
}
