/* SAFIR · Resultados de búsqueda (/buscar). Complementa catalogo-categorias.css y usa sus mismas variables de tema. */

.bs-resumen { margin-top: 4px; color: var(--muted); font-size: .95rem; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.bs-volver { color: var(--link); text-decoration: none; }
.bs-volver:hover { text-decoration: underline; }

.bs-autores { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.bs-autor {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text);
  transition: transform .15s, border-color .2s;
}
.bs-autor:hover { transform: translateY(-2px); border-color: var(--lav); }
.bs-avatar { width: 44px; height: 44px; font-size: 1.05rem; }
.bs-autor-txt { min-width: 0; display: grid; }
.bs-autor-txt b { color: var(--title); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-autor-txt small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Tarjetas de obra (rediseño): una por fila, portada a la izquierda ===== */
.bs-obras { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }

.bs-obra {
  scroll-margin-top: 90px;   /* "Ver más" no queda tapado por el encabezado fijo */
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  transition: box-shadow .2s, transform .15s;
}
.bs-obra:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); transform: translateY(-1px); }

.bs-portada {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 2 / 3;
  background: var(--soft);
  border-radius: 4px;
  overflow: hidden;
  color: var(--lav);
  font-size: 2rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.bs-portada img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bs-info { min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.bs-titulo { margin: 4px 0 0; font-size: 1.2rem; font-weight: 700; line-height: 1.25; text-transform: uppercase; letter-spacing: .01em; }
.bs-titulo a { color: var(--title); text-decoration: none; }
.bs-titulo a:hover { text-decoration: underline; }

.bs-estado-fila { margin: 0; }
.bs-estado {
  display: inline-block; padding: 3px 12px; border-radius: 6px;
  font-size: .82rem; font-weight: 600; line-height: 1.3; color: #fff;
}
.bs-estado--completa { background: #1b7a63; }
.bs-estado--curso    { background: #c9731a; }
.bs-estado--flop     { background: #7a7f87; }

/* Lecturas | Votos | Partes, separados por una línea vertical */
.bs-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.bs-stats li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 16px; border-left: 1px solid var(--line); }
.bs-stats li:first-child { padding-left: 0; border-left: 0; }
.bs-stat-et { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }
.bs-stat-et svg { flex: none; }
.bs-stat-val { font-size: .95rem; font-weight: 700; color: var(--title); }

.bs-sinopsis {
  margin: 0;
  font-size: .85rem; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.bs-obra-autor { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.bs-etqs { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .82rem; }
.bs-etqs a { color: var(--link); text-decoration: none; }
.bs-etqs a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .bs-obra { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .bs-titulo { font-size: 1rem; }
  .bs-stats li { padding: 0 10px; }
}

/* ===== Pestañas Obras | Autores ===== */
.bs-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.bs-tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: 10px 18px; margin-bottom: -1px;
  font: inherit; font-size: 1.15rem; color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.bs-tab:hover { color: var(--title); }
.bs-tab.is-activa { color: var(--title); font-weight: 500; border-bottom-color: #ff6b2c; }
.bs-tab:focus-visible { outline: 2px solid var(--outline); outline-offset: 2px; }
.bs-panel[hidden] { display: none; }
.bs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }