/* ============================================================================
   Rejects folder — a Finder-style icon-view window, opened from the "rejectss"
   desktop icon or the dock. Purely decorative: two labelled file icons, no
   click behaviour. Every selector is prefixed .folder- / #win-folder.
   ========================================================================== */

#win-folder {
  height: auto;
  cursor: default;      /* only the title bar drags */
  touch-action: auto;
  min-width: 220px;
}

.folder-chrome {
  --folder-line: #000000;
  --folder-card: #F5F4F0;
  --folder-bar: #FBF1CF;

  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--folder-card);
  border: 1px solid var(--folder-line);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --- Title bar --- */
.folder-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 40px;
  padding: 0 12px;
  background: var(--folder-bar);
  cursor: grab;
}
.folder-chrome .folder-titlebar:active { cursor: grabbing; }

.folder-lights { display: flex; gap: 6px; flex: none; }
.folder-lights i {
  display: block;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1px solid var(--folder-line);
}
.folder-lights i:nth-child(1) { background: #FF8875; }
.folder-lights i:nth-child(2) { background: #FFE78E; }
.folder-lights i:nth-child(3) { background: #94E9BC; }

.folder-name {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Balances the traffic lights so the title reads centered. */
.folder-spacer { width: 45px; flex: none; }

/* --- Icon grid --- */
.folder-canvas {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 22px;
  padding: 22px;
  min-height: 420px;
  background: var(--folder-card);
}

.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 120px;
  /* Every item opens something now (folder.js) — it was decorative until
     2026-08-10, and #win-folder still sets cursor: default for the chrome
     around them. */
  cursor: pointer;
}

.folder-item:focus-visible {
  outline: 2px solid #FF4052;
  outline-offset: 3px;
  border-radius: 4px;
}

.folder-item img {
  /* Fixed box so every tile renders at the same size whatever its source
     dimensions. 4:3-ish and landscape, matching the 78x54 thumbnails these
     items carry — the previous 90x100 portrait box dates from the two
     dog-eared-document SVGs that used to live here, and would letterbox a
     landscape still with dead space down both sides. */
  width: 104px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--folder-line);
  border-radius: 3px;
  background: #fff;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
  transition: transform 0.12s ease;
}

.folder-item:hover img { transform: translateY(-2px) scale(1.02); }
.folder-item:active img { transform: translateY(0) scale(0.99); }

.folder-item-label {
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  color: #1d1d1d;
  word-break: break-word;
}

/* ============================================================================
   Mobile (<=767px) — css/mobile.css already forces #win-folder full-screen.
   Desktop's floating-card sizing (min-width, min-height floor on the icon
   grid) would otherwise force horizontal scroll on a 375px phone; drop both
   and let the chrome fill the screen edge-to-edge instead of reading as a
   rounded card.
   ========================================================================== */
@media (max-width: 767px) {
  #win-folder {
    min-width: 0;
  }

  .folder-chrome {
    height: 100%;
    border-radius: 0;
  }

  .folder-canvas {
    min-height: 0;
    /* Content bottoms out above the dock's peeking band. */
    padding-bottom: var(--m-bottom-inset);
  }

  /* Balanced the now-hidden traffic-light cluster on desktop. */
  .folder-spacer { display: none; }
}
