/* The owner's side of a file request (js/request-*.js): the Request files
   button's place in the deliveries head, the settings sheet, the share step,
   the File request panel on a delivery's page and the offer to make one.
   Loaded by index.html after delivery-deletion.css. Shared pieces (.panel
   .panel-head .list .list-row .linkrow .tag .field .hint .callout .actions
   .sheet) are app.css's and components.css's; the buttons are button.css's,
   with no new colour: a label's tone is .tag's.

   The panel, wide (the left column, above the Files panel):

     File request                                     [Accepting files]
     Open until 19 October 2026.
     412 of 2,000 files, 31 GB of 50 GB received
     [ https://theirway.app/app/#/req/... ] [Copy]
     [Close request] [Change settings] [Stop this link and make a new one]
     Who has added files                                        Refresh
     Anna       12 files, 340 MB     First added: Today, 14:05 . Last ...
     Names people give become the names of their folders ...

   On a phone each contributor is three short lines, one under another. */

/* --- the deliveries head --------------------------------------------------- */

.head-actions{display:flex;gap:var(--space-3);align-items:center;flex-wrap:wrap}
.head-actions .btn{flex:none}

/* --- the settings sheet and the share step ---------------------------------- */

.field-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 var(--space-4)}
.field-pair .field{margin-top:var(--space-4)}
.request-promise{margin:var(--space-4) 0 0;color:var(--ink2)}
/* "What people can send" (js/request-accepts.js): one row per choice, tall
   enough for a thumb, then the unzip checkbox with its hint beneath. */
.accepts-choice{margin-top:var(--space-4);margin-bottom:var(--space-2)}
.accepts-choice .check{min-height:var(--control-l)}
.accepts-keep{margin-top:var(--space-3)}
.accepts-keep .check{min-height:var(--control);align-items:center}
.accepts-keep .check input{margin-top:0}
.accepts-keep .hint{display:block;margin-top:var(--space-1)}
.request-rotate-body p{margin:0}
.request-rotate-body p + p,.request-rotate-body .err{margin-top:var(--space-3)}
@media (max-width:820px){
 .field-pair{grid-template-columns:minmax(0,1fr)}
}

/* --- the panel -------------------------------------------------------------- */

.request-headline{margin:0;color:var(--ink);overflow-wrap:anywhere}
.request-numbers{margin:var(--space-1) 0 0}
.request-takes{margin:var(--space-1) 0 0}
/* Files wait for the owner's release (js/request-held.js): words, then the
   one button, which wraps under them on a phone. */
.request-held{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap;margin:var(--space-3) 0 0}
.request-held > span{min-width:0;overflow-wrap:anywhere}
.request-account{margin:var(--space-3) 0 0}
.request-link{margin-top:var(--space-4)}
/* On a delivery nobody else has a link to, the link comes first, right
   under the heading (js/request-panel.js). */
.panel-head + .request-link{margin-top:0}
.request-link + .request-headline{margin-top:var(--space-4)}
.request-link .text{height:var(--control-s)}
.request-actions{margin-top:var(--space-4);gap:var(--space-2)}
.request-subhead{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-top:var(--space-5);padding-bottom:var(--space-2)}
.request-names{margin-top:var(--space-3)}

/* The rows run to the panel's edges (components.css); three parts to a row
   when the panel is wide enough for them, one under the other when it is
   not. The panel's own width decides, not the window's: beside the page's
   side column a laptop window leaves the panel half its width, and three
   columns there squeezed the name to a letter a line. */
.request-panel{container:request / inline-size}
.request-contributors{--cols:minmax(0,1fr) auto auto;padding:0;list-style:none;border-top:1px solid var(--line2)}
.contributor-row{align-items:start}
/* A stranger chose the name (up to 80 characters): wrapped, never cut off.
   The .contributor-row prefix makes this three classes, so it beats
   app.css's `.who .t` (nowrap, ellipsis) on specificity, like
   contribute.css's rule for the stranger's own list; with the two classes
   alone the tail of a long name could not be read anywhere. */
.contributor-row .who .t,.contributor-row .who .s{white-space:normal;overflow-wrap:anywhere;unicode-bidi:isolate}
.contributor-times{text-align:right}
/* Release Anna's 3 files, Download Anna's files and Remove everything Anna
   added: under the name, one below the other, each as wide as its words
   and wrapped inside the row, since each carries a name a stranger chose. */
.contributor-remove,.contributor-release,.contributor-download{align-self:flex-start;text-align:left;margin-top:var(--space-1);white-space:normal;overflow-wrap:anywhere;max-width:100%;height:auto}

/* Remove everything Anna added?: the name is a stranger's, up to 80
   characters of one word. It wraps, so the sheet stays as wide as the
   screen and its close button stays in reach. */
#remove-contributor-sheet header h2{min-width:0;overflow-wrap:anywhere}
#remove-contributor-sheet .body{overflow-wrap:anywhere}

/* 720px: the name, "Remove everything Anna added" on one line, the count
   and both times on one line need about that much. (A container query
   cannot read a custom property, so it is a literal.) */
@container request (max-width: 720px) {
 .request-contributors{--cols:minmax(0,1fr)}
 .contributor-row .cell-num,.contributor-times{text-align:left}
}

@media (max-width:820px){
 .request-actions .btn{flex:1 1 auto}
}

/* Text buttons are small targets; a finger gets the full control height
   (--control-l: --control is 44px only on a narrow screen). */
@media (pointer:coarse),(max-width:820px){
 .request-panel .btn.link,.request-panel .btn.sm{min-height:var(--control-l)}
}

/* --- the offer, for a delivery with no request --------------------------------- */

.request-offer .s{margin:var(--space-1) 0 var(--space-4)}
