/* Deleting a delivery (js/delivery-deletion.js, js/deliveries-deleted.js,
   js/delivery-deleted-view.js): the danger area at the bottom of a delivery's
   page, the two confirmation sheets' own lines, the toast's button, the
   Recently deleted section under the deliveries list, and the read-only page
   of a deleted delivery. Loaded by index.html after delivery.css, whose
   hero, panel and list classes the deleted page reuses.

   Danger is drawn with the --danger tokens and the shared .btn.danger,
   .btn.link.red, .callout.red and .err, plus one solid --solid-danger
   fill on the confirmation sheet's own button (below): no new colour.

   The danger area, bottom of the right column:
     ---------------------------------------------
     Delete this delivery
     Your client's link stops working at once. You can restore it for 30 days.
     [Delete delivery]   Erase now

   Recently deleted, closed and open (the chevron is delivery.css's .options):
     > Recently deleted (2)
     v Recently deleted (2)
       Your client's link no longer works ...
       Wedding, 12 September     29 days left     [Restore]   Erase now
       Newborn, Elsa             [Being erased]
       Studio shoot              [Removed by Theirway] 29 days left   Erase now

   The phone stacks each row: title, how long is left, then the buttons. */

/* --- the danger area -------------------------------------------------- */

.danger-area{padding:var(--space-5) var(--space-1) 0;border-top:1px solid var(--line)}
.danger-area h2{margin-bottom:var(--space-1);font:500 var(--text-l)/22px var(--font-sans)}
.danger-area .actions{margin-top:var(--space-3);gap:var(--space-4)}

/* Text buttons are small targets; a finger gets the full control height. */
@media (pointer:coarse),(max-width:820px){
 .danger-area .btn.link,.deleted-actions .btn.link{min-height:var(--control-l)}
}

/* --- the sheets ------------------------------------------------------- */

.deletion-name{overflow-wrap:anywhere}

/* The sheet's own button is the one filled red on these screens: after the
   page's "Delete delivery" (red words on an outlined button), this is the
   click that does it.
   --solid-danger with white words is the toast's and the failed label's
   pair, AA in both themes. */
.sheet.deletion .btn.danger{background:var(--solid-danger);border-color:var(--solid-danger);color:var(--on-photo)}
.sheet.deletion .btn.danger:hover{background:color-mix(in srgb,var(--solid-danger) 82%,black);border-color:transparent}
.deletion-body p{margin:0}
.deletion-body p + p,.deletion-body .err{margin-top:var(--space-3)}

/* --- the toast's button ----------------------------------------------- */

/* On the toast's own ink ground, so the words and the focus ring are the
   page's paper colour, not the accent (teal on ink is too faint). */
.toast-action{flex:none;min-height:var(--control-s);padding:0 var(--space-2);border:0;border-radius:var(--radius-s);background:none;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.toast-action:hover{background:color-mix(in srgb,var(--bg) 16%,transparent)}
.toast-action:focus-visible{outline-color:var(--bg)}
@media (pointer:coarse),(max-width:820px){.toast-action{min-height:var(--control-l)}}

/* --- Recently deleted -------------------------------------------------- */

.deleted-section{margin-top:var(--space-6)}
.deleted-section > summary h2{font:500 var(--text-l)/22px var(--font-sans);letter-spacing:0}
.deleted-section .n{font-weight:400;color:var(--mute);font-variant-numeric:tabular-nums}
.deleted-note{margin:0 0 var(--space-4);max-width:62ch}
.deleted-section .err{margin:0 0 var(--space-3)}
.deleted-list,.deleted-files{margin-block:0;padding:0;list-style:none}
.deleted-list{--cols:minmax(0,1fr) auto auto}
.deleted-left{color:var(--ink2);font-variant-numeric:tabular-nums;white-space:nowrap}
/* The "Removed by Theirway" tag (a delivery an operator took down) sits
   beside the days left. */
.deleted-status{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2) var(--space-3)}
.deleted-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-4)}
.deleted-row .who .t{text-decoration-color:color-mix(in srgb,var(--ink) 30%,transparent)}
@media (max-width:820px){
 .deleted-list{--cols:minmax(0,1fr)}
 .deleted-actions{justify-content:flex-start}
}

/* --- the page of a deleted or erasing delivery ------------------------- */

/* The banner is the first thing: what happened, and the two ways on. It is
   the callout's amber (a thing to take care over) or its red (erasing). */
.deleted-banner{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3) var(--space-5);max-width:none;margin-bottom:var(--space-6)}
.deleted-banner p{margin:0;font-size:var(--text-ui);line-height:20px}
.deleted-banner > p:first-child{flex:1 1 320px}
.deleted-banner .err{flex-basis:100%;margin:0}
.deleted-file{--cols:minmax(0,1fr) auto}
.deleted-more{margin:var(--space-3) 0 0}
