/* Team protocol extras */

.tt-teams-editor {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.tt-team-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
}

.tt-team-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.tt-team-card__num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: #ecfdf5;
  color: #166534;
}

.tt-team-name {
  flex: 1 1 10rem;
  min-width: 8rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-weight: 700;
}

.tt-team-remove {
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}

.tt-team-card__players {
  display: grid;
  gap: 0.4rem;
}

.tt-team-player {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}

.tt-th-roster {
  min-width: 7rem;
  background: #ecfdf5 !important;
  color: #166534 !important;
}

.tt-roster {
  text-align: left !important;
  vertical-align: top !important;
  background: #f8fafc;
  padding: 0.35rem 0.45rem !important;
}

.tt-roster-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #334155;
}

.tt-team-table .tt-th-opp,
.tt-team-table .tt-team-cell,
.tt-team-table .tt-dash {
  min-width: 4.6rem;
}

.tt-team-cell {
  padding: 0 !important;
  vertical-align: stretch !important;
}

.tt-team-cell__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 100%;
  min-height: 4.8rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.3rem 0.2rem;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.tt-team-cell__rubbers {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.tt-team-cell__agg {
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tt-team-cell__mp {
  font-size: 0.72rem;
  font-weight: 800;
}

.tt-encounter-sheet {
  max-width: 26rem;
}

.tt-encounter-rubbers {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 0.75rem;
}

.tt-encounter-rubber {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.5rem;
  text-align: left;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  color: inherit;
}

.tt-encounter-rubber__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.tt-encounter-rubber__score {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tt-encounter-rubber__names {
  font-size: 0.82rem;
  font-weight: 600;
}

.tt-encounter-rubber--win {
  background: #f0fdf4;
  border-color: #86efac;
}

.tt-encounter-rubber--loss {
  background: #fff1f2;
  border-color: #fecdd3;
}

.tt-encounter-total {
  margin: 0 0 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .tt-team-table .tt-th-opp,
  .tt-team-table .tt-team-cell,
  .tt-team-table .tt-dash {
    min-width: 3.8rem;
  }
  .tt-team-cell__btn {
    min-height: 4.2rem;
  }
}
