﻿/* PresentTool™ Dashboard — styles for view: files (v3.7.0)
   ────────────────────────────────────────────────────────────
   Owns: files view (default + bulk-select + trash variants),
   bulk action-bar, type-filter chips, file-card grid.
   Uses thumb-grad-N from overview.css (shared).
   ──────────────────────────────────────────────────────────── */


/* ════ PAGE HEADER ═══════════════════════════════════════════ */
.fv-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0 22px;
  margin-bottom: 6px;
}
.fv-page-head .title-block .eyebrow {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-text-muted);
  margin-bottom: 6px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.fv-page-head .title-block .eyebrow .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--pt-primary);
}
.fv-page-head .title-block h1 {
  font-family: var(--pt-serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--pt-text);
}
.fv-page-head .title-block h1 em {
  font-style: italic; font-weight: 500;
  color: var(--pt-primary);
}
.fv-page-head .title-block .sub {
  font-size: 13.5px;
  color: var(--pt-text-muted);
  margin: 6px 0 0;
  max-width: 640px;
}
.fv-page-head .title-block .sub strong {
  color: var(--pt-text); font-weight: 600;
}
.fv-page-head .actions {
  display: inline-flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}


/* ════ TOOLBAR ════════════════════════════════════════════════ */
.files-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--pt-border);
  flex-wrap: nowrap;
  position: sticky;
  top: var(--pt-nav-h, 56px);
  background: var(--pt-bg-page);
  z-index: 5;
}
.files-toolbar .filter-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.files-toolbar .filter-chip {
  font-family: var(--pt-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--pt-text-muted);
  background: transparent;
  border: 1px solid var(--pt-border);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}
.files-toolbar .filter-chip:hover {
  background: var(--pt-surface-2);
  color: var(--pt-text);
}
.files-toolbar .filter-chip.is-active {
  background: var(--pt-text);
  color: var(--pt-surface-0);
  border-color: var(--pt-text);
}
.files-toolbar .filter-chip .count {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  opacity: 0.7;
  margin-left: 4px;
}

.files-toolbar .search {
  flex: 1;
  max-width: 280px;
  display: inline-flex; align-items: center;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-sm);
  padding: 6px 8px 6px 10px;
  gap: 8px;
  color: var(--pt-text-muted);
  margin-left: auto;
}
.files-toolbar .search:focus-within {
  border-color: var(--pt-primary);
  background: var(--pt-surface-0);
}
.files-toolbar .search svg { width: 14px; height: 14px; flex: 0 0 14px; }
.files-toolbar .search input {
  border: none; background: transparent; outline: none;
  font-family: var(--pt-sans); font-size: 13px;
  flex: 1; color: var(--pt-text); min-width: 0;
}
.files-toolbar .search input::placeholder { color: var(--pt-text-muted); }
.files-toolbar .search .clear-btn {
  background: transparent; border: none;
  color: var(--pt-text-muted); cursor: pointer;
  display: inline-flex; padding: 0;
}
.files-toolbar .search .clear-btn svg { width: 11px; height: 11px; }

