/* The client page's sticky download bar (js/recipient-toolbar.js#barHtml,
   paintBar): what the client chose, and the way to download it. Loaded
   after recipient-toolbar.css, whose controls sit above the files; this
   bar sits over their foot. */

/* Always on screen while there are files: what you chose, and the way to
   download it. It floats, centred, over the foot of the gallery, and
   comes to rest above the footer instead of covering it. Each change of
   the choice redraws it; the count rises into place (160ms), so a tap
   anywhere on the page visibly lands here. */
.rc-bar {
  position: sticky;
  bottom: var(--space-4);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  max-width: 760px;
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sheet);
  background: var(--surface);
  box-shadow: var(--shadow-overlay);
}
.rc-bar-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: var(--text-l);
  line-height: 22px;
  color: var(--ink2);
}
.rc-bar-text b { font-weight: 500; color: var(--ink); display: inline-block; animation: rise 160ms var(--ease-out); }
.rc-bar-note { display: block; }

/* The chosen photos, overlapping a little, each ringed in the bar's own
   colour. */
.rc-bar-strip { display: flex; flex: none; padding-left: 6px; }
.rc-bar-strip img {
  width: 36px;
  height: 36px;
  margin-left: -6px;
  object-fit: cover;
  border-radius: var(--radius-s);
  box-shadow: 0 0 0 2px var(--surface);
  animation: pop var(--dur) var(--ease-out);
}

@media (max-width: 820px) {
  .rc-bar {
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-3);
    bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  }
  .rc-bar-text { flex: 1 1 0; }

  /* Download first, then the other ways, each on its own row: the main
     action is where the thumb lands, and "Other ways to receive"
     (recipient-send.js adds it before Download) is the second choice. */
  .rc-bar .btn.primary { flex: 1 1 100%; order: 1; }
  .rc-bar [data-a=send-open] { flex: 1 1 100%; order: 2; }
}
