/* Tournament demo extras. Everything else comes from /zoodletourney/style.css. */

/* The small "this is a demo" strip, where the real page has its account chip. */
.tourney-demo .demo-banner {
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  row-gap: 4px;
  font: 600 12.5px/1.25 Arial, Helvetica, sans-serif;
}

.demo-banner-text {
  margin: 0;
  color: #e8e4ff;
}

.demo-banner-text strong {
  color: #ffd84a;
}

.demo-banner-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-link {
  border: 0;
  padding: 0;
  background: none;
  color: #e8e4ff;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.demo-pro-button {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 12px;
  background: #ffd84a;
  color: #2a1a00;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.demo-link:hover,
.demo-link:focus-visible {
  color: #ffffff;
}

.demo-pro-button:hover,
.demo-pro-button:focus-visible {
  background: #ffe680;
}

/* The banner may wrap on narrow screens, so the projector takes whatever
   height is left instead of the real page's fixed 100vh - 46px. */
.tourney-demo .page-shell {
  display: flex;
  flex-direction: column;
}

.tourney-demo .page-shell > .demo-banner {
  flex: 0 0 auto;
}

@media (min-width: 901px) {
  .tourney-demo .classroom-display-view {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
  }
}

/* What is happening: in the header, where the real page has its Back / Exit links. */
#classroomDisplayView .classroom-notice {
  position: static;
  max-width: min(400px, 30vw);
  margin: 0;
  padding: 6px 11px;
  font-size: 0.86rem;
  line-height: 1.25;
  box-shadow: none;
  border: 2px solid #2fae79;
}

#classroomDisplayView .classroom-navigation-buttons {
  flex-wrap: nowrap;
  align-items: center;
  column-gap: 14px;
}

#classroomDisplayView #demoRestartButton {
  min-height: 0;
  font-size: 0.85rem;
  white-space: nowrap;
}

#classroomDisplayView .classroom-notice:not(.hidden) + .demo-watch-tag {
  display: none;
}

.demo-watch-tag {
  border: 2px solid #5f427c;
  border-radius: 999px;
  padding: 4px 12px;
  color: #5f427c;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* "The teacher presses Start Tournament." */
.classroom-start-button.demo-pressing {
  animation: demo-press 1.5s ease-in-out 1 both;
}

@keyframes demo-press {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 216, 74, 0); }
  35% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(255, 216, 74, 0.95); }
  60% { transform: scale(0.94); box-shadow: 0 0 0 4px rgba(255, 216, 74, 0.95); filter: brightness(0.85); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 216, 74, 0); }
}

.demo-watch-again {
  flex: 0 0 auto;
  border: 2px solid #176649;
  border-radius: 999px;
  padding: 8px 20px;
  background: #19875d;
  color: #ffffff;
  font: 900 1rem/1 Arial, Helvetica, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  animation: demo-again-in 0.5s ease-out 1 both;
}

@keyframes demo-again-in {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.demo-watch-again.hidden {
  display: none;
}

.demo-watch-again:hover,
.demo-watch-again:focus-visible {
  background: #1fa06f;
}

/* Nobody manages pretend players. */
.tourney-demo .classroom-player-name {
  cursor: default;
}

@media (max-width: 900px) {
  .tourney-demo .demo-banner {
    padding-top: 6px;
  }

  /* Phones: the big TOURNAMENT COMPLETE! title can poke out a couple of pixels. */
  body.tourney-demo .page-shell {
    overflow-x: clip;
  }
}
