/* The cup winner pick (js/predictions/cup-winner-form.js, GLOSSARY.md § Cup
   winner pick). Sixteen glass cells would be a wall, so the teams are rows,
   as the site's lists are: parted by hairlines, the club in Marcellus with its
   form in a line under it, the odds a figure at the row's end. Choosing a row
   opens the pick form's own stake under it (css/shared/pick-form.css). */

.winner {
  margin: 0;
}

.winner__cup {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
}

.winner + .winner,
.winner-cups > * + * {
  margin-top: var(--space-12);
}

.winner__lede,
.winner__note {
  margin: 0 0 var(--space-4);
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-wrap: pretty;
}

.winner__note {
  margin-top: calc(var(--space-2) * -1);
}

.winner .winner__placed {
  margin: 0 0 var(--space-3);
  max-width: 52ch;
  font-size: var(--text-base);
  color: var(--text-primary);
  text-wrap: pretty;
}

.winner .winner__placed .t-figure {
  font-size: var(--text-lg);
}

.winner__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-2);
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.winner__line-cup {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.winner__toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}

.winner__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.winner__board[hidden] {
  display: none;
}

.winner__teams {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-strong);
}

.winner__team {
  border-bottom: 1px solid var(--border);
}

.winner__pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 56px;
  padding: var(--space-3) var(--space-3);
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease-out), color var(--duration) var(--ease-out);
}

.has-crests .winner__pick {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.winner__pick:hover:not(:disabled) {
  background: var(--led-10);
}

.winner__pick:hover:not(:disabled) .winner__name {
  color: var(--accent-hover);
}

/* The chosen team, and a placed one, have the floodlight across them from
   the left, as a chosen pick cell has it through its glass, and their odds
   take the light. */
.winner__pick[aria-pressed="true"] {
  background: linear-gradient(90deg, rgba(47, 91, 255, 0.3) 0%, rgba(47, 91, 255, 0.1) 55%, rgba(47, 91, 255, 0.04) 100%);
}

.winner__pick[aria-pressed="true"] .winner__odds .t-figure {
  color: var(--led-bright);
}

/* The player's own pick, marked as a placed pick cell marks it. */
.winner__mine {
  margin-top: 2px;
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--led-pale);
}

.winner__pick:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.winner__pick:disabled {
  cursor: default;
}

.winner__pick:disabled:not([aria-pressed="true"]) .winner__name,
.winner__pick:disabled:not([aria-pressed="true"]) .winner__odds .t-figure {
  color: var(--text-secondary);
}

.winner__crest {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.winner__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.winner__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.25;
  overflow-wrap: anywhere;
  transition: color var(--duration) var(--ease-out);
}

.winner__form {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.winner__odds {
  color: rgb(var(--led-pale-rgb) / 0.7);
  font-size: var(--text-xs);
  white-space: nowrap;
  text-align: right;
}

.winner__odds .t-figure {
  margin-right: 0.2em;
  color: var(--text-primary);
  font-size: var(--text-lg);
}

.winner__team.is-out .winner__odds {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* The stake sits under the chosen row, indented to the club's name, and
   its line runs under the button however wide the row. */
.winner__stake {
  padding: var(--space-2) var(--space-3) var(--space-5);
  margin-top: 0;
  border-bottom: 1px solid var(--border);
}

.has-crests .winner__stake {
  padding-left: calc(28px + var(--space-4) + var(--space-3));
}

.winner__stake .pick__return {
  max-width: none;
}

.winner__stake .pick__return p {
  max-width: 52ch;
}

.winner__status {
  margin-top: var(--space-3);
}

@media (max-width: 575.98px) {
  .winner__pick {
    gap: var(--space-3);
    padding-inline: var(--space-2);
  }

  .winner__stake {
    padding-left: var(--space-2);
  }
}

/* ── The home desk's short version ─────────────────────────────────────── */
.winner-teaser__head {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.25;
  color: var(--text-primary);
}

.winner-teaser__teams {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

.winner-teaser__team {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.winner-teaser__team .winner__name {
  font-size: var(--text-base);
}

.winner-teaser__door {
  margin: 0;
  font-size: var(--text-sm);
}

.winner-teaser .winner__placed {
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}
