/**
 * search.css
 * Search input and predictive dropdown styling and animation.
 * Dropdown: opacity + translateY, ease-in-out.
 */

.search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#search-input {
  width: 100%;
  min-width: 240px;
  max-width: 380px;
  padding: 0.5rem 1rem;
  font-family: var(--font-body, 'Enriqueta', serif);
  font-size: 0.8rem;
  color: var(--text-primary, #fff);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

#search-input::placeholder {
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
}

#search-input:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

#search-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1024px) {
  #search-input {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

#search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: 70vh;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

#search-dropdown.search-dropdown-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-dropdown-empty {
  padding: 1rem 1.25rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  font-size: 0.9rem;
}

.search-dropdown-group {
  padding: 0.5rem 0;
}

.search-dropdown-group:not(:last-child) {
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.search-dropdown-group-label {
  padding: 0.4rem 1.25rem;
  font-family: var(--font-display, 'Enriqueta', serif);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.search-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1.25rem;
  text-align: left;
  font-family: var(--font-body, 'Enriqueta', serif);
  font-size: 0.9rem;
  color: var(--text-primary, #fff);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-dropdown-item:hover,
.search-dropdown-item:focus {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

/* Filter system: hide cards without removing from DOM */
.filter-hidden {
  display: none !important;
}