.files-toolbar .sort-dropdown {
  position: relative;
}
.files-toolbar .sort-dropdown-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--pt-sans);
  font-size: 12.5px;
  color: var(--pt-text);
  background: transparent;
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.files-toolbar .sort-dropdown-btn svg { width: 12px; height: 12px; color: var(--pt-text-muted); }
.files-toolbar .sort-dropdown-btn:hover { background: var(--pt-surface-2); }
.files-toolbar .sort-menu {
  position: absolute;
  right: 0; top: calc(100% + 4px);
  min-width: 200px;
  background: var(--pt-surface-0);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-sm);
  box-shadow: var(--pt-shadow-card);
  padding: 4px;
  z-index: 30;
}
.files-toolbar .sort-menu button {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 7px 10px;
  font-family: var(--pt-sans);
  font-size: 13px;
  color: var(--pt-text);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.files-toolbar .sort-menu button:hover { background: var(--pt-surface-2); }
.files-toolbar .sort-menu button.is-active { color: var(--pt-primary); font-weight: 600; }


/* ════ BREADCRUMB / META ROW ════════════════════════════════ */
.files-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--pt-sans);
  font-size: 13px;
  color: var(--pt-text-muted);
  padding: 14px 0 12px;
}
.files-meta .crumb { color: var(--pt-text-muted); }
.files-meta .crumb.is-current { color: var(--pt-text); font-weight: 600; }
.files-meta .crumb.is-trash { color: var(--pt-warning); }
.files-meta .crumb.is-trash svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 4px; }
.files-meta .sep {
  width: 11px; height: 11px;
  color: var(--pt-text-subtle);
  display: inline-flex; align-items: center;
}
.files-meta .right {
  margin-left: auto;
  font-family: var(--pt-mono);
  font-size: 11px;
  color: var(--pt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ════ TRASH BANNER ═════════════════════════════════════════ */
.trash-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--pt-radius-sm);
  border: 1px solid rgba(160,114,42,0.25);
  background: rgba(160,114,42,0.06);
  color: var(--pt-text);
  margin-bottom: 4px;
}
.trash-banner .icon {
  display: inline-flex;
  color: var(--pt-warning);
  margin-top: 2px;
}
.trash-banner .icon svg { width: 16px; height: 16px; }
.trash-banner .msg { flex: 1; font-size: 13px; }
.trash-banner .msg b { color: var(--pt-warning); font-weight: 600; }


/* ════ FILE GRID + CARDS ════════════════════════════════════ */
.files-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.file-card {
  background: var(--pt-surface-0);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}
.file-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--pt-shadow-card);
  border-color: var(--pt-border-strong);
}
.file-card .thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}
.file-card .thumb::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,0.16), transparent 55%);
  pointer-events: none;
}
.file-card .thumb[class*="thumb-grad-"]::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.40) 100%);
  pointer-events: none;
}
.file-card .thumb.is-icon {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--pt-surface-2), var(--pt-surface-3));
  color: var(--pt-text-subtle);
}
.file-card .thumb.is-icon svg { width: 42px; height: 42px; opacity: 0.55; }
.file-card .thumb .play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.92);
  z-index: 2;
  pointer-events: none;
}
.file-card .thumb .play-overlay svg {
  width: 36px; height: 36px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.file-card .check {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 3;
  width: 20px; height: 20px;
  border-radius: 4px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.12);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  opacity: 0;
  transition: opacity 0.12s ease, background 0.12s ease;
  cursor: pointer;
}
.file-card:hover .check { opacity: 1; }
.file-card .check svg { width: 12px; height: 12px; }
.file-card.is-checked .check {
  opacity: 1;
  background: var(--pt-primary);
  border-color: var(--pt-primary);
  color: white;
}
.file-card.is-checked {
  border-color: var(--pt-primary);
  box-shadow: 0 0 0 2px var(--pt-accent-soft);
}
.file-card .type-pill {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--pt-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: white;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 2px 6px;
}
.file-card .type-pill svg { width: 10px; height: 10px; }

.file-card .body {
  padding: 10px 12px 12px;
  position: relative;
}
.file-card .name {
  font-family: var(--pt-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-text);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 22px;
}
.file-card .meta {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  color: var(--pt-text-muted);
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
}
.file-card .meta .sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--pt-border-strong);
}
.file-card .meta .project-link {
  color: var(--pt-primary);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--pt-sans);
  font-size: 11.5px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.file-card .meta .project-link:hover { text-decoration: underline; }

