/* ============================================================
   TECH SILVA — Buscador de modelo (Fase 1)
   Componente reutilizável, alinhado ao design system do site.
   ============================================================ */

.ts-search-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--color-white, #fff);
  border: 1px solid var(--color-border, #d6e2f2);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(6, 26, 51, 0.10);
  padding: 1.15rem 1.2rem 1.2rem;
  font-family: var(--font-body, Inter, sans-serif);
  text-align: left;
}

.ts-label {
  display: block;
  font-family: var(--font-heading, Sora, sans-serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-navy, #061a33);
  margin-bottom: 0.55rem;
}

.ts-field { position: relative; }

.ts-field-icon {
  position: absolute;
  left: 0.95rem; top: 50%;
  transform: translateY(-50%);
  color: #8ea0b8;
  display: flex; align-items: center;
  pointer-events: none;
}

.ts-input {
  width: 100%;
  height: 52px;
  padding: 0 2.8rem 0 2.7rem;
  border: 1.5px solid var(--color-border, #d6e2f2);
  border-radius: 12px;
  font-family: var(--font-body, Inter, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy, #061a33);
  background: var(--color-white, #fff);
  box-sizing: border-box;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.ts-input::placeholder { color: #a4b1c6; font-weight: 500; }
.ts-input:focus {
  outline: none;
  border-color: var(--color-primary, #075fea);
  box-shadow: 0 0 0 4px rgba(7, 95, 234, 0.13);
}

.ts-clear {
  position: absolute;
  right: 0.6rem; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: none; border-radius: 50%;
  background: var(--color-blue-light, #eaf0f8);
  color: var(--color-text-muted, #53657a);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 160ms ease;
}
.ts-clear:hover { background: #dbe6f4; }

.ts-help {
  font-size: 0.78rem;
  color: var(--color-text-muted, #53657a);
  margin: 0.5rem 0 0;
}

.ts-list {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 340px;
  overflow-y: auto;
}

.ts-result {
  border: 1px solid var(--color-border, #d6e2f2);
  border-radius: 14px;
  background: var(--color-white, #fff);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.ts-result:hover,
.ts-result.ts-active {
  border-color: var(--color-primary, #075fea);
  box-shadow: 0 6px 18px rgba(7, 95, 234, 0.12);
  transform: translateY(-1px);
}

.ts-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.ts-result-nome {
  font-family: var(--font-heading, Sora, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-navy, #061a33);
}
.ts-result-chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.ts-chip {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.ts-chip-reset { background: #eaf9ef; color: #148a4d; }
.ts-chip-driver { background: var(--color-blue-light, #eaf0f8); color: var(--color-primary, #075fea); }
.ts-chip-manual { background: #f3f1ff; color: #5b4bc4; }

.ts-result-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 0.5rem 0.95rem;
  border-radius: 9px;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.ts-btn-primary {
  background: var(--color-primary, #075fea);
  color: #fff;
  box-shadow: 0 6px 14px rgba(7, 95, 234, 0.22);
}
.ts-btn-primary:hover { background: var(--color-primary-dark, #06358f); transform: translateY(-1px); }
.ts-btn-ghost {
  background: transparent;
  color: var(--color-primary, #075fea);
  border: 1.5px solid var(--color-primary, #075fea);
}
.ts-btn-ghost:hover { background: var(--color-blue-light, #eaf0f8); }

.ts-empty {
  border: 1px dashed var(--color-border, #d6e2f2);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted, #53657a);
  text-align: center;
  line-height: 1.6;
}
.ts-empty span { font-size: 0.75rem; }

.ts-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.ts-error {
  border: 1px solid #f3c1c1;
  background: #fdf0f0;
  color: #b3261e;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
}
.ts-error a { color: #b3261e; font-weight: 700; }

/* Versão compacta (hubs/hero sem sombra própria) */
.ts-search-box.ts-compact {
  box-shadow: none;
  border-radius: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .ts-result, .ts-btn, .ts-input { transition: none; }
  .ts-result:hover, .ts-result.ts-active, .ts-btn-primary:hover { transform: none; }
}
