/*
 * Team. The list and the worker page reuse the Clients classes (numbers,
 * tools, table, the two-column page); these are only what Team adds. Every
 * colour is a variable from theme.css except the QR, which is drawn dark on
 * white whatever the page is, because a scanner needs that contrast. Nothing
 * has a fixed height that holds words: text wraps and boxes grow.
 */

/* A destructive confirm: the alert red, with the thing named on it. */
.btn-danger {
  background: var(--red);
  color: var(--on-fill);
}

.team-you {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  font-size: var(--size-small);
  font-weight: 600;
  vertical-align: 2px;
}

.page__title .team-you {
  vertical-align: 5px;
}

.team-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-1);
}

.team-filter__label {
  color: var(--ink-2);
  font-weight: 600;
}

.team-filter .field-input {
  width: auto;
  min-width: 180px;
}

/* A question asked in place, on its row or in the panel. */
.team-ask {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.team-ask__q {
  font-weight: 600;
}

.team-ask__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-ask__actions .btn {
  min-height: 36px;
  padding: 6px 12px;
}

.team-ask--panel {
  margin: 4px 0 20px;
}

.team-table .tbl td {
  vertical-align: top;
}

.team-table .tbl .col-who {
  min-width: 200px;
}

/* One worker --------------------------------------------------------------- */

.team-pay {
  padding: 4px 20px 20px;
}

.team-month {
  grid-template-columns: 1fr 1fr;
}

.team-month .figure + .figure {
  box-shadow: -1px 0 0 var(--line);
}

.team-month .figure:hover {
  background: transparent;
}

.team-days dd {
  font-variant-numeric: tabular-nums;
}

.team-corrected {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: var(--size-small);
  font-weight: 600;
}

.team-foot {
  margin-top: var(--gap-3);
  padding-top: var(--gap-2);
  border-top: 1px solid var(--line);
}

.team-remove {
  color: var(--red);
}

/* The invite panel ----------------------------------------------------------- */

.team-code {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-bottom: var(--gap-2);
}

.team-code__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-2);
}

.team-code__value {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  user-select: all;
}

.team-code__expires {
  color: var(--ink-2);
  font-weight: 600;
}

.team-code__none {
  margin: 0 0 var(--gap-2);
  font-weight: 600;
}

.team-qr {
  display: block;
  width: 232px;
  height: 232px;
  margin-top: var(--gap-1);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--card-ring);
}

/* The pay and team forms ---------------------------------------------------- */

.team-choices,
.team-members {
  margin: 0 0 var(--gap-2);
  padding: 0;
  border: 0;
}

.team-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.team-choice input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.team-members__find {
  margin: 4px 0 8px;
}

.team-members__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  column-gap: var(--gap-2);
}

.team-list .props__item {
  padding-left: 0;
  padding-right: 0;
}

.team-head__actions svg,
.team-invite svg:not(.team-qr),
.panel-form .drawer__actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* While someone waits: Approve and Decline side by side, the column exactly their
   width (it kept 240 px, and "Horas esta semana" went to three lines at 1280), and
   the hours head room for two lines at most (item 3). */
.team-table .tbl .col-status .team-ask__actions--pair {
  flex-wrap: nowrap;
}

.team-table .tbl th.col-hours {
  min-width: 9em;
}

/* The owner's office staff, under the team. */
.team-office {
  margin-top: var(--gap-3);
}

.team-office .card__actions {
  margin-left: auto;
}

.team-office .tbl .col-action {
  width: 1%;
  text-align: right;
}

.team-office .tbl .col-action > .btn {
  white-space: nowrap;
}

.team-office__failed {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 0 20px var(--gap-2);
}

.team-office__tell {
  line-height: 1.5;
}
