/* Volleyball Kids, on top of the arena and Soccer Kids styles: the serving dot on the scoreboard,
   the court picker, the HIT button, and the credit line that stays on screen while you play. */

/* ---- Scoreboard: a ball beside the team that's serving ---------------------------------- */
.serve-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #f6c12f;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 160ms ease, transform 200ms cubic-bezier(0.3, 1.6, 0.5, 1);
}
.serve-dot.on {
  opacity: 1;
  transform: scale(1);
}
.volley .clock {
  min-width: 7.5em;
  text-align: center;
}

/* ---- Title card ---------------------------------------------------------------------------- */
.volley .court-seg {
  margin: 2px auto 8px;
}
.volley .court-seg button {
  padding: 6px 18px;
  font-size: 17px;
}
.volley .court-seg small {
  font: 600 12px/1 var(--mono);
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.75;
}
.volley .kids-row canvas {
  width: 52px;
  height: 52px;
}
/* Two options to a row on anything wider than a phone, so the card stays short. */
.volley .opts .seg[data-key='controls'],
.volley .opts .seg[data-key='camera'] {
  grid-column: auto;
}
@media (min-width: 600px) {
  .volley .opts {
    grid-template-columns: auto auto;
    justify-content: center;
  }
}
@media (max-height: 560px) and (orientation: landscape) {
  .volley .kids-row canvas {
    width: 42px;
    height: 42px;
  }
  .volley .court-seg {
    margin: 0 auto 6px;
  }
}

/* The online buttons share one line under Let's play!, and the card is a little tighter round them,
   so this taller card still ends, credit and all, on the screen (a laptop at 800 high, a phone). */
.volley .panel.title .go {
  margin-top: 10px;
}
.volley .panel.title .how {
  margin-top: 6px;
  line-height: 1.5;
}
.volley .panel.title .tag {
  margin-bottom: 8px;
}
.volley .panel.title .teams {
  margin: 4px 0 10px;
}
.volley .online-row {
  flex-wrap: nowrap;
  gap: 0 8px;
}
.volley .online-btn {
  margin: 0 0 2px;
  padding: 6px 12px;
  font-size: 15px;
  white-space: nowrap;
}

/* ---- Touch: one HIT button where the right thumb rests ------------------------------------ */
/* A moment after a game starts it fades to see-through, so the court shows through it; pressed,
   it comes back solid, so its power ring stays easy to read. */
.volley .touch .act {
  animation: see-through 700ms ease 1.4s both;
  transition: opacity 120ms ease;
}
.volley .touch .act.down {
  animation: none;
  opacity: 0.92;
}
@keyframes see-through {
  from { opacity: 1; }
  to { opacity: 0.45; }
}
.volley .act.hit {
  right: calc(22px + var(--safe-r));
  bottom: calc(30px + var(--safe-b));
  width: 96px;
  height: 96px;
  font-size: 20px;
  background: conic-gradient(var(--yellow) calc(var(--charge) * 360deg), var(--red) 0);
}
.volley .act.hit span {
  width: 72px;
  height: 72px;
  background: var(--red);
}
.touch[data-controls='auto'] .stick,
.touch[data-controls='auto'] .stick-hint,
.touch[data-controls='assist'] .stick,
.touch[data-controls='assist'] .stick-hint {
  display: none;
}
@media (max-height: 500px) and (orientation: landscape) {
  .volley .act.hit {
    width: 82px;
    height: 82px;
    font-size: 18px;
    right: calc(16px + var(--safe-r));
    bottom: calc(22px + var(--safe-b));
  }
  .volley .act.hit span {
    width: 60px;
    height: 60px;
  }
}

/* ---- The credit line, along the bottom while you play -------------------------------------- */
.credit {
  position: absolute;
  left: 50%;
  bottom: calc(4px + var(--safe-b));
  z-index: 5;
  margin: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(26, 20, 18, 0.5);
  font: 600 11px/1.4 var(--mono);
  color: #fffaf0;
}
.credit a {
  color: inherit;
  text-underline-offset: 2px;
}
body[data-state='title'] .credit {
  display: none;
}
.foot .made a {
  color: inherit;
}

/* The title card's footer (sound, privacy, credit) sits under the card instead of over it, so a
   tall card on a phone never covers it. */
.volley .panel.title {
  align-content: center;
}
.volley .panel.title .foot {
  position: static;
  margin-top: 14px;
}
