/* The client page's list view (js/recipient-grid.js toggles .rc-list on the
   grid): the same tiles, one row each. Loaded after recipient.css, which has
   the tiles the rows are made of. */

/* The same tiles in one row each: check, small picture, name, folder,
   tags (only when a file in view has any), size, download. .rc-media and
   .up-cap give their children to the row.

   The tags column: the grid draws none of it (.rc-tags is not displayed
   there: a wall of pictures stays a wall of pictures); the list is where
   the producer's words are read. js/recipient-grid.js puts .has-tags on
   the grid when a file shown has a tag, so a delivery with none keeps its
   row without the column. */
.rc-tags { display: none; }
.rc-grid.rc-list.wgrid.up-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  overflow: hidden;
}
.rc-list .rc-cell {
  display: grid;
  grid-template-columns: auto var(--rc-list-thumb) minmax(0, 1fr) minmax(0, 12rem) 5rem 32px;
  align-items: center;
  column-gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  contain-intrinsic-block-size: auto var(--rc-row-height);
}
.rc-list .rc-cell + .rc-cell { border-top: 1px solid var(--line2); }
.rc-list .rc-cell:hover { background: var(--hover); }
.rc-list .rc-cell.is-selected { background: var(--accent-tint); }
/* A row is small: the chosen photo keeps its size, the row says it. */
.rc-list .rc-cell.is-selected .up-thumb,
.rc-list .rc-cell.is-selected .up-generic { transform: none; }
.rc-list .rc-cell.is-selected .up-tile::after { box-shadow: none; }
.rc-list .rc-media,
.rc-list .up-cap { display: contents; }
.rc-list .rc-check { position: static; grid-area: 1 / 1; padding: var(--space-1); }
.rc-list .rc-link { grid-area: 1 / 2; }
.rc-list .up-name { grid-area: 1 / 3; }
.rc-list .rc-where { display: block; grid-area: 1 / 4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }
.rc-list .up-cap .s { grid-area: 1 / 5; text-align: right; }
.rc-list .rc-tags { display: flex; grid-area: 1 / 5; gap: var(--space-1); min-width: 0; overflow: hidden; }
.rc-list .rc-tags .tag { flex: 0 1 auto; min-width: 0; }
.rc-list.has-tags .rc-cell { grid-template-columns: auto var(--rc-list-thumb) minmax(0, 1fr) minmax(0, 10rem) minmax(0, 15rem) 5rem 32px; }
.rc-list.has-tags .up-cap .s { grid-area: 1 / 6; }
.rc-list.has-tags .rc-dl { grid-area: 1 / 7; }
/* The download button: relative, not static, because its tap area (::after)
   needs a box to hang on; inset undoes the tile's corner offsets, which
   relative would otherwise obey. */
.rc-list .rc-dl { position: relative; inset: auto; grid-area: 1 / 6; align-self: center; opacity: 1; background: none; color: var(--mute); border-radius: var(--radius-control); }
.rc-list .rc-dl:hover { background: var(--sunken); color: var(--ink); }
.rc-list .rc-dl:focus-visible { outline-color: var(--focus); }
.rc-list .up-generic svg { width: var(--icon-m); height: var(--icon-m); }
.rc-list .up-generic b { display: none; }

@media (max-width: 520px) {
  .rc-grid.rc-list.wgrid.up-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rc-list .rc-cell { grid-template-columns: auto var(--rc-list-thumb) minmax(0, 1fr) auto 32px; }
  .rc-list .rc-where { display: none; }
  .rc-list .up-cap .s { grid-area: 1 / 4; }
  .rc-list .rc-dl { grid-area: 1 / 5; }
  /* On a phone the tags go under the name, on a line of their own. */
  .rc-list.has-tags .rc-cell { grid-template-columns: auto var(--rc-list-thumb) minmax(0, 1fr) auto 32px; }
  .rc-list.has-tags .rc-tags { grid-area: 2 / 3 / 3 / 5; margin-top: var(--space-1); }
  .rc-list.has-tags .up-cap .s { grid-area: 1 / 4; }
  .rc-list.has-tags .rc-dl { grid-area: 1 / 5; }
}
