/* ==========================================================================
 * Festival Studio - team view
 *
 * Rules for this screen only (st-team-* classes); the shared kit is in
 * /studio/studio.css. A role card is two columns: what the role can and
 * cannot do on the left, the people who have it on the right. The split
 * follows the card's own width (a container query), so it also holds when
 * the sidebar collapses.
 * ========================================================================== */

/* ---------- role cards ---------- */
.st-team-card { container-type: inline-size; }
.st-team-card .st-card__title { display: flex; align-items: center; gap: 8px; }

/* Count next to a card or list title. */
.st-team-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0;
  color: var(--st-text-dim); background: rgba(255, 255, 255, 0.08);
}
.st-team-count:empty { display: none; }

.st-team-role { display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.6fr); }
.st-team-role__about { padding-right: 28px; }
.st-team-role__link { margin-top: 14px; }
.st-team-role__link .st-textlink { display: inline-flex; align-items: center; gap: 6px; }

.st-team-facts { display: flex; flex-direction: column; gap: 6px; }
.st-team-facts__heading { font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--st-text-muted); }
.st-team-facts__list + .st-team-facts__heading { margin-top: 10px; }
.st-team-facts__list { display: flex; flex-direction: column; gap: 6px; }
.st-team-fact { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--st-text-dim); }
.st-team-fact .st-icon { margin-top: 3px; }
.st-team-fact--can .st-icon { color: var(--st-green); }
.st-team-fact--cannot .st-icon { color: var(--st-text-muted); }

/* ---------- people ---------- */
.st-team-people { min-width: 0; padding-left: 28px; border-left: 1px solid var(--st-border); }
.st-team-people > * + * { margin-top: 10px; }
.st-team-people .st-list__item { min-height: 56px; }
.st-team-people .st-list__item:first-child { padding-top: 0; min-height: 48px; }

.st-team-person__avatar { display: inline-flex; flex: 0 0 auto; }
.st-team-person__tags { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.st-team-person__actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex: 0 0 auto; min-width: 76px; }
.is-readonly > .st-team-person > .st-team-person__actions { min-width: 0; }
.st-team-person__loading { width: 140px; margin: 4px 0; }
.st-team-person.is-faded .st-person__name { color: var(--st-text-dim); font-weight: 500; }
.st-team-avatar { color: var(--st-text-muted); background: rgba(255, 255, 255, 0.06); }
/* The app shows the brand as a rounded square, not a circle. */
.st-team-brand { display: block; width: 36px; height: 36px; border-radius: 10px; overflow: hidden; background: var(--st-bg-elev); }
.st-team-brand img { width: 100%; height: 100%; object-fit: cover; }

.st-team-people__empty:empty { display: none; }
.st-team-people__empty .st-empty { padding: 20px 16px 16px; border: 1px dashed var(--st-border-strong); border-radius: var(--st-r-12); }
.st-team-empty-line { font-size: 13px; color: var(--st-text-muted); }

/* One-line reason a list is read-only, and the "no notification" hint after an add. */
.st-team-note, .st-team-hint { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--st-text-muted); }
.st-team-note .st-icon, .st-team-hint .st-icon { margin-top: 2px; }
.st-team-hint { padding: 8px 10px; border-radius: var(--st-r-8); background: rgba(255, 255, 255, 0.04); color: var(--st-text-dim); }

/* Warning inside the "Remove co-host?" dialog. */
.st-team-confirm > .st-callout { margin-top: 14px; }

