/* =========================================================
   DRIVE ZERNYX · HERRAMIENTAS DE LISTA (barra y vistas)
   ========================================================= */

.lv-hidden {
  display: none !important;
}

.lv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;

  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.lv-toolbar select,
.lv-search,
.lv-dir {
  height: 34px;

  color: var(--text);
  font: inherit;
  font-size: 12px;

  border: 1px solid var(--line-strong);
  outline: 0;
  background: var(--surface);
}

.lv-toolbar select {
  min-width: 0;
  max-width: 190px;
  padding: 0 28px 0 10px;
}

.lv-toolbar select:focus,
.lv-search:focus-within {
  border-color: var(--text-muted);
}

.lv-search {
  display: flex;
  flex: 1 1 180px;
  align-items: center;
  gap: 8px;

  max-width: 260px;
  padding: 0 10px;
}

.lv-search svg {
  flex: none;
  width: 14px;
  height: 14px;

  color: var(--text-soft);
}

.lv-search input {
  flex: 1;
  min-width: 0;

  color: var(--text);
  font: inherit;
  font-size: 12px;

  border: 0;
  outline: 0;
  background: transparent;
}

.lv-sep {
  width: 1px;
  height: 20px;

  background: var(--line-strong);
}

.lv-dir {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 0 12px;

  cursor: pointer;
}

.lv-dir:hover:not(:disabled) {
  border-color: var(--text-muted);
}

.lv-dir:disabled {
  color: var(--text-disabled);
  cursor: default;
}

.lv-dir svg {
  width: 14px;
  height: 14px;
}

.lv-dir.is-desc svg {
  transform: scaleY(-1);
}

.lv-count {
  margin-left: auto;

  color: var(--text-soft);
  font-size: 12px;
  white-space: nowrap;
}

.lv-views {
  display: inline-flex;

  border: 1px solid var(--line-strong);
}

.lv-views button {
  display: grid;
  place-items: center;

  width: 34px;
  height: 32px;

  color: var(--text-soft);
  cursor: pointer;
}

.lv-views button + button {
  border-left: 1px solid var(--line-strong);
}

.lv-views button:hover {
  color: var(--text);
}

.lv-views button.is-active {
  color: #0a0a0c;
  background: #e8e8ec;
}

.lv-views svg {
  width: 15px;
  height: 15px;
}

/* Los controles de orden originales de cada página quedan
   reemplazados por esta barra */
.drive-order,
.file-type-page__filter-field:has([class*="select"]),
.trash-page__filter-field {
  display: none !important;
}

/* =========================================================
   VISTA CUADRÍCULA
   ========================================================= */

.lv-list.lv-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;

  padding: 14px;
}

.lv-list.lv-view-grid > :is(.drive-item, .file-type-row, .trash-row, .tags-file) {
  position: relative;

  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px;

  min-width: 0 !important;
  min-height: 0 !important;
  height: auto;
  padding: 12px !important;

  border: 1px solid var(--line) !important;
  background: var(--surface-soft) !important;
}

.lv-list.lv-view-grid > :is(.drive-item, .file-type-row, .trash-row, .tags-file):hover {
  border-color: var(--line-strong) !important;
  background: var(--surface-hover) !important;
}

.lv-list.lv-view-grid [class*="__main"] {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 10px;

  min-width: 0;
  width: 100%;
  padding: 0 !important;

  text-align: left;
}

.lv-list.lv-view-grid [class*="__drag-handle"],
.lv-list.lv-view-grid [class*="__user"],
.lv-list.lv-view-grid [class*="__visibility"],
.lv-list.lv-view-grid [class*="__location"] {
  display: none !important;
}

.lv-list.lv-view-grid [class*="__selection"] {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
}

.lv-list.lv-view-grid [class*="__preview"],
.lv-list.lv-view-grid [class*="__main"] > [class*="__icon"] {
  display: grid !important;
  place-items: center;

  width: 100% !important;
  min-width: 0 !important;
  height: 120px !important;
  flex: none !important;
}

.lv-list.lv-view-grid [class*="__preview"] img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.lv-list.lv-view-grid [class*="__main"] > [class*="__icon"] svg {
  width: 34px;
  height: 34px;
}

.lv-list.lv-view-grid [class*="__size"],
.lv-list.lv-view-grid [class*="__date"] {
  color: var(--text-soft);
  font-size: 11px;
}

.lv-list.lv-view-grid [class*="__actions"] {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;

  min-width: 0;
  padding: 0 !important;
}

.lv-list.lv-view-grid [class*="__actions"] .icon-button {
  width: 30px;
  height: 30px;
}

.drive-table-wrap:has(.lv-view-grid) .drive-table-head,
.file-type-page__table-wrap:has(.lv-view-grid) .file-type-page__table-head,
.trash-page__table-wrap:has(.lv-view-grid) .trash-page__table-head {
  display: none;
}

.lv-list.lv-view-grid ~ *,
.lv-list.lv-view-grid {
  min-width: 0;
}

/* =========================================================
   VISTA COMPACTA
   ========================================================= */

.lv-list.lv-view-compact > :is(.drive-item, .file-type-row, .trash-row, .tags-file) {
  min-height: 36px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.lv-list.lv-view-compact [class*="__preview"],
.lv-list.lv-view-compact [class*="__icon"] {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
}

.lv-list.lv-view-compact [class*="__icon"] svg {
  width: 13px;
  height: 13px;
}

.lv-list.lv-view-compact [class*="__name"] small,
.lv-list.lv-view-compact [class*="__drag-handle"] {
  display: none;
}

.lv-list.lv-view-compact .icon-button {
  width: 26px;
  height: 26px;
}

@media (max-width: 700px) {
  .lv-search {
    max-width: none;
    flex-basis: 100%;
  }

  .lv-count {
    display: none;
  }
}

.lv-list.lv-view-grid [class*="__preview"] {
  position: relative;

  overflow: hidden;
}

.lv-list.lv-view-grid [class*="__preview"] img {
  position: absolute;
  inset: 0;

  width: 100% !important;
  height: 100% !important;

  object-fit: cover !important;
}

.lv-list.lv-view-grid [class*="__actions"] {
  gap: 4px;
}

.lv-list.lv-view-grid [class*="__actions"] .icon-button {
  width: 28px;
  height: 28px;
}
