/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ------------------------------------------------------------------
 * view-mode: modo lista para contenedores de tarjetas de archivos.
 * Por defecto la grilla conserva su layout Tailwind (grid grid-cols-*).
 * Cuando data-view-mode="list", se fuerza un stack vertical y cada
 * .asset-card se reorganiza como fila horizontal compacta.
 * ------------------------------------------------------------------ */
.asset-grid[data-view-mode="list"] {
  display: flex !important;
  flex-direction: column;
  gap: 0.375rem;
}

.asset-grid[data-view-mode="list"] > .asset-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: auto;
  min-height: 3.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

.asset-grid[data-view-mode="list"] > .asset-card [data-card-thumb] {
  flex: 0 0 3.75rem;
  width: 3.75rem;
  height: 3.75rem;
  min-height: 0;
}

.asset-grid[data-view-mode="list"] > .asset-card [data-card-info] {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem 0.875rem;
}

.asset-grid[data-view-mode="list"] > .asset-card [data-card-info] p {
  margin: 0;
  line-height: 1.2;
}

/* Botón toggle: aspecto activo cuando data-active="true". */
[data-view-mode-target="gridButton"][data-active="true"],
[data-view-mode-target="listButton"][data-active="true"] {
  background-color: rgb(59 130 246 / 0.12);
  color: rgb(37 99 235);
}

.dark [data-view-mode-target="gridButton"][data-active="true"],
.dark [data-view-mode-target="listButton"][data-active="true"] {
  background-color: rgb(59 130 246 / 0.22);
  color: rgb(96 165 250);
}