.file-card .kebab {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 4px;
  background: transparent; border: none;
  color: var(--pt-text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.12s ease, background 0.12s ease;
}
.file-card:hover .kebab { opacity: 1; }
.file-card .kebab:hover { background: var(--pt-surface-3); color: var(--pt-text); }
.file-card .kebab svg { width: 14px; height: 14px; }

.file-card.is-trashed { opacity: 0.85; }
.file-card.is-trashed .meta .days-left { color: var(--pt-warning); }
.file-card.is-trashed .actions {
  display: flex; gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--pt-border);
}
.file-card.is-trashed .actions .btn {
  flex: 1; justify-content: center;
  font-size: 11.5px;
  padding: 4px 8px;
}


/* ════ KEBAB DROPDOWN MENU ════════════════════════════════════ */
.fv-kebab-menu {
  position: fixed;
  z-index: 95;
  min-width: 180px;
  background: var(--pt-surface-0);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-sm);
  box-shadow: var(--pt-shadow-card);
  padding: 4px;
}
.fv-kebab-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  background: transparent; border: none;
  padding: 7px 10px;
  font-family: var(--pt-sans);
  font-size: 13px;
  color: var(--pt-text);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.fv-kebab-menu button svg { width: 13px; height: 13px; color: var(--pt-text-muted); }
.fv-kebab-menu button:hover { background: var(--pt-surface-2); }
.fv-kebab-menu button.danger { color: var(--pt-destructive); }
.fv-kebab-menu button.danger svg { color: var(--pt-destructive); }


