/* A workspace's people: the Members section of Settings (pages/members.js), its Invite dialog and the invitation's
   page (pages/invite.js). The section is built from the Settings page's own parts (a line under the tabs, a group
   under a rule of ink with its title and its one action, a table); these are only what those parts do not say.
   Every rule is under its page, or under the dialog's own class (a dialog sits outside the page). Tokens from
   styles.css only. */

/* the groups, a rule of ink each, as far apart as the Access section's */
.page[data-page="settings"] .members { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; min-width: 0; }
/* where the workspace stands for inviting: a notice whose rule under it is the group's own rule of ink */
.page[data-page="settings"] .members-stands > .notice { border-bottom: 0; padding-bottom: 0; }
.page[data-page="settings"] .members-stands .notice-text { text-wrap: pretty; }
/* each table's columns keep their places whatever its rows hold, one person or fifty, as the Billing page's tables
   keep theirs: the person, or the address, takes what the others leave */
@media (min-width: 600px) {
  .page[data-page="settings"] .members :is(.members-role, .members-by, .members-sent) { width: 18%; }
  .page[data-page="settings"] .members :is(.members-joined, .members-expires) { width: 14%; }
}
/* a person, or an invited address: the name over the address, either of which may be long and breaks anywhere
   rather than widen the page; so does who invited, a name or, for an Owner with none, their address, which would
   otherwise take the invited address's room */
