/* The workspace sidebar's Bin (workspace/sidebar-bin.js), at its foot. */

/* ---- the Bin, at the bottom (design/v5/V5Morph.dc.html). No line above it: space does it. Closed, a
   row; open, the row rises into a card (fill, radius 14) listing the files above it, reaching 4 px past
   the row on each side but the top, so it sits 4 px from the sidebar's edge like every panel in it (an
   anchored rise, UI-9g). The Bin is laid out once at its open height (sidebar-bin.js) and the card
   uncovered from the row's rect on transforms; its contents fade in after. */
.sb-bin { position: relative; flex: none; height: 28px; margin-top: 8px; }
.sb-bincard {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: -4px;
  left: -4px;
  border-radius: 14px;
  visibility: hidden;
}
/* its fill and padding, on the reveal's carrier: the list, then the row's room (28 and 4 round it) */
.sb-bincard-in { padding: 4px 4px 36px; background: var(--fill); }
.sb-bin.shown > .sb-bincard { visibility: visible; }
.sb-binlist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 148px;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}
.sb-bin.open .sb-binlist { opacity: 1; transition-delay: 140ms; }
@media (prefers-reduced-motion: reduce) {
  .sb-bin.open .sb-binlist { transition-delay: 0s; }
}
.sb-binrow { position: absolute; right: 0; bottom: 0; left: 0; display: flex; align-items: center; height: 28px; }
.sb-binbtn { flex: 1; min-width: 0; gap: 8px; padding: 0 10px; color: var(--muted); }
.sb-bin.open .sb-binbtn { color: var(--fg-strong); }
.sb-binbtn .sb-ic { color: inherit; }
.sb-binbtn .sb-name { flex: none; }
.sb-binchev { display: inline-flex; flex: none; color: var(--faint); transition: transform 200ms var(--ease); }
.sb-bin.open .sb-binchev { transform: rotate(180deg); }
/* (secondary, as on the boards: a count is data, and the tertiary shade is for hints only) */
.sb-count { margin-left: auto; color: var(--muted); font-size: 11px; transition: opacity 160ms var(--ease); }
.sb-bin.open .sb-count { opacity: 0; }
/* Empty Bin…, in the row while the card is open: its words end where the day counts do */
.sb-empty {
  position: absolute;
  top: 0;
  right: 0;
  height: 28px;
  margin-right: 2px;
  padding: 0 8px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  font: 600 11px var(--font-ui);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms var(--ease), visibility 0s linear 160ms, color 120ms var(--ease);
}
.sb-bin.open .sb-empty:not([hidden]) { opacity: 1; visibility: visible; transition-delay: 0s; }
.sb-empty[hidden] { display: none; }
/* armed: red, hovered or not (the two-click Empty Bin? Click Again) */
.sb-empty.armed { color: var(--drift-text); }
.sb-binitem {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--fg);
  font-size: 13px;
}
@media (hover: hover) {
  .sb-binitem:hover { background-color: var(--hover-soft); }
}
.sb-binitem .sb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-left { flex: none; color: var(--muted); font-size: 11px; transition: opacity 120ms var(--ease); }
/* a file from another terminal: that terminal's name, small and secondary (where Restore puts it) */
.sb-binterm { flex: 0 1 auto; min-width: 0; max-width: 45%; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
/* hovered (or its menu open), the days give way to ⋯ */
.sb-binmore {
  position: absolute;
  top: 2px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--fg);
  opacity: 0;
  transition: opacity 120ms var(--ease), background-color 120ms var(--ease);
}
.sb-binitem:hover .sb-binmore,
.sb-binmore:focus-visible,
.sb-binitem.menu-on .sb-binmore { opacity: 1; }
.sb-binitem.menu-on .sb-binmore { background-color: var(--sel); }
.sb-binitem:hover .sb-left,
.sb-binitem:focus-within .sb-left,
.sb-binitem.menu-on .sb-left { opacity: 0; }
.sb-binnone { display: flex; align-items: center; height: 28px; margin: 0; padding: 0 10px; color: var(--muted); font-size: 12px; }
