/* Matrix Transfer pages: what tools.css does not cover (progress, the share row, the recipient list). */
.gate p { max-width: 640px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 44px; padding: 8px 16px; border-radius: var(--matrix-radius-control); }
.who-line { margin-top: 0; }
.dropzone .file-button + input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
/* while a send is prepared or under way (or a resume starts) the drop zone and its choose buttons are unavailable:
   render() disables the inputs and marks the zone, and the handlers refuse (web_verified V5) */
.dropzone.is-locked { border-style: solid; cursor: not-allowed; }
.dropzone input:disabled + .file-button { cursor: not-allowed; background: var(--matrix-surface-subtle); color: var(--matrix-text); border: 1px solid var(--matrix-control-border); }
.file-list .file-name { overflow-wrap: anywhere; }
.file-list .file-remove { min-height: 36px; padding: 4px 10px; font-size: var(--matrix-type-caption); }
.totals { margin: var(--matrix-space-8) 0 0; }
/* "Send as" on the send page and "Show" under My transfers: the personal space or one of the Sender's Workspaces. */
.send-as { display: flex; flex-wrap: wrap; align-items: center; gap: var(--matrix-space-8) var(--matrix-space-12); margin: 0 0 var(--matrix-space-12); }
.send-as label { font-weight: 500; }
.send-as select { padding: 8px 32px 8px 10px; border: 1px solid var(--matrix-control-border); border-radius: var(--matrix-radius-control); background: var(--matrix-surface); color: var(--matrix-text); max-width: 100%; }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--matrix-space-16); }
.choice legend { padding: 0; margin-bottom: var(--matrix-space-8); font-weight: 500; }
.choice label { display: inline-flex; align-items: center; gap: 6px; }
.options label { display: grid; gap: 6px; font-weight: 500; }
/* The expiry radios: 20 px controls beside their text, as on the tool pages, not the text-field treatment above. */
.options .choice label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; font-weight: 400; cursor: pointer; }
.choice input[type="radio"] { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--matrix-brand); cursor: pointer; }
.options .field label { display: block; margin-bottom: 6px; }
.password-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--matrix-space-8); }
.password-row .matrix-secondary { min-height: 40px; padding: 4px 14px; }
.options input[type="text"], .options input[type="password"], .options textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--matrix-control-border); border-radius: var(--matrix-radius-control); background: var(--matrix-surface); color: var(--matrix-text); }
progress { width: 100%; height: 14px; accent-color: var(--matrix-brand); }
.share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--matrix-space-8); margin: var(--matrix-space-12) 0; }
.share-row input { font: inherit; padding: 8px 10px; border: 1px solid var(--matrix-control-border); border-radius: var(--matrix-radius-control); min-width: 0; background: var(--matrix-surface); color: var(--matrix-text); }
.alert.is-warning { background: var(--matrix-warning-background); color: var(--matrix-warning); }
.alert.is-danger { background: var(--matrix-danger-background); color: var(--matrix-danger); }
.alert.is-success { background: var(--matrix-success-background); color: var(--matrix-success); }
.transfer-table { width: 100%; border-collapse: collapse; margin-top: var(--matrix-space-16); font-size: var(--matrix-type-control); }
.transfer-table th, .transfer-table td { text-align: left; padding: var(--matrix-space-8) var(--matrix-space-8); border-bottom: 1px solid var(--matrix-border); vertical-align: top; }
.transfer-table td.actions-cell { white-space: nowrap; }
.transfer-table .matrix-secondary { min-height: 36px; padding: 4px 10px; font-size: var(--matrix-type-caption); margin-right: 6px; }
.state { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: var(--matrix-type-caption); background: var(--matrix-surface-subtle); border: 1px solid var(--matrix-border); }
.state.is-ready { background: var(--matrix-success-background); color: var(--matrix-success); }
.state.is-blocked, .state.is-revoked, .state.is-expired { background: var(--matrix-danger-background); color: var(--matrix-danger); }
.recipient-files li { grid-template-columns: minmax(0, 1fr) auto auto; }
.recipient-meta { color: var(--matrix-muted); }
/* web_verified pages (P52-UI-01 to 05): notices, per-file notes, the upload's state, the history's find row and
   bulk bar, the details page. Colours come only from the Matrix Calm tokens. */
.notice { margin: var(--matrix-space-12) 0; padding: var(--matrix-space-12) var(--matrix-space-16); border-radius: var(--matrix-radius-control); }
.notice p { margin: 0; }
.notice .actions { margin-top: var(--matrix-space-12); }
.notice.is-warning { background: var(--matrix-warning-background); color: var(--matrix-warning); }
.notice.is-danger { background: var(--matrix-danger-background); color: var(--matrix-danger); }
.file-list li .file-note { grid-column: 1 / -1; font-size: var(--matrix-type-caption); overflow-wrap: anywhere; }
.file-list li .file-note:empty { display: none; }
/* the send list keeps each file's note line, empty or not: a fingerprint check that ends must not move Send under the
   pointer (it moved 32 px, and a press landed below the button; web_verified V4) */
