/* Teaminstellingen — seizoen, kern en statistieken.
 * The active roster renderer lives in web/team-settings.js. Keeping its
 * layout here prevents unrelated page styles from leaking into the roster.
 */

.roster-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.roster-groups {
  display: grid;
  gap: 26px;
  margin-top: 20px;
}

.roster-group-heading,
.guest-roster-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.roster-group-heading > b,
.guest-roster-title > b {
  font-size: 15px;
}

.roster-group-heading > span,
.roster-group-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.roster-group-heading > span {
  margin-right: auto;
}

:is(#playerRoster, #guestRosterSection) .roster-row[data-read-only="true"] {
  display: grid;
  grid-template-columns: 44px minmax(200px, max-content) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.roster-person-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.roster-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.roster-identity b {
  font-size: 14px;
}

.roster-identity small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.roster-detail,
.roster-admin {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #faf9ff;
  color: #4f565e;
  font-size: 12px;
}

.roster-detail b {
  color: #687067;
  font-size: 11px;
}

.roster-admin {
  border-color: #cde4d1;
  background: #edf8ef;
  color: #35734a;
  font-weight: 800;
}

.roster-admin-inline {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 10px;
}

.roster-account-status {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 7px;
  border: 1px solid #cde4d1;
  border-radius: 999px;
  background: #edf8ef;
  color: #35734a;
  font-size: 10px;
  font-weight: 800;
}

.roster-account-status.invited {
  border-color: #e9d8ad;
  background: #fff8e6;
  color: #89651a;
}

.roster-row-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.roster-row-actions .text-button,
.roster-row-actions .remove-player {
  flex: 0 0 auto;
}

.roster-row-actions .text-button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #bed5c4;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.roster-row-actions .roster-invite {
  border-color: #cbc8f5;
  color: var(--green);
  background: #fafaff;
}

.roster-row-actions .remove-player {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid #f2d6d2;
  border-radius: 10px;
  background: #fff7f6;
  color: #ba5b51;
  font-size: 22px;
  line-height: 1;
}

.guest-roster-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.guest-roster-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guest-add-button {
  min-height: 40px;
  padding: 9px 13px;
}

.guest-roster-list {
  display: grid;
}

.guest-roster-empty {
  margin: 18px 0 2px;
}

.guardian-modal {
  max-width: 620px;
}
.guardian-list {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 1.25rem;
}
.guardian-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line, #e2e1f4);
  border-radius: 0.85rem;
  background: #fff;
}
.guardian-row.pending {
  background: #fbfaff;
  color: #67637e;
}
.guardian-row-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
}
.guardian-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.guardian-status.active {
  border-color: #cde4d1;
  background: #edf8ef;
  color: #35734a;
}
.guardian-status.invited {
  border-color: #dcd6fb;
  background: #f7f5ff;
  color: #6659a5;
}
.guardian-list-label {
  margin: 0.5rem 0 0.05rem;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.guardian-row b,
.guardian-row small {
  display: block;
}
.guardian-row small {
  margin-top: 0.2rem;
  color: #73758a;
}

.guest-roster-row .roster-details {
  justify-self: end;
}

@media (max-width: 640px) {
  .roster-add-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .roster-add-actions .button {
    width: 100%;
    padding-inline: 8px;
    font-size: 12px;
  }

  :is(#playerRoster, #guestRosterSection) .roster-row[data-read-only="true"] {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    gap: 12px 10px;
    padding: 18px 4px;
  }

  :is(#playerRoster, #guestRosterSection)
    .roster-row[data-read-only="true"]
    > .avatar {
    grid-column: 1;
    grid-row: 1;
  }

  :is(#playerRoster, #guestRosterSection)
    .roster-row[data-read-only="true"]
    > .roster-person-meta {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .roster-person-meta {
    justify-content: space-between;
  }

  :is(#playerRoster, #guestRosterSection)
    .roster-row[data-read-only="true"]
    > .roster-details {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  :is(#playerRoster, #guestRosterSection)
    .roster-row[data-read-only="true"]
    > .roster-row-actions {
    grid-column: 2 / -1;
    grid-row: 3;
    justify-content: flex-start;
  }

  .guest-roster-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
  }

  .guest-add-button {
    width: 100%;
  }
}

.guardian-editor-action {
  margin-top: 6px;
}
