/* Werkzeugsuche mit Vorschlagsliste, angelegt am 29.08.2026.
   Bei 68 Werkzeugen ist eine Liste zum Durchscrollen keine Navigation mehr. */

.wsuche {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.wsuche-eingabe {
  position: relative;
  display: flex;
  align-items: center;
}

.wsuche-eingabe > svg {
  position: absolute;
  left: 0.9rem;
  width: 20px;
  height: 20px;
  color: var(--text-tertiary, #9ca3af);
  pointer-events: none;
}

.wsuche-feld {
  width: 100%;
  min-height: 52px;
  padding: 0 1rem 0 2.9rem;
  font-size: 1rem;
  color: var(--text-primary, #111827);
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wsuche-feld::placeholder { color: var(--text-tertiary, #9ca3af); }

.wsuche-feld:focus {
  outline: 2px solid var(--color-primary, #E50914);
  outline-offset: 2px;
  border-color: transparent;
}

.wsuche-liste {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: min(60vh, 26rem);
  overflow-y: auto;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  padding: 0.35rem;
}

.wsuche-treffer {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-md, 9px);
  text-decoration: none;
  color: inherit;
}

.wsuche-treffer:hover,
.wsuche-treffer.ist-aktiv {
  background: var(--bg-subtle, #f3f4f6);
}

.wsuche-symbol { flex-shrink: 0; display: flex; }

.wsuche-texte {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wsuche-name {
  font-weight: var(--font-semibold, 600);
  font-size: 0.98rem;
  color: var(--text-primary, #111827);
}

.wsuche-text {
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wsuche-leer {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary, #6b7280);
  font-size: 0.92rem;
}

/* Lupe in der Navigation */
.wsuche-schalter {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 999px;
  background: var(--bg-primary, #fff);
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
}

.wsuche-schalter:hover { color: var(--color-primary, #E50914); }

.wsuche-kopf {
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: min(30rem, calc(100vw - 2rem));
  z-index: 70;
}

.wsuche-kopf.ist-offen { display: block; }

/* Die Lupe steht auf allen Seiten im Kopf, auch auf der Startseite.
   Wer von einer Werkzeugseite kommt, findet sie so immer an derselben Stelle. */
.wsuche-schalter { display: flex; }

/* Das grosse Feld auf der Startseite steht direkt unter der Ueberschrift. */
.wsuche-start { margin: 1.25rem 0 0; }

@media (max-width: 640px) {
  .wsuche-feld { min-height: 48px; font-size: 16px; } /* 16px verhindert das Hineinzoomen auf iOS */
  .wsuche-kopf { width: calc(100vw - 1.5rem); right: -0.5rem; }
  .wsuche-text { white-space: normal; }
}

/* Filterfeld im Mega-Menü */
.menue-filter {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 0 0.85rem;
}

.menue-filter > svg {
  position: absolute;
  left: 0.8rem;
  width: 17px;
  height: 17px;
  color: var(--text-tertiary, #9ca3af);
  pointer-events: none;
}

.menue-filter-feld {
  width: 100%;
  min-height: 42px;
  padding: 0 0.9rem 0 2.4rem;
  font-size: 0.95rem;
  color: var(--text-primary, #111827);
  background: var(--bg-subtle, #f9fafb);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--radius-md, 9px);
}

.menue-filter-feld:focus {
  outline: 2px solid var(--color-primary, #E50914);
  outline-offset: 1px;
  background: var(--bg-primary, #fff);
}

.menue-filter-leer {
  margin: 0 0 0.8rem;
  padding: 0.9rem;
  text-align: center;
  color: var(--text-secondary, #6b7280);
  font-size: 0.92rem;
}

.nav-dropdown-item[hidden] { display: none !important; }

@media (max-width: 640px) {
  .menue-filter-feld { font-size: 16px; }
}