#file-list li .file-note:empty { display: block; }
#file-list li .file-note:empty::before { content: "\00a0"; }
.file-list li .file-note.is-duplicate { color: var(--matrix-warning); }
.file-list li .file-note.is-refused, .resume-list li.is-refused .file-note { color: var(--matrix-danger); }
.resume-list li.is-refused { border-color: var(--matrix-danger); }
.resume-list li.is-confirmed { border-color: var(--matrix-success); }
.resume-list li, .details-files li { grid-template-columns: minmax(0, 1fr) auto; }
.progress-numbers { font-weight: 500; margin-bottom: 0; }
.network { font-size: var(--matrix-type-caption); padding: 4px 10px; border-radius: 999px; display: inline-block; }
.network.is-online { background: var(--matrix-success-background); color: var(--matrix-success); }
.network.is-offline { background: var(--matrix-warning-background); color: var(--matrix-warning); }
.network.is-paused { background: var(--matrix-surface-subtle); color: var(--matrix-text); border: 1px solid var(--matrix-border); }
.network.is-failed { background: var(--matrix-danger-background); color: var(--matrix-danger); }
.password-form, .edit-form { margin-top: var(--matrix-space-12); }
.password-form label { display: block; font-weight: 500; margin-bottom: 6px; }
.password-form input { font: inherit; padding: 8px 10px; border: 1px solid var(--matrix-control-border); border-radius: var(--matrix-radius-control); background: var(--matrix-surface); color: var(--matrix-text); min-width: 0; }
.find-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--matrix-space-12); margin: var(--matrix-space-12) 0; }
.find-field { display: grid; gap: 4px; min-width: 0; flex: 1 1 180px; }
.find-field label { font-weight: 500; }
.find-field select, .find-field input { font: inherit; padding: 8px 10px; border: 1px solid var(--matrix-control-border); border-radius: var(--matrix-radius-control); background: var(--matrix-surface); color: var(--matrix-text); min-width: 0; max-width: 100%; }
.bulk-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--matrix-space-8) var(--matrix-space-12); margin: var(--matrix-space-12) 0; padding: var(--matrix-space-8) var(--matrix-space-12); border: 1px solid var(--matrix-border); border-radius: var(--matrix-radius-control); background: var(--matrix-surface-subtle); }
.transfer-table input[type="checkbox"] { width: 20px; height: 20px; margin: 4px 0 0; accent-color: var(--matrix-brand); }
/* Select all sits above the history table, not in its header row, which narrow screens hide (review R204a8cae V2) */
.select-all-row { margin: var(--matrix-space-12) 0 0; }
.select-all-row label { display: inline-flex; align-items: center; gap: var(--matrix-space-8); min-height: 44px; cursor: pointer; }
.select-all-row input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--matrix-brand); }
.select-all-row label:has(input:disabled) { cursor: default; }
.button-link.small { min-height: 36px; padding: 4px 10px; font-size: var(--matrix-type-caption); margin-right: 6px; }
.transfer-table td.actions-cell { white-space: normal; }
.transfer-table td.actions-cell > * { margin-bottom: 4px; }
.timeline { margin: 0; padding-left: 1.25em; display: grid; gap: 6px; }
.timeline time { font-weight: 500; }
.facts-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 var(--matrix-space-12); }
.facts-list dt { font-weight: 500; }
.facts-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
#details h3 { margin-top: var(--matrix-space-24); }
@media (max-width: 640px) {
  .transfer-table thead { display: none; }
  .transfer-table tr { display: grid; gap: 4px; padding: var(--matrix-space-8) 0; border-bottom: 1px solid var(--matrix-border); }
  .transfer-table td { border: 0; padding: 0; }
  .transfer-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 500; }
  .facts-list { grid-template-columns: minmax(0, 1fr); }
  .find-row > button { flex: 1 1 100%; }
}
/* On a phone the send panel comes before the four facts, so its Sign in and Choose files are on the first screen; the facts
   follow it (Lucy's round 1: Sign in at y 1190, Choose files at y 1268, under cards of explanation; queue row 123) */
@media (max-width: 640px) {
  #main:has(> #tool) { display: flex; flex-direction: column; }
  #main:has(> #tool) > .hero { display: contents; }
  #main:has(> #tool) > .hero > * { order: 0; }
  #main:has(> #tool) > .hero > h1 { margin-top: var(--matrix-space-24); } /* the hero's own top padding, gone with its box */
  #main:has(> #tool) > #tool { order: 1; }
  #main:has(> #tool) > .hero > .facts { order: 2; margin-bottom: var(--matrix-space-24); }
  #main:has(> #tool) > .section { order: 3; }
}

.transfer-language { display: inline-flex; gap: 4px; }
.transfer-language button { font: inherit; padding: 6px 10px; min-height: 36px; cursor: pointer; border: 1px solid var(--matrix-border); border-radius: 6px; background: var(--matrix-surface); color: var(--matrix-text); }
.transfer-language button[aria-pressed="true"] { font-weight: 700; text-decoration: underline; }

@media (max-width: 640px) {
  [data-product="transfer"] .site-header:has(.transfer-language) .brand small { display: none; }
  .transfer-language { margin-left: auto; }
  .transfer-language button { min-height: 44px; min-width: 44px; }
  [data-product="transfer"] .site-header:has(.transfer-language) .site-nav { width: 100%; gap: 4px 16px; }
}
