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

.score-container {
  font-family: var(--font-main);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 50%;
  margin: 0 auto;
  font-size: 2rem;
  padding: 0.6rem 4rem;
  background: var(--duck-white);
  border-radius: 1.8rem;
  box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.1);
}

#red-team-box,
#blue-team-box {
  display: flex;
  align-items: center;  
  gap: 0.4rem;   
}

#red-team,
#blue-team {
  font-family: var(--font-main);
  font-size: var(--size-score);
  font-weight: bold;
  text-transform: uppercase;
}

#red-team {
  color: var(--team-red);
}

#blue-team {
  color: var(--team-blue);
}

.team-label {
  font-weight: bold;
  text-transform: uppercase;
}

.score-label {
  margin-left: 0.6rem;
  font-weight: normal;
  color: var(--duck-charcoal);
}

.score-value {
  margin-left: 0.6rem;
  font-weight: bold;
  font-size: 3.5rem;
  color: var(--duck-charcoal);
}

.team-bounce-letter {
  display: inline-block;
  animation: team-bounce 0.5s ease-in-out forwards;
  animation-delay: var(--delay);
}

@keyframes team-bounce {
  0% {
    transform: translateY(4px);
  }
  50% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

.red-border {
  border: 2px solid red;
  box-shadow: 0 0 0.5rem rgba(255, 0, 0, 0.4);
}

.blue-border {
  border: 2px solid #4ea8de;
  box-shadow: 0 0 0.5rem rgba(78, 168, 222, 0.4);
}

@keyframes flash-red-border {
  0% {
    box-shadow: 0 0 0px red;
  }
  50% {
    box-shadow: 0 0 12px 4px red;
  }
  100% {
    box-shadow: 0 0 0px red;
  }
}

@keyframes flash-blue-border {
  0% {
    box-shadow: 0 0 0px #4ea8de;
  }
  50% {
    box-shadow: 0 0 12px 4px #4ea8de;
  }
  100% {
    box-shadow: 0 0 0px #4ea8de;
  }
}

.flash-red {
  animation: flash-red-border 0.6s ease-in-out;
}

.flash-blue {
  animation: flash-blue-border 0.6s ease-in-out;
}

/* TEAM INDICATOR COLOURED BAR  */
/* --------------------------------------------------------------- */
.score-container::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6rem;
  right: -6rem;
  height: 1rem;
  transform: translateY(-50%);
  border-radius: 1.2rem;
  background: transparent;
  z-index: -1;
  pointer-events: none;
  transition: background 0.3s ease, opacity 0.6s ease;
}

.red-border::before {
  background: rgba(255, 89, 94, 1);
}

.blue-border::before {
  background: rgba(77, 163, 255, 1);
}

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

  .score-container {
    width: 80%;
    font-size: 2rem;
    padding: 0.8rem 1.8rem;
  }

  .score-value {
  margin-left: 0.2rem;
  font-size: 3rem;
}

  #red-team,
  #blue-team {
    font-size: 2rem;
  }
}

/* MOBILE SIZE 479 */
/* ---------------------------------------------------------------------------- */
@media (max-width: 479px) {
  .score-container {
    width: 80%;
    font-size: 1.2rem;
    padding: 1rem 1.8rem;
  }

  .score-value {
  margin-left: 0.2rem;
  font-size: 1.5rem;
}

  #red-team,
  #blue-team {
    font-size: 1.2rem;
  }

  .score-container::before {
    left: -2.5rem;
    right: -2.5rem;
  }

  
}