/* ---------- vendor stand teams ---------- */
.st-team-stands { display: flex; flex-direction: column; gap: 14px; }
.st-team-stands__summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start;
  padding: 14px 16px; border-radius: var(--st-r-12);
  border: 1px solid var(--st-border-strong); background: rgba(255, 255, 255, 0.03);
}
.st-team-stands__summary.is-warn { border-color: rgba(251, 191, 36, 0.38); background: rgba(251, 191, 36, 0.07); }
.st-team-stands__summary.is-ok { border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.07); }
.st-team-stands__icon { margin-top: 2px; color: var(--st-text-muted); }
.is-warn > .st-team-stands__icon { color: var(--st-amber); }
.is-ok > .st-team-stands__icon { color: var(--st-green); }
.st-team-stands__figure { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; font-variant-numeric: tabular-nums; }
.st-team-stands__sub { margin-top: 2px; font-size: 13px; color: var(--st-text-dim); }
.st-team-meter { grid-column: 2; height: 6px; margin-top: 8px; max-width: 420px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.st-team-meter__bar { display: block; height: 100%; border-radius: inherit; background: var(--st-green); }

.st-team-stands__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 4px; }
.st-team-stands__head .st-section-title { display: flex; align-items: center; gap: 8px; }

/* The name column takes what is left and truncates instead of widening the table. */
.st-team-stand-cell { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* On a narrow screen the table scrolls sideways rather than squeezing the name away. */
.st-team-stands .st-table__table { min-width: 640px; }
.st-team-stand-link { font-weight: 600; }
.st-team-stand-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.st-team-assign { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- who can do what ---------- */
.st-team-matrix__scroll { overflow-x: auto; border-top: 1px solid var(--st-border); border-radius: 0 0 var(--st-r-14) var(--st-r-14); }
.st-team-matrix__scroll:focus-visible { outline-offset: -2px; }
.st-team-matrix { width: 100%; min-width: 820px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.st-team-matrix thead tr:first-child > :first-child { width: 28%; }
.st-team-matrix th, .st-team-matrix td { padding: 7px 12px; border-bottom: 1px solid var(--st-border); text-align: center; vertical-align: middle; }
.st-team-matrix tbody tr:last-child > * { border-bottom: 0; }
.st-team-matrix thead th, .st-team-matrix thead td { background: var(--st-bg-head); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--st-text-muted); white-space: nowrap; }
.st-team-matrix__groups th, .st-team-matrix__groups td { padding-top: 10px; padding-bottom: 2px; border-bottom: 0; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.st-team-matrix thead tr:last-child th { color: var(--st-text-dim); }
.st-team-matrix tbody th { padding-left: 20px; text-align: left; font-weight: 500; color: var(--st-text); }
.st-team-matrix__note { display: block; font-size: 12px; font-weight: 400; color: var(--st-text-muted); }
.st-team-matrix td > .st-icon { margin: 0 auto; }
.st-team-matrix__yes { color: var(--st-green); }
.st-team-matrix__no { color: var(--st-text-muted); opacity: 0.55; }
.st-team-matrix__part { font-size: 12px; font-weight: 500; color: var(--st-text-dim); white-space: nowrap; }
/* Where the per-stand roles start. */
.st-team-matrix .st-team-matrix__split { border-left: 1px solid var(--st-border); }
/* The signed-in person's own column. */
.st-team-matrix .is-you { background: rgba(109, 92, 255, 0.09); }
.st-team-matrix thead .is-you { background: rgba(109, 92, 255, 0.16); color: var(--st-text); }
.st-team-matrix__you {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; vertical-align: 1px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; color: #d7d1ff; background: rgba(109, 92, 255, 0.3);
}

/* ---------- narrow cards: facts above people ---------- */
@container (max-width: 700px) {
  .st-team-role { grid-template-columns: minmax(0, 1fr); }
  .st-team-role__about { padding-right: 0; }
  .st-team-people { margin-top: 16px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--st-border); }
}
/* Phone-width cards: the role badge drops under the name. */
@container (max-width: 460px) {
  .st-team-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
  .st-team-person__avatar { grid-area: 1 / 1; }
  .st-team-person > .st-person__text { grid-area: 1 / 2; }
  .st-team-person__actions { grid-area: 1 / 3; min-width: 0; }
  .st-team-person__tags { grid-area: 2 / 2 / auto / -1; }
  .st-team-stands__head .st-grow { display: none; }
  .st-team-card > .st-card__header { flex-wrap: wrap; }
}
