/* =========================================================
   shapes-search.css
   Responsibility: ShapesSearchInput — wrapper, icon,
   text input, clear button, focus/active states.
   Phase Coverage: 1.3
   ========================================================= */

/* ── Search Wrapper ──────────────────────────────────────── */
.search-wrapper {
  padding: 7px 8px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  position: relative;
  background: var(--color-bg-panel);
}

/* ── Search Icon (magnifier) ─────────────────────────────── */
.search-icon {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color var(--t-fast);
  z-index: 1;
}

/* Icon brightens when input is focused */
.search-wrapper:focus-within .search-icon {
  color: var(--color-accent-light);
}

/* ── Search Input ────────────────────────────────────────── */
#ShapesSearchInput {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 28px 6px 30px;
  font-size: 12px;
  font-family: inherit;
  color: var(--color-text-primary);
  outline: none;
  transition:
    border-color var(--t-fast),
    background   var(--t-fast),
    box-shadow   var(--t-fast);
  caret-color: var(--color-accent);
  height: 30px;
}

#ShapesSearchInput::placeholder {
  color: var(--color-text-muted);
  font-size: 12px;
}

#ShapesSearchInput:hover {
  border-color: var(--color-border-light);
  background: var(--color-surface-hover);
}

#ShapesSearchInput:focus {
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
  box-shadow: 0 0 0 2px var(--color-accent-glow);
}

/* ── Clear Button ────────────────────────────────────────── */
.search-clear-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-surface-active);
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transition: background var(--t-fast), color var(--t-fast);
}

.search-clear-btn:hover {
  background: var(--color-border-light);
  color: var(--color-text-primary);
}
