/* Competition catalog + picker on /sports/. Built by sports-src/inject_sports.py (catalog_page.py).
   Motion follows ui.css: 180ms colour, 220ms icon swap, 320ms bar slide on cubic-bezier(.2,0,0,1). */
:root { --vo-pick-ease: cubic-bezier(0.2, 0, 0, 1); }

/* ---------- Catalog ---------- */
.vo-cat { margin-top: 40px; font-family: var(--font-sans); color: var(--ink, #0b0c0e); }
.vo-cat-search { position: relative; display: flex; align-items: center; }
.vo-cat-search svg { position: absolute; left: 18px; color: var(--ink-subtle, #69736e); pointer-events: none; }
.vo-cat-search input {
  width: 100%; min-height: 56px; padding: 0 18px 0 48px; border: 1px solid var(--border-strong, #7e8a85); border-radius: 14px;
  background: var(--surface-card, #fff); color: var(--ink, #0b0c0e); font: 500 16px/24px var(--font-sans);
  transition: border-color 180ms var(--vo-pick-ease), box-shadow 180ms var(--vo-pick-ease);
}
.vo-cat-search input:focus { outline: none; border-color: var(--mint-ink, #0a7f58); box-shadow: 0 0 0 4px rgb(10 127 88 / .12); }
.vo-cat-count { margin: 14px 0 0; color: var(--ink-muted, #56615c); font: 500 14px/20px var(--font-sans); }
.vo-cat-empty { margin: 24px 0; color: var(--ink-muted, #56615c); font-size: 15px; }

.vo-cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.vo-cat-tab {
  display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border, #e3e8e6);
  border-radius: 9999px; background: var(--surface-card, #fff); color: var(--ink, #0b0c0e); font: 500 14px/18px var(--font-sans);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms var(--vo-pick-ease), background-color 160ms var(--vo-pick-ease), color 160ms var(--vo-pick-ease), opacity 160ms;
}
.vo-cat-tab span { color: var(--ink-subtle, #69736e); font: 500 12px/16px var(--font-mono); transition: color 160ms; }
.vo-cat-tab:hover { border-color: var(--mint-ink, #0a7f58); }
.vo-cat-tab:focus-visible { outline: 2px solid var(--mint-ink, #0a7f58); outline-offset: 2px; }
.vo-cat-tab.is-on { background: var(--surface-inverse, #0b0c0e); border-color: var(--surface-inverse, #0b0c0e); color: #fff; }
.vo-cat-tab.is-on span { color: var(--mint-on-inverse, #83f6c8); }
.vo-cat-tab.is-empty { opacity: 0.4; }
@media (max-width: 720px) {
  .vo-cat-nav { flex-wrap: nowrap; overflow-x: auto; margin-left: -24px; margin-right: -24px; padding: 2px 24px 6px; scrollbar-width: none; }
  .vo-cat-nav::-webkit-scrollbar { display: none; }
}

.vo-sport {
  margin-top: 16px; animation: voSportIn 240ms var(--vo-pick-ease); padding: 24px; border: 1px solid var(--border, #e3e8e6); border-radius: 20px; background: var(--surface-card, #fff);
  box-shadow: var(--shadow-sm, 0 1px 2px rgb(11 12 14 / .05)); scroll-margin-top: 96px;
}
.vo-sport[hidden] { display: none; }
.vo-sport-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.vo-sport-head h2 { margin: 0; font: 700 26px/32px var(--font-sans); letter-spacing: -0.5px; }
.vo-sport-meta { color: var(--mint-ink, #0a7f58); font: 500 13px/18px var(--font-sans); }
.vo-label { margin: 20px 0 10px; color: var(--ink-subtle, #69736e); font: 600 12px/16px var(--font-mono); letter-spacing: 1px; text-transform: uppercase; }
.vo-popular[hidden] { display: none; }

.vo-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; margin-top: 20px; align-items: start; }
.vo-group { border: 1px solid var(--border, #e3e8e6); border-radius: 12px; background: var(--surface-page, #f6f8f7); transition: border-color 160ms var(--vo-pick-ease), background-color 160ms var(--vo-pick-ease); }
.vo-group[hidden] { display: none; }
.vo-group[open] { grid-column: 1 / -1; background: var(--surface-card, #fff); border-color: var(--border-mid, #cfd7d3); }
.vo-group > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px 0 16px;
  list-style: none; cursor: pointer; font: 500 15px/20px var(--font-sans); border-radius: 12px;
}
.vo-group > summary::-webkit-details-marker { display: none; }
.vo-group > summary:hover { background: rgb(11 12 14 / .03); }
.vo-group > summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-left: 4px; border-right: 2px solid var(--ink-subtle, #69736e);
  border-bottom: 2px solid var(--ink-subtle, #69736e); transform: translateY(-2px) rotate(45deg); transition: transform 220ms var(--vo-pick-ease);
}
.vo-group[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.vo-group-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vo-group-n { color: var(--ink-subtle, #69736e); font: 500 12px/16px var(--font-mono); }
.vo-group-chips { padding: 4px 14px 16px; }

/* ---------- Chips ---------- */
.vo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vo-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 44px 0 14px;
  border: 1px solid var(--border-mid, #cfd7d3); border-radius: 10px; background: var(--surface-card, #fff);
  color: var(--ink, #0b0c0e); font: 500 14px/18px var(--font-sans); text-align: left; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color 180ms var(--vo-pick-ease), border-color 180ms var(--vo-pick-ease),
              box-shadow 180ms var(--vo-pick-ease), transform 120ms var(--vo-pick-ease);
}
.vo-chip[hidden] { display: none; }
.vo-chip-sub { color: var(--ink-subtle, #69736e); font-size: 12px; }
/* Icon: a circle with a plus that turns into a check (drawn in CSS, no markup per chip). */
.vo-chip::before {
  content: ""; position: absolute; right: 10px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 9999px;
  background: linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat,
              linear-gradient(currentColor, currentColor) center / 2px 10px no-repeat, var(--surface-sunken, #eef2f0);
  color: var(--ink-muted, #56615c);
  transition: background-color 180ms var(--vo-pick-ease), background-size 220ms var(--vo-pick-ease), color 180ms var(--vo-pick-ease), transform 220ms var(--vo-pick-ease);
}
.vo-chip::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 5px; height: 10px; margin-top: -7px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; opacity: 0; transform: rotate(45deg) scale(0.4);
  transition: opacity 160ms var(--vo-pick-ease), transform 220ms var(--vo-pick-ease);
}
.vo-chip:hover { border-color: var(--mint-ink, #0a7f58); box-shadow: 0 0 0 3px rgb(10 127 88 / .10); }
.vo-chip:hover::before { color: var(--mint-ink, #0a7f58); }
.vo-chip:active { transform: scale(0.97); }
.vo-chip:focus-visible { outline: 2px solid var(--mint-ink, #0a7f58); outline-offset: 2px; }
.vo-chip.is-on { background: var(--mint-tint, #e3fbf2); border-color: var(--mint-ink, #0a7f58); }
.vo-chip.is-on::before { background-color: var(--mint-ink, #0a7f58); background-size: 0 2px, 2px 0, auto; transform: rotate(90deg); }
.vo-chip.is-on::after { opacity: 1; transform: rotate(45deg) scale(1); }
.vo-chip mark { background: rgb(71 250 190 / .35); color: inherit; border-radius: 3px; }

/* ---------- Selection bar ---------- */
.vo-bar {
  position: fixed; left: 50%; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 8px;
  width: min(720px, calc(100% - 32px)); padding: 8px 8px 8px 22px; border-radius: 20px;
  background: var(--surface-inverse, #0b0c0e); color: #fff; box-shadow: 0 24px 48px -16px rgb(11 12 14 / .45);
  font-family: var(--font-sans);
  transform: translate(-50%, calc(100% + 32px)); opacity: 0; visibility: hidden;
  transition: transform 320ms var(--vo-pick-ease), opacity 200ms var(--vo-pick-ease), visibility 0s linear 320ms;
}
.vo-bar.is-open { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 320ms var(--vo-pick-ease), opacity 200ms var(--vo-pick-ease), visibility 0s; }
.vo-bar-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.vo-bar-count { display: inline-block; align-self: flex-start; font: 600 15px/20px var(--font-sans); transform-origin: left center; }
.vo-bar-count.bump { animation: voPickBump 260ms var(--vo-pick-ease); }
@keyframes voSportIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes voPickBump { 40% { transform: scale(1.08); } }
.vo-bar-names { overflow: hidden; color: #b5bdb9; font: 400 13px/18px var(--font-sans); white-space: nowrap; text-overflow: ellipsis; }
.vo-bar-clear {
  flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent;
  color: #b5bdb9; font: 500 14px/20px var(--font-sans); cursor: pointer; transition: background-color 140ms, color 140ms;
}
.vo-bar-clear:hover { background: rgb(255 255 255 / .08); color: #fff; }
.vo-bar-go {
  display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px;
  background: var(--mint, #47fabe); color: #0b0c0e; font: 600 14px/20px var(--font-sans); text-decoration: none;
  transition: transform 150ms var(--vo-pick-ease), box-shadow 150ms var(--vo-pick-ease);
}
.vo-bar-go:hover { color: #0b0c0e; transform: translateY(-1px); box-shadow: 0 10px 30px rgb(71 250 190 / .35); }
.vo-bar :focus-visible { outline: 2px solid var(--mint, #47fabe); outline-offset: 2px; }
html.vo-bar-open body { padding-bottom: 96px; }

@media (max-width: 520px) {
  .vo-sport { padding: 18px; }
  .vo-bar { padding-left: 16px; }
  .vo-bar-clear { padding: 0 10px; }
  .vo-bar-go { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .vo-chip, .vo-chip::before, .vo-chip::after, .vo-bar, .vo-bar.is-open, .vo-bar-go, .vo-group > summary::after { transition: none; }
  .vo-chip:active, .vo-bar-go:hover { transform: none; }
  .vo-bar-count.bump, .vo-sport { animation: none; }
}
