/* Wave 2, creators: the pinned Next bar, the contact-style header, the facts
   that fold on a phone, the roster whose rows are rows. Loads after hub.css
   (Propshaft takes the folder alphabetically) and reads only its tokens, so
   a change to a curve or a colour there lands here too. */

/* Header: name, identity line, the four ways to reach her, Edit top right. */

.creator-head .page-sub.actions-row {
  row-gap: 4px;
}

.creator-head-edit {
  align-self: flex-start;
}

/* Status as a chip that opens a sheet. A chip is a label; this one is also
   a button, so it keeps the chip's shape and gets a hand cursor and the
   same press as everything else. */
.status-chip {
  cursor: pointer;
  font-family: inherit;
}

.status-chip:active {
  transform: scale(.98);
}

.status-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 -8px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  font-family: "Quicksand", sans-serif;
  font-size: var(--fs-body);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.status-row:hover {
  background: rgba(12, 65, 41, .06);
}

.status-row:active {
  transform: scale(.98);
}

.status-row-text {
  display: grid;
  gap: 1px;
}

.status-row-text .page-sub {
  font-size: var(--fs-sm);
}

.status-row-tick {
  width: 22px;
  text-align: right;
  font-weight: 700;
  color: var(--ink);
}

/* Assigned to, as a link that opens the owner picker. */
.assign-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* Quick actions: four round buttons with a word under each, 44pt targets. */
.quick-actions {
  display: flex;
  gap: var(--s4);
  margin-top: var(--s3);
}

.quick-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 56px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-family: "Quicksand", sans-serif;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}

.quick-action:active {
  transform: scale(.96);
}

.quick-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.quick-action:hover .quick-action-icon {
  background: var(--surface-solid);
  border-color: var(--line-strong);
}

.quick-action-label {
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: var(--lh-label);
}

.quick-action.is-muted {
  color: var(--ink-mute);
  cursor: default;
}

.quick-action.is-muted .quick-action-icon {
  background: transparent;
  border-style: dashed;
}

.quick-action.is-success .quick-action-icon {
  background: var(--ok-soft);
  border-color: var(--ok);
}

/* The Next bar. Under the header on a laptop, in the same place on every
   creator page; fixed to the bottom of a phone, under the thumb. The only
   lime on the page, and only when it is your move. */
.next-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin: 0 0 var(--s5);
  padding: 14px 18px;
  border-radius: var(--r);
  background: var(--surface-solid);
  border: 1px solid var(--line);
}

