/* The Access tokens page (js/tokens.js): the new-token panel, the token
   rows and their scope labels. Loaded by index.html after recipient.css.
   The shared pieces (.panel .list .list-row .who .tag .field .check
   .linkrow .hint .empty.inline) are app.css's and components.css's;
   colours and type sizes are tokens.

   A token row:  name  [Active]                                   Revoke
                 [See deliveries] [Create deliveries and upload]
                 Expires 20 December 2026. Last used today, 14:05.

   The state is a coloured label; what a token can do are neutral
   labels, so the one colour on a row is the one that can change. */

/* --- the token just created: shown once, so it stands out ------------- */

#new-token {
  background: var(--accent-tint);
  border-color: var(--accent);
  animation: rise var(--dur-slow) var(--ease-out);
}
#new-token > h2 { margin-bottom: var(--space-1); }
#new-token .s { margin: 0 0 var(--space-4); color: var(--ink2); }

#new-token .text {
  background: var(--surface);
  font: 400 var(--text-ui)/20px var(--font-mono);
  letter-spacing: .02em;
}
#new-token .linkrow .btn { flex: none; }

/* app.css's .btn.is-done makes the label teal, which on the primary
   button's teal fill would be 1:1 in dark and blank in light. Keep the
   label on-accent while it says Copied. */
#new-token .btn.primary.is-done { color: var(--on-accent); }

#new-token .hint { margin-bottom: 0; } /* a <p>: its default bottom margin would pad the panel twice */
#new-token .hint code { font-family: var(--font-mono); color: var(--ink2); }

/* --- the rows ----------------------------------------------------------- */

.token-list { margin-block: 0; padding: 0; list-style: none; }

.token-row { --cols: minmax(0, 1fr) auto; align-items: start; }

.token-row .t { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-l); line-height: 22px; }
.token-row .token-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.token-row .tag { flex: none; }
.token-row .btn { align-self: start; }

.scope-list { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: 6px; }
.token-row .who .s { margin-top: 6px; white-space: normal; }

/* --- the form ----------------------------------------------------------- */

.token-submit { margin-top: var(--space-4); }
