@import url("../../root/root.css");

#winner-btn {
  position: fixed;
  width: 4.5rem;
  height: 4.5rem;
  bottom: 5rem;
  right: 1.3rem;
  font-size: 2rem;
  background-color: var(--duck-charcoal);
  color: var(--duck-white);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 1.2rem;
  cursor: pointer;
  z-index: 9999;
}

#winner-btn:hover {
background-color: var(--duck-pink);
color: var(--duck-white);
}

#call-winner-modal {
  font-family: var(--font-main);
  font-weight: bold;
  font-size: 2.6rem;
  display: none;
  /* FORCE OPEN */
  /* display: block; */
  /* ---------------------- */
  position: fixed;
  z-index: 9998;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--duck-white);
  padding: 3rem 4rem;
  border-radius: 1.8rem;
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.3);
  text-align: center;
}

#yes-btn,
#no-btn {
  font-family: var(--font-main);
  color: var(--duck-charcoal);
  width: var(--width-button);
  padding: 1rem;
  font-size: 1.6rem;
  background-color: var(--duck-charcoal);
  color: var(--text-white);
  border: none;
  border-radius: 1.2rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

#yes-btn:hover,
#no-btn:hover {
  background-color: var(--duck-pink);
}

#winner-modal {
  font-family: var(--font-main);
  font-weight: bold;
  font-size: 2rem;
  display: none;
  position: fixed;
  z-index: 9998;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--duck-white);
  color: var(--duck-charcoal);
  padding: 3rem 4rem;
  border-radius: 1.8rem;
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.3);
  text-align: center;
  opacity: 0; 
}

#close-winner-btn {
  font-family: var(--font-main);
  background-color: var(--duck-white);
  color: var(--duck-charcoal);
  width: var(--width-button);
  padding: 1rem;
  font-size: 1.6rem;
  border: 2px solid var(--duck-charcoal);
  border-radius: 1.2rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

#winner-modal.show {
  display: block;
  animation: winner-pop 0.8s ease-out forwards;
}

/* WINNER TEAM COLOURED GLOW EFFECTS */
/* ------------------------------------------------------------------------ */
#winner-modal.winner-red {
  background-color: var(--team-red);
  box-shadow: 0 0 3rem var(--team-red), 0 0 1rem var(--team-red);
  color: var(--duck-white);
}

#winner-modal.winner-blue {
  background-color: var(--team-blue);
  box-shadow: 0 0 3rem var(--team-blue), 0 0 1rem var(--team-blue);
  color: var(--duck-white);
}

#winner-modal.winner-draw {
  background-color: var(--duck-white);
  color: var(--duck-charcoal);
  box-shadow: 0 0 2rem rgba(0, 0, 0, 0.2);
}

#call-winner-modal button,
#winner-modal button {
  margin: 1rem;
  padding: 1rem 2rem;
  font-size: 1.8rem;
}

#winner-modal {
  animation: winner-pop 0.8s ease-out forwards;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
}

#winner-modal.show {
  display: block;
  animation: winner-pop 0.8s ease-out forwards;
}

@keyframes winner-pop {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.confetti {
  position: fixed;
  top: 0;
  pointer-events: none;
  background: hsl(var(--hue), 70%, 60%);
  animation: confetti-fall 4s ease-out forwards;
  z-index: 9999;
  opacity: 0.9;
  transform: rotate(0deg);
}

.confetti-circle {
  border-radius: 50%;
}

.confetti-triangle {
  width: 0;
  height: 0;
  border-left: 0.6rem solid transparent;
  border-right: 0.6rem solid transparent;
  border-bottom: 1.2rem solid hsl(var(--hue), 70%, 60%);
  background: none !important;
}

@keyframes confetti-fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(20vw - 10vw * random()), 100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes confetti-fall {
  to {
    transform: translate(var(--drift), 100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(45deg);
  background: inherit;
}
@keyframes confetti-fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* TABLET SIZE 480 -1023 */
/* ---------------------------------------------------------------------------- */
@media (min-width: 480px) and (max-width: 1023px) {
  #winner-btn {

    display: none !important;
  }

  
  #call-winner-modal {
    max-width: 32rem; 
    font-size: 2rem; 
  }

  #yes-btn,
  #no-btn {
    width: 10rem;
  }

  #close-winner-btn {
    font-size: 2rem;
    padding: 0.8rem 0.8rem;
    margin-top: 1.6rem;
  }

  #winner-modal {
    width: 32rem;
    font-size: 1.6rem; 
  }

}

/* MOBILE SIZE 479 */
/* ---------------------------------------------------------------------------- */
@media (max-width: 479px) {
  #winner-btn {
    bottom: 4rem;
    right: 1rem;
    font-size: 2rem;
    border-radius: 0.8rem;
    display: none !important;
  }

  #call-winner-modal {
    max-width: 28rem; 
    padding: 2rem 2.4rem; 
    font-size: 1.8rem; 
    border-radius: 1rem;
    box-sizing: border-box;
  }

  #yes-btn,
  #no-btn {
    width: 10rem;
    font-size: 1.4rem;
    padding: 0.4rem 0.4rem;
    margin: 0.4rem 0;
  }

  #close-winner-btn {
    width: 10rem !important;
    font-size: 1rem !important;
    padding: 0.8rem 0.8rem;
    margin-top: 1.2rem;
  }

  #winner-modal {
    width: 20rem;
    padding: 0.4rem 0.4rem;
    font-size: 1.6rem; 
    border-radius: 1rem;
    box-sizing: border-box;
  }
}
