/* finder.css */

.finder-body { background: var(--window-bg); }
.finder-app { height: 100%; }

.finder-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; font-size: 13.5px; }
.finder-title-icon { width: 17px; height: 15px; display: flex; }
.finder-title-icon svg { width: 100%; height: 100%; }
.finder-title-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.finder-main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.finder-content { flex: 1; overflow: auto; position: relative; outline: none; }
.finder-content:focus-visible { outline: none; }

/* icon view */
.finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 108px);
  gap: 14px 8px;
  padding: 16px 18px;
  align-content: start;
  min-height: 100%;
}
.f-icon {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 4px 7px;
  border-radius: 8px;
}
.f-icon.selected { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.f-icon-img { width: 62px; height: 56px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18)); }
.f-icon-img svg { width: 100%; height: 100%; }
.f-icon-label {
  font-size: 11.5px; line-height: 1.25; text-align: center;
  padding: 1px 5px; border-radius: 4px;
  max-width: 96px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.f-icon.selected .f-icon-label { background: var(--accent); color: #fff; }
.f-rename {
  width: 92px;
  font-size: 11.5px;
  text-align: center;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  outline: none;
  background: var(--window-bg);
  color: var(--text);
  padding: 1px 3px;
}
.f-rename.shake { animation: rename-shake 0.28s ease; }

/* list view */
.finder-list { min-height: 100%; padding: 0 0 10px; }
.fl-header, .fl-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 150px 80px 130px;
  gap: 8px;
  padding: 3px 10px;
  font-size: 11.5px;
  align-items: center;
}
.fl-header {
  position: sticky; top: 0;
  background: var(--window-bg);
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 0.5px solid var(--sep);
  z-index: 2;
  padding-top: 6px; padding-bottom: 6px;
}
.fl-row:hover { background: var(--list-hover); }
.fl-row.selected { background: var(--accent); color: #fff; }
.fl-row.selected .fl-date, .fl-row.selected .fl-size, .fl-row.selected .fl-kind { color: rgba(255, 255, 255, 0.8); }
.fl-name { display: flex; align-items: center; }
.fl-row { height: 26px; }
.fl-disc { width: 12px; flex: 0 0 12px; display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); }
.fl-disc.open { transform: rotate(90deg); }
.fl-disc svg { transition: transform 0.14s ease; }
.fl-rowicon { width: 18px; height: 16px; margin-right: 6px; display: flex; align-items: center; }
.fl-rowicon svg { width: 100%; height: 100%; }
.fl-rowname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-date, .fl-size, .fl-kind { color: var(--text-secondary); white-space: nowrap; }
.fl-date { font-variant-numeric: tabular-nums; }

/* sidebar hidden mode */
.window.sidebar-hidden .app-sidebar { display: none; }
.window.sidebar-hidden .titlebar-side-spacer { display: none; }

/* Quick Look */
.ql-backdrop {
  position: fixed; inset: 0;
  z-index: 9450;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ql-backdrop.on { opacity: 1; }
.ql-panel {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  min-width: 380px; max-width: min(680px, 90vw);
  max-height: 76vh;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px;
  background: var(--panel-bg);
  backdrop-filter: blur(50px) saturate(1.8);
  -webkit-backdrop-filter: blur(50px) saturate(1.8);
  border: 0.5px solid var(--window-border);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  z-index: 9451;
  opacity: 0;
  transition: transform 0.22s var(--ease-macos), opacity 0.22s ease;
}
.ql-panel.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ql-title { font-size: 14px; font-weight: 600; text-align: center; }
.ql-icon { width: 220px; height: 220px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.ql-icon svg { width: 180px; height: 180px; }
.ql-image { width: 420px; height: 280px; border-radius: 8px; }
.ql-text {
  font-family: var(--font-mono);
  font-size: 12px;
  max-height: 320px;
  max-width: 560px;
  white-space: pre-wrap;
  color: var(--text);
  background: var(--window-bg);
  border-radius: 8px;
  padding: 14px;
  border: 0.5px solid var(--sep);
}
.ql-meta { text-align: center; font-size: 11.5px; color: var(--text-secondary); }
