/* My team and the line-up and DreamBreaker order forms (27-21). Tokens from app.css, light only. Roster, lines and
   results are plain lists; the Captain, Winner and You words are the label style, so no color carries meaning
   alone. Selects run full width at 390 and every control is 44px high. */
.my-team-slot {
  margin-top: var(--space-lg);
}

.my-team {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--paper);
  border: 1px solid var(--control);
  border-radius: var(--r-ctl);
  color: var(--ink);
}

.my-team__h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-22);
  color: var(--ink);
}

.my-team__h3 {
  margin: 0 0 var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.my-team__roster,
.my-team__lines,
.my-team__result-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-team__player,
.my-team__line,
.my-team__result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  min-height: 2.75rem;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--control);
}

.my-team__player-name,
.my-team__line-name,
.my-team__side-name {
  font-weight: 600;
}

.my-team__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-sm);
  min-height: 1.5rem;
  border: 1px solid var(--ink);
  border-radius: var(--r-ctl);
  font-size: var(--fs-15);
  font-weight: 600;
  color: var(--ink);
}

.my-team__tag > svg {
  width: 1rem;
  height: 1rem;
}

.my-team__versus {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
  margin: 0 0 var(--space-sm);
}

.my-team__opponent {
  font-size: 1.125rem;
  font-weight: 600;
}

.my-team__stage {
  font-size: var(--fs-15);
  color: var(--muted);
}

.my-team__need {
  margin: 0 0 var(--space-sm);
  font-weight: 500;
}

.my-team__line {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xs);
}

.my-team__pair--them {
  color: var(--muted);
}

.my-team__result {
  justify-content: space-between;
}

.my-team__side {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.my-team__score {
  font-family: var(--font-mono);
  font-weight: 600;
}

.my-team__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.my-team__table th,
.my-team__table td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--control);
}

.my-team__mine th,
.my-team__mine td {
  font-weight: 700;
}

.my-team__mine th > .my-team__tag {
  margin-left: var(--space-sm);
}

.my-team__code {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.my-team__code-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
}

.my-team__code-label {
  font-size: var(--fs-15);
  color: var(--muted);
}

.my-team__code-value {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.my-team__free {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0 0 var(--space-md);
}

.my-team__free > svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
}

.my-team__manage-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-top: var(--space-md);
}

.my-team__summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
  cursor: pointer;
}

.my-team__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-sm);
}

.my-team__field,
.lineup-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1 1 14rem;
  min-width: 0;
}

.my-team__label,
.lineup-form__label {
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--ink);
}

.my-team__input,
.my-team__select,
.lineup-form__select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 var(--space-md);
  background: var(--paper);
  border: 1px solid var(--control);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: inherit;
}

.my-team__button,
.lineup-form__submit {
  min-height: 2.75rem;
  min-width: 2.75rem;
}

.my-team__error:empty,
.lineup-form__error:empty,
.lineup-form__status:empty {
  display: none;
}

.my-team__error,
.lineup-form__error {
  margin: 0;
  font-size: var(--fs-15);
  color: var(--error);
}

.lineup-form__status {
  margin: 0;
  font-weight: 500;
}

.lineup-form__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.lineup-form__line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
  padding: var(--space-sm) 0 0;
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--control);
}

.lineup-form__legend {
  padding: 0;
  font-weight: 600;
}

.lineup-form__line > .lineup-form__error {
  flex-basis: 100%;
}

.lineup-form__rule {
  margin: 0;
}

.lineup-form__locked {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lineup-form__locked-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  min-height: 2.75rem;
  align-items: center;
}

.lineup-form__locked-name {
  font-weight: 600;
}

.lineup-form__select[aria-invalid='true'],
.my-team__input[aria-invalid='true'] {
  border-color: var(--error);
  border-width: 2px;
}

.my-team :focus-visible,
.my-team-slot :focus-visible,
.lineup-form :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .my-team__line {
    grid-template-columns: 12rem 1fr 1fr;
    align-items: center;
  }
}

.my-team__standings {
  /* Four columns do not fit a phone at 200% text: the block scrolls instead of the page. */
  min-width: 0;
  overflow-x: auto;
}

.my-team__standings:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* A team name is a row header: it reads as a body cell in bold, not as a second column header. */
.my-team__table tbody th {
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}
