/* NextBall Teams page (teams.html / teams.js). Builds on tournaments.css. */
.tm-tag { font: 800 1em/1 var(--f-display, sans-serif); letter-spacing: .04em; color: var(--orange, #FF6A13); }
.tm-tag--big { font-size: 1em; }
.tm-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 4px; background: rgba(255, 255, 255, .04); }
.tm-name { flex: 1; min-width: 140px; font: 600 14px/1.3 var(--f-body, sans-serif); color: var(--fg-0, #fff); display: flex; flex-direction: column; gap: 2px; }
.tm-name small { font-size: 12px; color: var(--fg-2, #8E97C9); font-weight: 500; }
.tm-row .tm-name { flex-direction: row; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tm-sm { height: 34px !important; padding: 0 12px !important; font-size: 12px !important; }
.tm-danger { color: #FF7A85 !important; }
.tm-switch { display: flex; align-items: center; gap: 10px; font: 600 14px/1.3 var(--f-body, sans-serif); color: var(--fg-1, #C9CFF0); cursor: pointer; }
.tm-switch input { width: 18px; height: 18px; accent-color: var(--orange, #FF6A13); }
.tm-tag-label input { text-transform: uppercase; letter-spacing: .2em; max-width: 120px; }

/* invite box: registered-player suggestions */
.tm-ac-wrap { position: relative; }
.tm-ac { position: absolute; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; z-index: 30;
    background: #15182B; border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px; box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
    max-height: 280px; overflow-y: auto; overscroll-behavior: contain; text-transform: none; letter-spacing: 0; }
.tm-ac li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 4px;
    font: 600 14px/1.2 var(--f-body, sans-serif); color: var(--fg-0, #fff); cursor: pointer; touch-action: manipulation; }
.tm-ac li small { font-size: 12px; font-weight: 500; color: var(--fg-2, #8E97C9); }
.tm-ac li.on, .tm-ac li:hover { background: rgba(255, 106, 19, .16); }
.tm-ac li.is-busy { opacity: .5; cursor: not-allowed; }
.tm-ac li.is-busy:hover { background: none; }
.tm-ac li.tm-ac-none { color: var(--fg-2, #8E97C9); cursor: default; font-weight: 500; }
.tm-ac li.tm-ac-none:hover { background: none; }
.tm-ac li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* name / tag already used by another team (live check) */
#tm-create input[aria-invalid] { border-color: #FF7A85 !important; box-shadow: 0 0 0 1px #FF7A85; }
#avail-msg:empty { display: none; }

/* team record + ranking (team matches) */
.tm-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.tm-stats div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 4px; background: rgba(255, 255, 255, .04); }
.tm-stats b { font: 800 22px/1 var(--f-display, sans-serif); color: var(--fg-0, #fff); font-variant-numeric: tabular-nums; }
.tm-stats span { font: 700 10px/1 var(--f-body, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2, #8E97C9); }
@media (max-width: 600px) { .tm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tm-rank-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tm-rank-table { width: 100%; border-collapse: collapse; font: 600 14px/1.3 var(--f-body, sans-serif); color: var(--fg-1, #C9CFF0); font-variant-numeric: tabular-nums; }
.tm-rank-table th { padding: 8px 10px; text-align: right; font: 700 10px/1 var(--f-body, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2, #8E97C9); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.tm-rank-table td { padding: 10px; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, .06); white-space: nowrap; }
.tm-rank-table th:nth-child(-n+2), .tm-rank-table td:nth-child(-n+2) { text-align: left; }
.tm-rank-table td.tm-rank-team { color: var(--fg-0, #fff); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tm-rank-table td.tm-rank-w { color: var(--fg-0, #fff); font-weight: 800; }
.tm-rank-table tr.is-mine td { background: rgba(255, 106, 19, .1); }
.tm-rank[hidden] { display: none; }
.tm-rank-table th:first-child, .tm-rank-table td:first-child { width: 36px; }
.tm-rank-table th:nth-child(2), .tm-rank-table td:nth-child(2) { width: 40%; }
