/* Search + sort bar on the public meal page (Views/Public/Meals.cshtml).
   Deliberately placed above .category-swiper-container and left out of that
   element's sticky/scroll behavior (wwwroot/js/script.js) so it doesn't need
   to fight the existing scroll-position math for the category tab strip. */

.meal-search-bar {
  display: flex;
  gap: 0.6rem;
  width: 90%;
  margin: 1rem auto 0;
}

.meal-search__field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.meal-search__field svg {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--color-muted);
  pointer-events: none;
}

.meal-search__field input {
  width: 100%;
  min-height: 2.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-foreground);
  padding: 0 2.75rem 0 2.5rem;
  font-family: inherit;
  font-size: 0.95rem;
}

.meal-search__field input::placeholder {
  color: var(--color-muted);
}

.meal-search__field button {
  position: absolute;
  inset-inline-end: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meal-search__field button:hover {
  background-color: var(--color-background);
}

.meal-search-bar select {
  flex: 0 0 auto;
  min-height: 2.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-foreground);
  padding: 0 0.9rem;
  font-family: inherit;
  font-size: 0.85rem;
  max-width: 40%;
}

.meal-search__no-results {
  width: 90%;
  margin: 1rem auto 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .meal-search-bar {
    flex-wrap: wrap;
  }

  .meal-search__field {
    flex: 1 1 100%;
  }

  .meal-search-bar select {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