.next-bar-text {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.next-bar-sentence {
  font-size: 15px;
  font-weight: 700;
}

.next-bar-actions {
  flex-shrink: 0;
}

.next-bar-hint {
  font-size: var(--fs-sm);
}

/* The sentence a confirming sheet asks with: the amount, in the reader's
   face, above the one lime button. */
.consequence {
  margin: 0 0 6px;
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: 1.35;
}

/* The filming sheet's fast path: the picked script, its first line, and
   "Change" for the rare other choice. */
.script-pick {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
}

.script-pick-title {
  display: block;
  font-size: var(--fs-body);
}

.script-pick-line {
  margin: 4px 0 0;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}

.script-change {
  margin-top: 6px;
}

.script-change > summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.script-change > summary::-webkit-details-marker {
  display: none;
}

/* "Box sent": a segment instead of a date wheel. A plain fieldset, not the
   boxed field-group; it is one question, not a section. */
.box-when {
  border: 0;
  padding: 0;
  margin: 6px 0 0;
  min-width: 0;
}

.box-when legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

/* Smaller segments for inside a sheet and the count line. */
.segments-sm .segment {
  padding: 5px 11px;
  font-size: 12px;
  min-height: 28px;
}

/* A select in the pill language of the segments beside it. */
.input-pill {
  border-radius: var(--r-pill);
  min-width: 0;
  padding-right: 32px;
  font-weight: 700;
  font-size: 13px;
}

/* Terms fold: a caret that turns, and "Edit" so the summary reads as a way
   in rather than a label over hidden fields. */
.collab-terms > summary {
  list-style: none;
  position: relative;
  padding-right: 22px;
}

.collab-terms > summary::-webkit-details-marker {
  display: none;
}

.collab-terms > summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: .55em;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(-45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}

.collab-terms[open] > summary::after {
  transform: rotate(45deg);
}

.collab-terms-edit {
  margin-left: auto;
  font-size: var(--fs-sm);
}

/* The team's timeline: one current step, a gap in the record set faint. On
   a laptop the fold is always open and its summary is not shown. */
.timeline-fold > summary {
  display: none;
}

.portal-timeline li.skipped {
  color: var(--ink-faint);
}

.portal-timeline li.skipped .portal-timeline-dot {
  background: transparent;
  border-color: var(--line);
  border-style: dashed;
}

.portal-timeline li.skipped .portal-timeline-label {
  font-weight: 600;
}

/* Activity: a faint day header, rows carry only the time. */
.timeline li.timeline-day {
  padding: 14px 0 4px;
  border-bottom: none;
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.timeline li.timeline-day:first-child {
  padding-top: 4px;
}

.activity-more-phone {
  display: none;
}

/* The facts summary line is for the phone only. */
.facts-summary {
  display: none;
}

.facts-fold > summary {
  display: none;
}

/* Roster. The row is the link, the button is the move, the checkboxes come
   in only in selection mode. */
.person-row {
  cursor: pointer;
  grid-template-columns: 0px 36px minmax(160px, 1.2fr) minmax(200px, 1.6fr) auto;
  transition: grid-template-columns var(--dur-enter) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}

.people-check {
  width: auto;
  min-width: 0;
  overflow: hidden;
  min-height: var(--tap);
  transition: width var(--dur-enter) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}

.people-head .people-check {
  width: 0;
  opacity: 0;
}

.people-head {
  gap: 12px 14px;
  flex-wrap: wrap;
}

.people-count {
  margin-right: auto;
}

.people-select {
  font-size: var(--fs-sm);
  min-height: 28px;
}

.is-selecting .person-row {
  grid-template-columns: 28px 36px minmax(160px, 1.2fr) minmax(200px, 1.6fr) auto;
}

.is-selecting .people-head .people-check {
  width: 28px;
  opacity: 1;
}

.people-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

/* The bulk bar docks to the bottom of the screen, above the home indicator,
   so the seventh row's tick never has to scroll back up to find it. */
.bulk-bar-dock {
  position: sticky;
  bottom: 0;
  z-index: var(--z-sticky);
  margin: 0 -16px -10px;
  border-radius: 0 0 var(--r) var(--r);
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--surface-solid);
  padding: 12px 16px calc(12px + var(--safe-b));
  box-shadow: var(--shadow-menu);
}

@media (max-width: 760px) {
  .quick-actions {
    gap: var(--s3);
    justify-content: space-between;
    max-width: 320px;
  }

  .creator-head-edit {
    order: -1;
    width: 100%;
    justify-content: flex-end;
    margin-bottom: -28px;
  }

  /* The bar under the thumb. Fixed rather than sticky: it comes first in
     the page, and a sticky element near the top never reaches the bottom
     edge. The page gets room at the end so the last block is not under it. */
  .next-bar {
    position: fixed;
    left: 0;
    right: 0;
    /* Above the phone shell's tab bar (50px plus the home indicator), which
       owns the bottom edge. */
    bottom: calc(50px + var(--safe-b));
    z-index: var(--z-sticky);
    margin: 0;
    padding: 10px 16px 12px;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(12, 65, 41, .12);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hub-main:has(.next-bar) {
    padding-bottom: calc(150px + var(--safe-b));
  }

  .next-bar-sentence {
    font-size: var(--fs-body);
  }

  .next-bar-actions {
    width: 100%;
  }

  .next-bar-actions > .btn,
  .next-bar-actions > span > .btn,
  .next-bar-actions > form,
  .next-bar-actions > form > .btn,
  .next-bar-actions > .portal-link {
    flex: 1 1 auto;
  }

  .next-bar-actions form.button_to {
    display: flex;
    flex: 1 1 auto;
  }

  .next-bar-actions .btn {
    width: 100%;
    min-height: var(--tap);
  }

  .next-bar-actions .portal-link .btn {
    width: auto;
  }

  /* Facts fold to two lines and a Details link. */
  .facts-summary {
    display: block;
    margin: 0 0 4px;
  }

  .facts-fold > summary {
    display: block;
    cursor: pointer;
    list-style: none;
    font-size: var(--fs-sm);
    font-weight: 700;
    min-height: 32px;
  }

  .facts-fold > summary::-webkit-details-marker {
    display: none;
  }

  .facts {
    margin-top: var(--s3);
  }

  /* Label over value rather than beside it, like the portal's list. */
  .facts .detail-list > div {
    display: grid;
    gap: 2px;
  }

  .facts .detail-list dd {
    text-align: left;
  }

  /* The timeline folds to its current step. */
  .timeline-fold > summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    cursor: pointer;
    list-style: none;
    min-height: 32px;
  }

  .timeline-fold > summary::-webkit-details-marker {
    display: none;
  }

  .timeline-fold > summary strong {
    font-size: var(--fs-body);
  }

  /* Five rows, then Show all. */
  .timeline li.is-beyond {
    display: none;
  }

  .activity-more-phone {
    display: inline;
  }

  /* Roster rows on a phone: no copy link (her page has it), the box column
     collapses the same way. */
  .person-row {
    grid-template-columns: 0px 36px 1fr;
  }

  .is-selecting .person-row {
    grid-template-columns: 28px 36px 1fr;
  }

  .person-copy {
    display: none;
  }

  /* A pill never widens the row past the screen: it wraps instead. */
  .person-action .btn {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }

  .bulk-bar-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(50px + var(--safe-b));
    margin: 0;
    padding-bottom: 12px;
    border-radius: 0;
  }
}
