/* A customer organisation's Hub pages: its own teams and matches, the owner view's bar */

/* a team without a crest: its short name on its own colour (the colour comes inline, after every tile background) */
.crest.crest-code { container-type: inline-size; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.crest.crest-code b {
  display: block;
  max-width: 100%;
  font-size: min(36cqi, calc(100cqi / (var(--n, 3) * 0.66 + 0.6)));
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.mline.g .crest.crest-code.sm { padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }

/* the first steps: no teams, no matches yet */
.club-empty { display: grid; justify-items: center; gap: 12px; padding: 36px 16px; text-align: center; }
.club-empty p { margin: 0; font-size: 14px; color: var(--ink-2); }
.club-empty p.muted { font-size: 13px; color: var(--ink-3); }
.club-empty .pill.primary { padding: 10px 18px; font-size: 13px; }
.club-dash .club-start, .club-dash .club-teams { grid-column: 1 / -1; }

/* the Matches page's tools: the filter chips, and Add match on the right */
.club-mtools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* Edit team, Edit match and Remove under the names */
.club-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.match-hero .club-acts { justify-content: center; }
.team-hero .club-acts .pill, .match-hero .club-acts .pill { background: var(--tile); }
.team-hero .club-acts .pill:hover, .match-hero .club-acts .pill:hover { background: var(--tile-hover); }

/* the add and edit forms (the sign-in dialog's look) */
.club-dialog { width: min(480px, calc(100vw - 32px)); }
.club-form label small, .club-score legend small { font-weight: 500; color: var(--ink-3); }
.club-form select.searchbox { width: 100%; max-width: none; padding: 9px 10px; font-size: 14px; }
.club-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.club-color { width: 100%; height: 40px; padding: 3px; border: 1px solid var(--chip-line, var(--line)); border-radius: 999px; background: var(--card); cursor: pointer; }
.club-color::-webkit-color-swatch-wrapper { padding: 0; }
.club-color::-webkit-color-swatch { border: 0; border-radius: 999px; }
.club-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; }
.club-score legend { grid-column: 1 / -1; margin-bottom: 6px; padding: 0; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.club-score span { color: var(--ink-3); font-weight: 700; }
.club-score .searchbox { text-align: center; }

/* the owner view: whose Hub this is, view only, and the way back */
.viewbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 14px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--on-ink, #fff);
  font-size: 13px;
}
.viewbar-only { padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--on-ink, #fff) 16%, transparent); font-size: 11px; font-weight: 700; }
.viewbar-back { margin-left: auto; padding: 7px 13px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-size: 12px; font-weight: 700; transition: transform 0.1s ease; }
.viewbar-back:active { transform: scale(0.97); }

@media screen and (max-width: 760px) {
  .club-pair { grid-template-columns: minmax(0, 1fr); }
  .viewbar { margin: 0 0 12px; }
  .viewbar-back { margin-left: 0; }
}

/* Remove, in the form that asks first */
.club-form .pill.danger-fill { background: var(--red); color: #fff; }
