/*
  Styles for the Teams page (R-032), on top of board.css (its colors and .button).
  Works at phone width; the page is mainly used on a computer (F-2).
*/

.teams-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.teams-header h1 {
  font-size: 1.4rem;
  margin: 1rem 0;
}

.teams-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.add-team {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.teams-page input[type="text"],
.teams-page select {
  font: inherit;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--color-not-set-border);
  border-radius: 0.3rem;
  background: var(--color-surface);
  color: var(--color-text);
  max-width: 100%;
}

.teams-page .button {
  font: inherit;
  cursor: pointer;
}

.team {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.4rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.team-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-top h2 {
  font-size: 1.1rem;
  margin: 0;
}

.team-top .team-name {
  flex: 1;
  min-width: 0;
  font-weight: bold;
}

.leader {
  display: block;
  margin-top: 0.6rem;
}

.members {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.members li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--color-line);
}

.members .member-name {
  flex: 1;
  min-width: 0;
}

.members .board-name {
  width: 9rem;
}

/* At phone width the row wraps: the name on its own line, then the board name and team side by side. */
@media (max-width: 30rem) {
  .members li {
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
  }

  .members .member-name {
    flex-basis: 100%;
  }
}

.members .empty,
.members .disabled .member-name {
  color: var(--color-muted-text);
}

.hint {
  color: var(--color-muted-text);
  margin: 0 0 1rem;
}

#editor[hidden] {
  display: none;
}
