
/* The whole sheet is the place files come in, so the box inside it goes: on a phone
   there is nothing to drag anyway. What stays is the line, and only while it has
   something to say. */
.xfer-sheet .xfer-zone { padding: 0; gap: 10px; border: 0; }

.xfer-sheet .xfer-drop {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}

.xfer-sheet .xfer-drop-inner { max-width: none; align-items: flex-start; text-align: left; }
.xfer-sheet .xfer-drop-glyph { display: none; }
.xfer-sheet .transfer-widget-mount:not([data-xfer-preparing]) .xfer-drop.is-compact { display: none; }

.xfer-sheet .xfer-drop-text,
.xfer-sheet .xfer-drop.is-compact .xfer-drop-text {
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted-text);
  opacity: 1;
}

.xfer-sheet .xfer-row,
.xfer-sheet .xfer-row:hover,
.xfer-sheet .xfer-row.is-pending {
  gap: 12px;
  padding: 6px 0;
  border-color: transparent;
  border-radius: 0;
  background: none;
}

.xfer-sheet .xfer-thumb { width: 48px; height: 48px; border-radius: var(--radius-control, 10px); }
.xfer-sheet .xfer-name { font-size: 15px; font-weight: 600; }
.xfer-sheet .xfer-meta { font-size: 13px; color: var(--muted-text); }
.xfer-sheet .xfer-meta.xfer-bad { color: var(--color-danger); }
.xfer-sheet .xfer-row-acts { gap: 2px; }
.xfer-sheet .xfer-btn-retry { min-height: 40px; padding: 0 14px; font-size: 14px; }
.xfer-sheet .xfer-note { padding: 0; font-size: 13px; color: var(--muted-text); }

.xfer-sheet .xfer-undo {
  padding: 4px 4px 4px 12px;
  border: 0;
  border-radius: var(--radius-control, 10px);
  background: var(--control-bg);
  font-size: 14px;
}

.xfer-sheet .xfer-undo-btn {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: var(--radius-control, 10px);
  background: var(--hover-bg);
  color: var(--text);
  font-size: 14px;
}

/* Over the zone the panel would be as small as an empty list, so here it takes the
   zone's place and the sheet grows to hold it. */
.xfer-sheet .xfer-zone:has(> .xfer-help:not([hidden])) > :not(.xfer-help) { display: none; }

.xfer-sheet .xfer-help {
  position: static;
  flex: 1 1 auto;
  min-height: 0;
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.xfer-sheet .xfer-help-head { font-size: 15px; opacity: 1; }
.xfer-sheet .xfer-help-where { color: var(--muted-text); opacity: 1; }

.xfer-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Each of these is a boundary stated where it would otherwise be discovered,
   so they are readable rather than fine print. */
.xfer-note-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted-text);
}

.xfer-sheet-foot {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Weighted past the tile's keys on every skin: here one is the main key, the other
   quiet, and they say what they do without a picture. */
:root .xfer-sheet .xfer-sheet-foot .xfer-btn {
  min-height: 48px;
  padding: 6px 14px;
  border-color: transparent;
  border-radius: var(--radius-control, 10px);
  background: var(--control-bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
  white-space: normal;
}

:root .xfer-sheet .xfer-sheet-foot .xfer-btn:hover { background: var(--hover-bg); }

:root .xfer-sheet .xfer-sheet-foot .xfer-btn-primary,
:root .xfer-sheet .xfer-sheet-foot .xfer-btn-primary:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.xfer-sheet-foot .xfer-btn-ic { display: none; }

@media (max-width: 760px), (any-pointer: coarse) {
  .xfer-sheet .xfer-icon,
  .xfer-sheet .xfer-icon.xfer-help-btn { width: 44px; height: 44px; }
  .xfer-sheet-bar { margin-right: -12px; }
  .xfer-sheet .xfer-btn-retry { min-height: 44px; }
  .xfer-sheet .xfer-undo-btn { min-height: 40px; }
}

/* Pulled down by its bar (transfer-widget.js armPull): the sheet follows the finger and
   springs back when let go short. The grabber says the bar can be pulled. */
@media (max-width: 699.98px) {
  .xfer-sheet {
    position: relative;
    transform: translateY(var(--xfer-pull, 0px));
    transition: transform .24s var(--ease-out, ease-out);
  }
  .xfer-sheet.is-pulled { transition: none; }
  .xfer-sheet::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 36px;
    height: 5px;
    margin-left: -18px;
    border-radius: 3px;
    background: var(--line);
  }
  .xfer-sheet-bar { touch-action: none; }
}
@media (max-width: 699.98px) and (prefers-reduced-motion: reduce) {
  .xfer-sheet { transition: none; }
}

@media (min-width: 700px) {
  .xfer-sheet-backdrop { align-items: center; padding: 20px; }
  .xfer-sheet {
    gap: 16px;
    padding: 22px 22px 18px;
    border-radius: var(--radius-modal, 20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
  }
  .xfer-sheet-foot .xfer-actions { justify-content: flex-end; }
  :root .xfer-sheet .xfer-sheet-foot .xfer-btn { flex: 0 1 auto; min-width: 140px; min-height: 44px; }
}

/* A phone on its side has no height for a list above the notes: they scroll together,
   and only the title and the keys stay. */
@media (max-height: 520px) {
  .xfer-sheet { max-height: 96%; gap: 10px; padding-top: 10px; }
  .xfer-sheet-body { overflow-y: auto; }
  .xfer-sheet .transfer-widget-mount,
  .xfer-sheet .xfer-zone { flex: none; }
  .xfer-sheet .xfer-list,
  .xfer-sheet .xfer-help { overflow: visible; }
  .xfer-sheet-foot { padding-top: 10px; }
}

/* Nothing paints under a frosted overlay. */
body.overlay-frozen .xfer-bar-fill { transition: none; }

/* ── Settings → Controllo Remoto ─────────────────────────────────────────── */
/* Settings → Phone: the folder rows. Everything else comes from SettingsPage.css. */
#settings-overlay .xfer-set-field { flex-wrap: wrap; }
.xfer-set-path { overflow-wrap: anywhere; }
.xfer-set-input { flex: 1 0 100%; }
#settings-overlay .xfer-set-input { width: 100%; font-size: 14px; }
.xfer-set-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.xfer-set-status { flex: 1 0 100%; color: var(--cst-muted); font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.xfer-set-status:empty { display: none; }
.xfer-set-status.is-ok { color: var(--color-success); }
.xfer-set-status.is-bad { color: var(--cst-danger); }
