/* Soccer Cup: the matches use Goal Kick's pitch (css/games/soccer.css, the game is `.game.soccer.cup`);
   these are the team and cup screens, the scoreboard, you in goal, and the trophy. */

/* ---------- making your team, and the cup ---------- */
.game.cup-menu { background: repeating-linear-gradient(180deg, #4cbf5f 0 56px, #43b056 56px 112px); }
.cup-menu .cup-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 16px 22px; }
.cup-menu .cup-body > * { flex: none; }
.cup-menu .cup-h { margin: 0; font-size: 34px; color: #fff; text-shadow: 0 3px 0 var(--ink); }
.cup-menu h3 { margin: 4px 0 0; font-size: 20px; color: #fff; text-shadow: 0 2px 0 var(--ink); }
.cup-badge { width: 40px; height: 45px; flex: none; overflow: visible; }
.cup-badge.big { width: 92px; height: 103px; }

.cup-preview { display: flex; align-items: center; gap: 16px; background: #fff; border: 4px solid var(--ink); border-radius: 22px; padding: 8px 22px; box-shadow: var(--shadow); }
.cup-preview .cup-me .avatar-svg { width: 84px; height: 135px; display: block; }
.cup-preview b { font-size: 26px; color: var(--ink); max-width: 260px; line-height: 1.1; }
.cup-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; }
.cup-mascot { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 88px; padding: 6px 4px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 rgba(58, 42, 74, .25); font: inherit; font-size: 15px; font-weight: 800; color: var(--ink); cursor: pointer; }
.cup-mascot .critter-svg { width: 56px; height: 56px; }
.cup-mascot.on, .cup-color.on { box-shadow: 0 0 0 5px var(--sun), 0 4px 0 rgba(58, 42, 74, .25); transform: translateY(-3px); }
.cup-color { width: 50px; height: 50px; border-radius: 50%; border: 4px solid var(--ink); background: var(--cc); cursor: pointer; box-shadow: 0 4px 0 rgba(58, 42, 74, .25); }

.cup-head { display: flex; align-items: center; gap: 18px; }
.cup-head p { margin: 2px 0 6px; color: #fff; font-weight: 800; font-size: 18px; text-shadow: 0 2px 0 var(--ink); }
.cup-us { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 16px 2px 6px; font-size: 18px; color: var(--ink); }
.cup-trophy { width: calc(70px * var(--grow, 1)); height: calc(82px * var(--grow, 1) * var(--tall, 1)); flex: none; overflow: visible; }
.cup-trophy.big { width: calc(110px * var(--big, 1)); height: calc(128px * var(--big, 1) * var(--tall, 1)); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .2)); }

.cup-ladder { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cup-arrow { font-style: normal; color: #fff; font-size: 26px; text-shadow: 0 2px 0 var(--ink); }
.cup-match { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 168px; padding: 8px 8px 10px; background: #fff; border: 4px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow); text-align: center; }
.cup-match small { font-size: 15px; font-weight: 800; color: var(--grape); text-transform: uppercase; letter-spacing: 1px; }
.cup-match .cup-badge { width: 56px; height: 63px; }
.cup-match b { font-size: 18px; line-height: 1.1; color: var(--ink); }
.cup-match span { font-size: 15px; font-weight: 800; color: var(--ink-soft); }
.cup-match.now { background: #fff8d6; box-shadow: 0 0 0 5px var(--sun), var(--shadow); transform: scale(1.05); }
.cup-match.now span { color: var(--coral-dark); }
.cup-match.won { background: #e8fbe9; }
.cup-match.later { opacity: .75; }
.cup-play { font-size: 26px; padding: 10px 34px; }

.cup-shelf { width: min(760px, 100%); background: linear-gradient(#b98a5a, #9b6d42); border: 4px solid var(--ink); border-radius: 18px; padding: 6px 14px 4px; box-shadow: var(--shadow); text-align: center; }
.cup-shelf h3 { margin: 0 0 4px; }
.cup-trophies { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; min-height: 70px; align-items: flex-end; padding-bottom: 6px; border-bottom: 10px solid #7d5230; border-radius: 0 0 6px 6px; }
.cup-trophies + .cup-trophies { margin-top: 10px; }
.cup-won { display: flex; flex-direction: column; align-items: center; }
.cup-won small { color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 2px 0 var(--ink); }
/* a trophy still to win is just its shadow */
.cup-won.todo .cup-trophy { filter: brightness(0); opacity: .22; }
.cup-won.todo small { opacity: .7; }
.cup-none { margin: 10px 0; color: #fff; font-weight: 800; font-size: 17px; text-shadow: 0 2px 0 var(--ink); }

/* ---------- in a match ---------- */
.cup .cup-hud { flex: none; }
.cup .cup-score { display: flex; align-items: center; gap: 8px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 10px; box-shadow: 0 3px 0 rgba(58, 42, 74, .25); }
.cup .cup-score b { font-size: 26px; color: var(--ink); min-width: 62px; text-align: center; white-space: nowrap; }
.cup .cup-score .cup-badge { width: 32px; height: 36px; }
.cup .cup-hud .cup-dots { display: flex; gap: 4px; padding: 0; border: 0; background: none; box-shadow: none; }
.cup .cup-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--ink); background: #e8e2f0; }
.cup .cup-dots i.in { background: #3ccf7a; }
.cup .cup-dots i.out { background: #ff5a5f; }

/* you in goal */
.cup .goalie.me { width: 80px; }
.cup .keeper { position: relative; animation: soc-bob .9s ease-in-out infinite; transition: transform .2s; transform-origin: bottom center; }
.cup .keeper .avatar-svg { display: block; width: 100%; height: auto; }
.cup .glove { position: absolute; top: 57%; width: 26%; aspect-ratio: 1; border-radius: 50%; background: #ffd23f; border: 4px solid var(--ink); }
.cup .glove.l { left: 13%; }
.cup .glove.r { right: 13%; }
.cup .goalie.dive .keeper { animation: none; }
.cup .goalie.dive.left .keeper { transform: rotate(-38deg) translateY(-12px); }
.cup .goalie.dive.right .keeper { transform: rotate(38deg) translateY(-12px); }
.cup .goalie.dive.up .keeper { transform: translateY(-26px); }
.cup .goalie.catch .keeper { animation: soc-catch .5s ease-out; }
/* them, taking their kick */
.cup .kicker.them .critter-svg { display: block; width: 110px; height: 110px; }

.cup .cup-turn {
  position: absolute; right: 12px; bottom: 12px; z-index: 6; max-width: 46%; opacity: 0; transition: opacity .25s; pointer-events: none;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; padding: 4px 14px; font-weight: 800; font-size: 19px; line-height: 1.2; box-shadow: var(--shadow);
}
.cup .cup-turn.show { opacity: 1; }
.cup .banner.tie { font-size: 64px; }

/* who's playing, and the trophy at the end */
.cup .cup-intro {
  position: absolute; left: 50%; top: 50%; z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: min(460px, 90%);
  background: #fff; border: 5px solid var(--ink); border-radius: 26px; padding: 12px 26px 16px; box-shadow: var(--shadow); text-align: center;
  opacity: 0; transform: translate(-50%, -50%) scale(.5); transition: opacity .3s, transform .4s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none;
}
.cup .cup-intro.show { opacity: 1; transform: translate(-50%, -50%); }
.cup .cup-intro small { font-size: 22px; font-weight: 800; color: var(--grape); text-transform: uppercase; letter-spacing: 2px; }
.cup .cup-intro .cup-vs { display: flex; align-items: center; gap: 18px; }
.cup .cup-intro .cup-vs .cup-badge { width: 92px; height: 103px; }
.cup .cup-intro .cup-vs b { font-size: 34px; color: var(--coral-dark); }
.cup .cup-intro p { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); }
.cup .cup-intro p i { font-style: normal; color: var(--ink-soft); }
.cup .cup-intro em { font-style: normal; font-size: 18px; font-weight: 800; color: var(--coral-dark); }
.cup .cup-intro.gold { background: #fff8d6; box-shadow: 0 0 0 8px var(--sun), var(--shadow); }
.cup .cup-trophy.rise { width: calc(150px * var(--big, 1)); height: calc(175px * var(--big, 1) * var(--tall, 1)); animation: cup-rise 1.2s cubic-bezier(.2, 1.4, .4, 1); }
/* winning every cup: all of them at once */
.cup .cup-parade { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 6px; max-width: min(720px, 86vw); }
.cup .cup-parade .cup-trophy { width: calc(40px * var(--grow, 1)); height: calc(47px * var(--grow, 1) * var(--tall, 1)); animation: cup-pop .5s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.cup .cup-parade i { flex-basis: 100%; height: 0; } /* the big ones get a row of their own */
@keyframes cup-pop { from { transform: translateY(40px) scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cup-rise { from { transform: translateY(120px) scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* the score on the results card */
.results .cup-final { display: inline-flex; align-items: center; gap: 12px; }
.results .cup-final b { font-size: 30px; }
.results .cup-final .cup-badge { width: 44px; height: 50px; }

@media (max-height: 700px) {
  .cup .goalie.me { width: 56px; }
  .cup .kicker.them .critter-svg { width: 70px; height: 70px; }
  .cup .cup-turn { font-size: 15px; bottom: 6px; right: 6px; }
  .cup .cup-intro .cup-vs .cup-badge { width: 64px; height: 72px; }
  .cup-menu .cup-h { font-size: 28px; }
  .cup-match { width: 150px; }
}
@media (max-width: 1000px) {
  .cup .cup-dots i { width: 10px; height: 10px; border-width: 2px; }
}
/* phone width: just the badges and the score up top, and whose turn it is over the stands */
@media (max-width: 760px) {
  .cup .cup-hud .cup-dots { display: none; }
  .cup .cup-score { gap: 4px; padding: 2px 6px; }
  .cup .cup-score b { font-size: 20px; min-width: 46px; }
  .cup .cup-turn { top: 4px; bottom: auto; left: 6px; right: 6px; max-width: none; text-align: center; font-size: 15px; padding: 2px 8px; }
  .cup-arrow { display: none; }
  .cup .cup-parade .cup-trophy { width: calc(30px * var(--grow, 1)); height: calc(35px * var(--grow, 1) * var(--tall, 1)); }
  .cup-match { width: 130px; }
}