/* ════ BULK ACTION BAR ═══════════════════════════════════════ */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--pt-text);
  color: var(--pt-surface-0);
  border-radius: var(--pt-radius-md);
  margin-bottom: 12px;
  font-family: var(--pt-sans);
  font-size: 13px;
  position: sticky;
  top: calc(var(--pt-nav-h, 56px) + 64px);
  z-index: 6;
  box-shadow: 0 4px 14px rgba(20,18,14,0.18);
  flex-wrap: wrap;
}
.bulk-bar .count { font-weight: 600; }
.bulk-bar .count em {
  font-family: var(--pt-mono);
  font-style: normal;
  font-weight: 500;
  background: rgba(255,255,255,0.16);
  padding: 1px 7px;
  border-radius: 999px;
  margin-right: 6px;
}
.bulk-bar .v-sep {
  width: 1px; height: 14px;
  background: rgba(255,255,255,0.2);
}
.bulk-bar .action {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--pt-radius-sm);
  padding: 5px 10px;
  font-family: var(--pt-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.bulk-bar .action svg { width: 12px; height: 12px; }
.bulk-bar .action:hover { background: rgba(255,255,255,0.10); color: white; }
.bulk-bar .action.danger { color: #FFB3AB; border-color: rgba(255,179,171,0.35); }
.bulk-bar .action.danger:hover { background: rgba(255,179,171,0.08); }
.bulk-bar .spacer { flex: 1; }
.bulk-bar .hint {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bulk-bar .close {
  width: 26px; height: 26px;
  border-radius: var(--pt-radius-sm);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.bulk-bar .close svg { width: 12px; height: 12px; }


/* ════ EMPTY STATE ═══════════════════════════════════════════ */
.files-empty {
  text-align: center;
  padding: 80px 20px 100px;
  max-width: 520px;
  margin: 0 auto;
}
.files-empty.filtered { padding: 60px 20px 80px; }
.files-empty .illu {
  width: 180px; height: 140px;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, rgba(139,69,19,0.04), rgba(200,149,108,0.08));
  border-radius: var(--pt-radius-lg);
  border: 1px dashed var(--pt-border-strong);
  display: flex; align-items: center; justify-content: center;
}
.files-empty .illu svg { width: 48px; height: 48px; color: var(--pt-primary); opacity: 0.55; }
.files-empty h2 {
  font-family: var(--pt-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.012em;
  margin: 0 0 8px;
  color: var(--pt-text);
}
.files-empty h2 em { font-style: italic; font-weight: 500; color: var(--pt-primary); }
.files-empty p {
  font-family: var(--pt-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 14.5px;
  color: var(--pt-text-muted);
  margin: 0 auto 20px;
  line-height: 1.55;
  max-width: 420px;
}
.files-empty .ctas {
  display: inline-flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ════ LOADING SKELETONS ════════════════════════════════════ */
.file-skeleton {
  background: var(--pt-surface-0);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-md);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.file-skeleton .sk-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(90deg, var(--pt-surface-2) 0%, var(--pt-surface-3) 50%, var(--pt-surface-2) 100%);
  background-size: 200% 100%;
  animation: fv-shimmer 1.4s ease-in-out infinite;
}
.file-skeleton .sk-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.file-skeleton .sk-line {
  height: 11px; border-radius: 4px;
  background: linear-gradient(90deg, var(--pt-surface-2) 0%, var(--pt-surface-3) 50%, var(--pt-surface-2) 100%);
  background-size: 200% 100%;
  animation: fv-shimmer 1.4s ease-in-out infinite;
}
.file-skeleton .sk-line.sm { width: 60%; height: 9px; }
@keyframes fv-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ════ "TOON MEER" ═══════════════════════════════════════════ */
.load-more-row {
  text-align: center;
  padding: 14px 0 28px;
}
.load-more-row .btn { min-width: 180px; justify-content: center; }
.load-more-row .meta {
  display: block;
  margin-top: 10px;
  font-family: var(--pt-mono);
  font-size: 11px;
  color: var(--pt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ════ ERROR STATE ═══════════════════════════════════════════ */
.files-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--pt-text-muted);
}
.files-error h2 {
  font-family: var(--pt-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 20px;
  color: var(--pt-text);
  margin: 0 0 8px;
}
.files-error p { margin: 0 0 16px; font-size: 13.5px; }


/* ════ DELETE-CONFIRMATION MODAL ═════════════════════════════ */
.fv-modal-scrim {
  position: fixed; inset: 0;
  background: rgba(20,18,14,0.40);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fv-fade-in 0.15s ease-out;
}
@keyframes fv-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fv-modal {
  width: 100%;
  max-width: 420px;
  background: var(--pt-surface-0);
  border-radius: var(--pt-radius-lg);
  box-shadow: var(--pt-shadow-modal);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.fv-modal-head {
  padding: 18px 22px 4px;
}
.fv-modal-head h2 {
  font-family: var(--pt-serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--pt-text);
  margin: 0 0 6px;
}
.fv-modal-head h2 em { font-style: italic; font-weight: 500; color: var(--pt-primary); }
.fv-modal-body {
  padding: 6px 22px 18px;
  font-size: 13.5px;
  color: var(--pt-text-muted);
}
.fv-modal-foot {
  border-top: 1px solid var(--pt-border);
  padding: 12px 22px 14px;
  display: flex; gap: 8px; justify-content: flex-end;
  background: var(--pt-surface-1);
}


/* ════ MOBILE / RESPONSIVE ═══════════════════════════════════ */
@media (max-width: 1100px) {
  .files-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .files-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    top: auto;
  }
  .files-toolbar .filter-chips {
    order: 1;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .files-toolbar .search { order: 2; max-width: none; flex: 1; margin-left: 0; }
  .files-toolbar .sort-dropdown { order: 3; }

  .bulk-bar {
    position: fixed;
    bottom: 70px; left: 12px; right: 12px;
    top: auto;
    margin-bottom: 0;
    z-index: 40;
  }
  .bulk-bar .hint { display: none; }
}

@media (max-width: 768px) {
  .fv-page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-bottom: 14px;
  }
  .fv-page-head .actions { justify-content: flex-start; }
  .fv-page-head .title-block h1 { font-size: 24px; }
}

@media (max-width: 640px) {
  .files-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .file-card .body { padding: 8px 10px 10px; }
  .file-card .name { font-size: 12px; }
}
