/* ──────────────────────────────────────────────────────────────
   Search Input Control — Suchfeld mit Icon
   ──────────────────────────────────────────────────────────────
   Wiederverwendbares Suchfeld mit Lupe-Icon, weißem Hintergrund
   und dezenter Border. Passt sich in Filterbars und Toolbars ein.

   Nutzung:
     <div class="z-search">
         <svg ...lupe-icon...></svg>
         <input type="text" placeholder="Suchen…">
         <span class="z-search-count">5 Treffer</span>   (optional)
     </div>

   Größen:
     .z-search        — Standard (32px Höhe)
     .z-search-sm     — Kompakt (28px Höhe, kleinerer Font)

   Farbe:  --z-control-active (#18B2CB) — Focus-Border
   Abhängigkeiten:  Design-Tokens aus _layout.html
   ────────────────────────────────────────────────────────────── */

/* ── Container ─────────────────────────────────────────────── */
.z-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.6rem;
    height: 32px;
    background: var(--z-bg-input, #fff);
    border: 1px solid var(--z-border, #d1d5db);
    border-radius: 0.375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.z-search:focus-within {
    border-color: var(--z-control-active, #18B2CB);
    box-shadow: 0 0 0 2px rgba(24, 178, 203, 0.12);
}

/* ── Icon ──────────────────────────────────────────────────── */
.z-search svg {
    color: var(--z-text-faint, #9ca3af);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.z-search:focus-within svg {
    color: var(--z-control-active, #18B2CB);
}

/* ── Input ─────────────────────────────────────────────────── */
.z-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.8rem;
    color: var(--z-text, #1f2937);
    width: 100%;
    min-width: 0;
}

.z-search input::placeholder {
    color: var(--z-text-faint, #9ca3af);
}

/* ── Counter (optional) ────────────────────────────────────── */
.z-search-count {
    font-size: 0.7rem;
    color: var(--z-text-faint, #9ca3af);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Kompakte Größe ────────────────────────────────────────── */
.z-search-sm {
    height: 28px;
    padding: 0 0.5rem;
    gap: 0.3rem;
}

.z-search-sm svg {
    width: 12px;
    height: 12px;
}

.z-search-sm input {
    font-size: 0.75rem;
}

.z-search-sm .z-search-count {
    font-size: 0.65rem;
}
