/* Tennis Control deploy styles (on top of assets/app.css). */
/* Compact header, busy/loading indicators, standings on small screens. */

.tc-spinner{display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;animation:tc-spin .7s linear infinite;flex:none}
@keyframes tc-spin{to{transform:rotate(360deg)}}
.tc-loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:220px;color:var(--muted);font-weight:650}
#create-tournament .btn-icon{display:none}
#app.is-busy{cursor:progress}
#app.is-busy::before{content:"";position:fixed;top:0;left:0;right:0;height:3px;z-index:4000;background:linear-gradient(90deg,#c1f061 0%,#2d9569 50%,#c1f061 100%);background-size:200% 100%;animation:tc-bar 1.1s linear infinite}
@keyframes tc-bar{to{background-position:200% 0}}
.header-selects,.header-actions{display:flex;align-items:center;gap:8px;min-width:0}
.header-right{display:flex;align-items:center;gap:8px;flex:1;min-width:0;justify-content:flex-end}
.header-context{min-width:0}

/* Phone: title gives way to a second, full-width row for the two selectors (50/50), so names stay readable.
   A compact section title sits on a third row so the current view is still named. */
@media (max-width:890px){
  .header{min-height:0;flex-wrap:wrap;align-items:center;gap:8px}
  .header-context .subtle{display:none}
  .header-left{flex:0 0 auto}
  .header-right{flex:1 1 auto;flex-wrap:wrap;justify-content:flex-end;gap:6px}
  .header-actions{gap:6px;margin-left:auto}
  .header-selects{flex:1 0 100%;order:3;width:100%;gap:8px}
  .header-selects .tournament-select,.header-selects .org-select{flex:1 1 0;min-width:0;max-width:none;font-size:13px;padding:8px 10px}
  .header-context{flex:1 0 100%;order:4;width:100%;min-width:0}
  .header-context h1{display:block;margin:0;font-size:14px;line-height:1.25;letter-spacing:-.2px;max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #create-tournament{width:36px;min-width:36px;padding:0;font-size:18px;line-height:1}
  #create-tournament .btn-label{display:none}
  #create-tournament .btn-icon{display:inline}
  #sync-indicator{display:none}
}
@media (max-width:480px){
  .header{padding:8px 10px;gap:6px}
  .header-left{gap:6px}
  .header-selects .tournament-select,.header-selects .org-select{font-size:13px;padding:8px 8px}
  .header-context h1{font-size:13px}
}

/* Chaves standings: keep team names on one line (ellipsis + title), allow horizontal scroll if needed.
   Metric columns have a fixed, zoom-safe width; headers use SJ/SG so they do not overlap. */
.standing-groups .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.standing-groups .data-table{table-layout:fixed;width:100%}
.standing-groups .data-table th:first-child,.standing-groups .data-table td.standings-team{width:auto;max-width:0}
.standings-team,.standings-team-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.standings-team-name{display:inline;max-width:100%}
.standing-groups .data-table th:nth-child(2),.standing-groups .data-table td:nth-child(2){width:2.4rem;white-space:nowrap}
.standing-groups .data-table th:nth-child(3),.standing-groups .data-table th:nth-child(4),
.standing-groups .data-table td:nth-child(3),.standing-groups .data-table td:nth-child(4){width:2.8rem;white-space:nowrap;overflow:hidden;text-overflow:clip}
.standing-groups .data-table th{overflow:hidden}
.standings-warning.advance-block,.group-advance-block,.advance-placeholder{white-space:normal;line-height:1.4}
.group-advance-block,.advance-placeholder{margin-top:10px;padding:8px 10px;border-radius:8px;background:#fff0d9;color:#9b6b0c;font-size:11px;font-weight:650}
.advance-placeholder{margin-top:8px}
.standing-groups .data-table th[title]{cursor:help}


/* Club mark on the login panel. Shown when site_config (tc.club_sites) returns a logo for this host. */
.auth-club-brand{
  display:flex;
  justify-content:center;
  margin:0 0 22px;
}
.auth-club-logo{
  display:block;
  width:100%;
  max-width:280px;
  height:auto;
  background:#f7f7f7;
  border-radius:14px;
  padding:10px 16px;
  box-shadow:0 6px 18px rgba(16,26,47,.08);
}
@media (max-width:620px){
  .auth-club-brand{margin:0 0 14px}
  .auth-club-logo{max-width:200px;padding:8px 12px}
}

/* Login left panel follows the club primary color (site_config -> --navy). Same value as app.css by default. */
.auth-left{background:var(--navy)}
