/* ═══════════════════════════════════════════════════════════════
   topic-search.css — buscador de temas del picker (topic-search.js)
   Usa las variables de tema del sitio (--bg-input, --border-l,
   --accent, --bg-hover…) para respetar el theme elegido.
═══════════════════════════════════════════════════════════════ */

/* Solo profesor */
html.is-student #actSearch,
html.is-student #actSearchResults { display: none !important; }

/* Mientras hay búsqueda, los dos botones grandes se ocultan */
#actHome.ts-active .act-home-btn { display: none; }
#actHome.ts-active { padding-top: 28px; }

.ts-box [hidden], .ts-results[hidden] { display: none !important; }

.ts-box {
  flex: 0 0 100%;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ts-label {
  font-family: 'Space Grotesk', var(--sans);
  font-size: 17px;
  font-weight: 700;
  color: #f0f6fc;
  text-align: center;
}
.ts-input-wrap {
  width: 100%;
  max-width: 784px;
  margin: 0 auto;
}
.ts-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ts-icon {
  position: absolute;
  left: 18px;
  font-size: 18px;
  pointer-events: none;
}
.ts-input {
  width: 100%;
  padding: 16px 48px 16px 50px;
  border-radius: 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-l);
  color: #f0f6fc;
  font-family: 'Space Grotesk', var(--sans);
  font-size: 18px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ts-input::placeholder { color: #9aa7b4; }
.ts-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79, 142, 247, .18); }
.ts-input::-webkit-search-cancel-button { display: none; }
.ts-clear {
  position: absolute;
  right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg-hover);
  color: #e6edf3;
  font-size: 14px;
  cursor: pointer;
}
.ts-clear:hover { background: var(--accent); color: #fff; }


/* ── Resultados ── */
.ts-results {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 6px 0 20px;
}
.ts-summary {
  text-align: center;
  color: #d5dde5;
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}
.ts-summary strong { color: #f0f6fc; }
.ts-h {
  font-family: 'Space Grotesk', var(--sans);
  font-size: 20px;
  font-weight: 700;
  color: #f0f6fc;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ts-count {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-hover);
  color: #e6edf3;
  font-size: 14px;
  display: inline-grid;
  place-items: center;
}
.ts-empty { color: #c9d1d9; font-size: 15px; padding: 6px 2px; }
.ts-loading::before { content: '⏳ '; }

.ts-card { position: relative; }
.ts-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 2px;
}
.ts-level, .ts-topic, .ts-sets {
  font-family: 'Space Grotesk', var(--sans);
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 8px;
  line-height: 1.5;
}
.ts-level { background: rgba(251, 191, 36, .16); color: #fcd34d; }
.ts-topic { background: rgba(125, 211, 252, .14); color: #7dd3fc; }
.ts-sets  { background: rgba(134, 239, 172, .12); color: #86efac; font-weight: 500; }
.ts-sets em { font-style: normal; opacity: .85; }
