/* Sportka draw — drum, results row and controls.
   Colours follow styles.scss: ink #3D1D19, wine #722F37, champagne #FBF0E1. */

/* This article shows its subtitle under the title; the listing description
   stays in the listings only. */
#title-block-header .description { display: none; }

.sportka-draw {
  --sd-ink: #3D1D19;
  --sd-wine: #722F37;
  --sd-bg: #FBF0E1;
  --sd-muted: #7A6558;
  --sd-slot: clamp(28px, 9.6vw, 46px);
  --sd-gap: clamp(4px, 1.2vw, 8px);
  max-width: 520px;
  margin: 0.5rem auto 2.75rem;
  padding: 0;
}

.sportka-draw .sd-stage {
  position: relative;            /* flying balls are positioned in here */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sportka-draw .sd-canvas {
  display: block;
  width: min(100%, 420px);
  height: auto;
  aspect-ratio: 1 / 1;           /* reserves space before JS runs: no layout shift */
}

/* ── Results row ─────────────────────────────────────────────── */
.sportka-draw .sd-results {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--sd-gap);
  margin-top: 0.4rem;
}
.sportka-draw .sd-group {
  position: relative;
  padding-bottom: 1.35rem;       /* room for the label, which never widens the row */
}
.sportka-draw ol.sd-row {
  display: flex;
  gap: var(--sd-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}
.sportka-draw .sd-plus {
  display: flex;
  align-items: center;
  height: var(--sd-slot);
  padding: 0 0.1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  color: var(--sd-wine);
}
.sportka-draw .sd-label {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-muted);
  white-space: nowrap;
}

.sportka-draw .sd-slot {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--sd-slot);
  height: var(--sd-slot);
  margin: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(61, 29, 25, 0.28);
  color: #141008;
  font: 700 calc(var(--sd-slot) * 0.42) / 1 Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
}
.sportka-draw .sd-slot.sd-extra { border-color: rgba(114, 47, 55, 0.55); }
.sportka-draw .sd-group-extra .sd-label { left: auto; right: 0; transform: none; color: var(--sd-wine); }

/* A drawn ball — shared by filled slots and the ball in flight. */
.sportka-draw .sd-ball,
.sportka-draw .sd-slot.is-filled {
  border: 0;
  background: radial-gradient(circle at 34% 30%,
    #FFF7C2 0%, #FFE45C 24%, #F7C51A 58%, #D99A00 86%, #A86F00 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 78, 0, 0.35), 0 2px 3px rgba(61, 29, 25, 0.18);
}
.sportka-draw .sd-ball::after,
.sportka-draw .sd-slot.is-filled::after {
  content: "";
  position: absolute;
  left: 16%; top: 12%;
  width: 34%; height: 26%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  transform: rotate(-30deg);
  pointer-events: none;
}
/* The additional number is set apart: a wine ring around the ball. */
.sportka-draw .sd-slot.sd-extra.is-filled,
.sportka-draw .sd-flyer-extra {
  box-shadow: inset 0 0 0 1px rgba(120, 78, 0, 0.35),
              0 0 0 2px var(--sd-bg), 0 0 0 4px var(--sd-wine),
              0 3px 5px rgba(61, 29, 25, 0.2);
}

.sportka-draw .sd-flyer {
  position: absolute;
  left: 0; top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #141008;
  font: 700 calc(var(--sd-slot) * 0.42) / 1 Arial, "Helvetica Neue", Helvetica, sans-serif;
  transform-origin: 50% 50%;
  will-change: transform;
  pointer-events: none;
}

.sportka-draw .sd-results.is-complete .sd-slot { animation: sd-pop 0.45s ease-out; }
@keyframes sd-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ── Controls ────────────────────────────────────────────────── */
.sportka-draw .sd-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.2rem 0 0.6rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(61, 29, 25, 0.15);
}
.sportka-draw .sd-status {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sd-wine);
}
.sportka-draw .sd-toggle {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sd-ink);
  background: transparent;
  border: 1px solid rgba(61, 29, 25, 0.28);
  border-radius: 0;
  padding: 0.45rem 1rem;
  cursor: pointer;
  min-width: 6.5rem;
}
.sportka-draw .sd-toggle:hover,
.sportka-draw .sd-toggle:focus-visible {
  background: var(--sd-wine);
  border-color: var(--sd-wine);
  color: var(--sd-bg);
}
.sportka-draw .sd-toggle:focus-visible { outline: 2px solid var(--sd-ink); outline-offset: 2px; }

.sportka-draw figcaption { margin-top: 0.2rem; }

.sportka-draw .sd-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .sportka-draw .sd-results.is-complete .sd-slot { animation: none; }
}