.page[data-page="settings"] :is(.members-person, .members-by) { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
/* and on a phone, where who invited is folded under the invited address after "By": a fact of the folded line is kept
   whole (styles.css .cell-fact), and an Owner's long address would scroll the invitations sideways and push Send
   again and Revoke out of view, so that one fact wraps, its label staying on its first line */
.page[data-page="settings"] .cell-fact:has(.members-inviter) { white-space: normal; min-width: 0; }
.page[data-page="settings"] .cell-fact .members-inviter { overflow-wrap: anywhere; min-width: 0; }
.page[data-page="settings"] .members-person .cell-stack { min-width: 0; }
.page[data-page="settings"] .members-you { margin-left: 6px; }  /* after the space that parts it from the name */
.page[data-page="settings"] .members-person .badge { justify-self: start; margin-top: 3px; font-size: 12.5px; }
/* what the gateway said of a row's Send again, under its address: a sentence, in the tone of what went wrong */
.page[data-page="settings"] .members-said { color: var(--bad); max-width: 62ch; line-height: 1.45; margin-top: 3px; text-wrap: pretty; }
.page[data-page="settings"] .members-said a { color: inherit; text-decoration-color: currentColor; }
/* why a row's Send again cannot be pressed now, where the button would be: its words end where the button's do
   (the quiet button's own inset), so the column's right edge is one line down the table */
.page[data-page="settings"] .members .settings-cell-action .note { display: inline-block; padding-right: 10px; white-space: nowrap; }
@media (max-width: 599px) {
  /* a phone: the row's action stands at the head of its row, beside the address, whatever is folded under that; what
     stands in a button's place sits on the line its word would */
  .page[data-page="settings"] .members .settings-cell-action { vertical-align: top; padding-top: 4px; }
  .page[data-page="settings"] .members .settings-cell-action .note { padding-top: 10px; padding-bottom: 10px; }
}
/* the People group's head ends in the field that narrows the people (from 8 of them up) and Invite. On a phone the
   field takes the line under the title, across it */
.page[data-page="settings"] .members .members-tools {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px 18px; flex: 1 1 auto; min-width: 0;
}
.page[data-page="settings"] .members .members-search { flex: 0 1 240px; min-width: 0; }
@media (max-width: 599px) {
  .page[data-page="settings"] .members .members-tools { display: contents; }
  .page[data-page="settings"] .members .members-search { order: 1; flex: 1 0 100%; margin-top: 4px; }
}
/* nobody is named by what was typed there: said where the people would be, what was typed set as typed */
.page[data-page="settings"] .members .members-none { display: grid; justify-items: start; padding: 2px 0 6px; }
.page[data-page="settings"] .members .members-typed { overflow-wrap: anywhere; }
/* how many of the people the field leaves, under them: a line that is always there for whoever hears the page, and
   takes no room until it says something */
.page[data-page="settings"] .members .members-matched { margin: 0; }
.page[data-page="settings"] .members .members-matched:not(:empty) { margin-top: 10px; }
/* alone in a workspace that can take someone: under the reader's own row, on a hairline, what is so in ink, what
   inviting gives quieter under it, and the press that changes it */
.page[data-page="settings"] .members .members-alone {
  display: grid; justify-items: start; gap: 2px; padding: 18px 0 4px; border-top: 1px solid var(--rule);
}
.page[data-page="settings"] .members .members-alone-title { font-weight: 550; }
.page[data-page="settings"] .members .members-alone-says { max-width: 64ch; color: var(--ink-2); text-wrap: pretty; }
.page[data-page="settings"] .members .members-alone .empty-action { margin-top: 12px; }
/* a first read that failed is the first thing under the tabs, whose own rule is right above it: no second rule */
.page[data-page="settings"] .settings-main > .page-sub[hidden] + .notice { border-top: 0; padding-top: 0; }
/* the line that counts the people names the workspace, whose name may be one long word with no hyphen (a personal
   workspace is named for its Owner's address): it breaks anywhere rather than widen the page */
.page[data-page="settings"] .settings-main > .page-sub { overflow-wrap: anywhere; }

/* the Invite dialog: the addresses, the role they are given, and behind a disclosure what that role can and cannot
   do, two short lists side by side, each under its word on a hairline; their lines rise in one after another as it
   opens (ui.js swing), and at once under reduced motion (styles.css) */
/* It stands a set way down from the top of the screen and grows downwards, as the command menu does: every address
   written is one more line, and a dialog laid out about its middle would move its title, and the line being written,
   with each. On a phone it starts at the top. */
.dialog.members-invite { margin-top: min(12vh, 96px); max-height: calc(100vh - min(12vh, 96px) - 24px); }
@media (max-width: 599px) {
  .dialog.members-invite { margin-top: 12px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
}
/* a phone's keyboard is up (members.js overKeyboard): the dialog stands in what the screen still shows, so its foot,
   and Send, are over the keyboard and never under it */
.dialog.members-invite[data-keyboard] {
  margin-top: calc(var(--shown-top, 0px) + 8px); max-height: calc(var(--shown-height, 100vh) - 16px);
}
/* the addresses are lines to write on: each one written is a line of its own on a hairline, as a table's rows are,
   and the line being written is the last, on the field's own rule. A line is its address, what is said of it under
   that (why it cannot be sent, in the tone of what went wrong; or the gateway's sentence once it was refused), and
   at its end what became of it and what can be done with it (Remove, and Edit for one that is no address), quiet
   until pointed at or reached by the keyboard */
.dialog.members-invite .members-to { display: grid; }
.dialog.members-invite .members-to-line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 12px;
  min-height: 36px; padding: 4px 0 4px 2px; border-bottom: 1px solid var(--rule);
}
/* where every control is 40px tall (a touch), so is every line, with Remove or without */
@media (max-width: 899px) { .dialog.members-invite .members-to-line { min-height: 48px; } }
.dialog.members-invite .members-to-who { display: grid; min-width: 0; line-height: 1.4; }
.dialog.members-invite .members-to-address { overflow-wrap: anywhere; }
.dialog.members-invite .members-to-says { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; text-wrap: pretty; }
.dialog.members-invite .members-to-says[data-tone="bad"] { color: var(--bad); }
.dialog.members-invite .members-to-says a { color: inherit; text-decoration-color: currentColor; }
/* what became of it, where Remove was: its word ends where Remove's does (the quiet button's own inset) */
.dialog.members-invite .members-to-state { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.dialog.members-invite .members-to-state:last-child { padding-right: 10px; }
.dialog.members-invite .members-to-line[data-state="sending"] .members-to-state { color: var(--ink-3); }
.dialog.members-invite .members-to-line:is([data-state="invited"], [data-state="again"]) .members-to-state { color: var(--ink); font-weight: 550; }
.dialog.members-invite .members-to-acts { grid-column: 3; display: inline-flex; align-items: center; }
.dialog.members-invite .members-to-acts .btn { color: var(--ink-3); }
.dialog.members-invite .members-to-acts .btn:focus-visible { color: var(--ink); }
@media (hover: hover) { .dialog.members-invite .members-to-acts .btn:hover:not(:disabled) { color: var(--ink); } }
/* under the line being written, over its help: why the sending ended where it did, the gateway's sentence in the
   tone of what went wrong (the Billing page's address in it the link it is); then what the list says of what it
   just took in (an address it had already, the words a paste held) and how the sends ended */
.dialog.members-invite .members-to-ended { font-size: 12.5px; line-height: 1.5; color: var(--bad); overflow-wrap: anywhere; text-wrap: pretty; }
.dialog.members-invite .members-to-ended a { color: inherit; text-decoration-color: currentColor; }
.dialog.members-invite .members-to-said { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
/* the role: a choice of two, each its name over its one sentence (styles.css .choices), then what the Owner hands
   over with the one picked, as quiet as a field's help */
.dialog.members-invite .members-as { gap: 8px; }
.dialog.members-invite .members-as-says { margin-top: 2px; text-wrap: pretty; }
.dialog.members-dialog .members-what { border-top: 1px solid var(--rule); padding-top: 14px; }
.dialog.members-dialog .members-what > summary { color: var(--ink-2); }
.dialog.members-dialog .members-what[open]:not([data-motion="closing"]) > summary { color: var(--ink); }
.dialog.members-dialog .members-what[open] > summary { margin-bottom: 14px; }
.dialog.members-dialog .members-what-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.dialog.members-dialog .members-what-title {
  padding-bottom: 6px; border-bottom: 1px solid var(--rule);
  font-size: 12.5px; font-weight: 500; font-stretch: var(--label-stretch); color: var(--ink-3);
}
.dialog.members-dialog .members-what-col ul { display: grid; gap: 6px; padding-top: 9px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.dialog.members-dialog .members-what-col li { text-wrap: pretty; }
.dialog.members-dialog .members-what[data-motion="opening"] li {
  animation: disclose-rise 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms + 70ms);
}
/* the title names the workspace, which may be one long word: it breaks anywhere in the title's column, left of the
   close button, rather than run under it and scroll the dialog sideways */
.dialog.members-dialog .dialog-title { overflow-wrap: anywhere; }
.dialog.members-dialog .dialog-error { line-height: 1.5; overflow-wrap: anywhere; }
.dialog.members-dialog .dialog-error a { color: inherit; text-decoration-color: currentColor; }
@media (max-width: 479px) {
  .dialog.members-dialog .members-what-body { grid-template-columns: minmax(0, 1fr); }
}

/* the invitation's page: the language's one card (styles.css .approve). Its facts say who invited, as what and
   until when; what a Member is sits under the word, quieter. A long workspace name or address breaks anywhere. */
.page[data-page="invite"] .approve-title, .page[data-page="invite"] .approve-card > p { overflow-wrap: anywhere; }
.page[data-page="invite"] .approve-card > p { text-wrap: pretty; }
.page[data-page="invite"] .invite-as { display: grid; gap: 1px; }
.page[data-page="invite"] .invite-as > .cell-sub { margin-top: 0; line-height: 1.4; }
.page[data-page="invite"] .invite-note { color: var(--ink); }

/* ---------------------------------------------------------------- the rest: what an Owner and a person change */

/* a person's row ends in its menu, the console's own kebab, 30px, on the row's right edge where the invitations'
   actions end; its list hangs from it against the viewport (members.js placeMenu), so a table that scrolls never
   clips it, and its words start on the list's own left edge, not on the cell's right alignment */
.page[data-page="settings"] .members td.members-act { width: 1%; padding-left: 8px; }
.page[data-page="settings"] .members .members-menu > .icon-btn {
  position: relative; width: 30px; height: 30px; min-width: 30px; min-height: 30px;
}
.page[data-page="settings"] .members .members-menu .menu-list { position: fixed; text-align: left; }
/* an invitation's two actions, Send again (or why it waits) and Revoke, side by side at the row's end */
.page[data-page="settings"] .members .members-acts { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; }
.page[data-page="settings"] .members .members-acts .row-actions { display: inline-flex; }
/* an invitation that waits for Team: its word where the time left would be */
.page[data-page="settings"] .members .members-waits { color: var(--ink-2); white-space: nowrap; }
/* who changes the people, said under them to whoever is no Owner: a quiet line on the table's left edge */
.page[data-page="settings"] .members .members-owners { margin: 12px 0 0; }

/* an act's dialog: what changes, a short paragraph each (what ends, in ink; what stays, quieter), then what Fluid
   cannot do for an Owner who goes, apart under a hairline and quieter still */
.dialog.members-act .dialog-body { gap: 10px; }
.dialog.members-act .members-act-says { line-height: 1.5; text-wrap: pretty; overflow-wrap: anywhere; }
.dialog.members-act .members-act-says + .members-act-says { color: var(--ink-2); }
.dialog.members-act .members-act-also {
  display: grid; gap: 6px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--rule);
  font-size: 13px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; overflow-wrap: anywhere;
}

@media (max-width: 899px) {
  /* a touch: the menu keeps its 30px and takes a 40px touch past its edges, inward from the row's end, so nothing of
     it reaches past the table (whose wrapper would then scroll) */
  .page[data-page="settings"] .members .members-menu > .icon-btn::after { content: ""; position: absolute; inset: -5px 0 -5px -10px; }
}
@media (max-width: 599px) {
  /* a phone: the menu stands at the right of the name, on its line */
  .page[data-page="settings"] .members td.members-act { padding-top: 0; }
  .page[data-page="settings"] .members .members-menu > .icon-btn { margin-top: 1px; }
  /* the invitations' two actions keep their row's head, Revoke under Send again where the row is narrow */
  .page[data-page="settings"] .members .members-acts { flex-direction: column; align-items: flex-end; gap: 0; }
}
