/* teams.css - Enhanced styles for the new team display */

.teamDisplay {
  display: none; /* Hidden by default */
  justify-content: space-around;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4),
    0 4px 16px rgba(245, 87, 108, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.3) inset;
  border: 3px solid rgba(255, 255, 255, 0.4);
  gap: 2.5rem;
  margin: 0;
  padding: 0.5rem 0.5rem 0 0.5rem;
  background: rgba(102, 126, 234, 0.945);
  font-family: "Concert One", Arial, sans-serif;
  height: 15vh;
  min-height: 80px; /* Ensure minimum usable height */
  max-height: 120px; /* Prevent taking too much space */
  z-index: 1000; /* Lower than quiz modal but above other content */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Show team display when game is running */
.teamDisplay.game-active {
  display: flex;
}

.team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 75%;
  width: 10%;

  padding: 0.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 12px rgba(25, 158, 106, 0.1);
  background: rgba(197, 198, 206, 0);
  transition: background 0.2s, box-shadow 0.2s, border 0.2s;
  position: relative;
}

.team-block.active {
  background: #44e41caf;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4),
    0 4px 16px rgba(245, 87, 108, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.3) inset;
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 24px rgba(25, 158, 106, 0.18);
}

.team-name-label {
  font-size: 1.5em;
  color: #333;

  font-weight: bold;
  letter-spacing: 0.5px;
  font-weight: 600;
  text-transform: uppercase;
}

.team-score-label {
  font-size: 3em;
  color: #fffb02;
  font-weight: bold;
  margin-top: 0.1em;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #1b1b1b, 0 2px 2px #0d2219;
}

/* Editable team fields styling */
.team-name-label.editable,
.team-score-label.editable {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 1 6px;
  padding: 2px 6px;
  position: relative;
}

.team-name-label.editable:hover,
.team-score-label.editable:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.team-name-label.editable:hover::after,
.team-score-label.editable:hover::after {
  content: "✏️";
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 0.6em;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.team-name-label.editing,
.team-score-label.editing {
  opacity: 0.5;
}

/* Input styling for editing */
.editing-input {
  animation: fadeIn 0.2s ease;
  box-shadow: 0 0 0 2px #667eea, 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.editing-input:focus {
  box-shadow: 0 0 0 3px #667eea, 0 6px 16px rgba(102, 126, 234, 0.4) !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Game Menu FAB - 3-dots floating action button */
.game-menu-fab {
  position: fixed;
  right: 25px;
  bottom: 35px;
  z-index: 1000;
  width: 40px;
  height: 60px;
  border-radius: 10%;
  background: #ff15157a;
  color: #fff;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  display: none; /* Hidden by default, shown when game is active */
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-menu-fab:hover {
  background: #5a67d8;
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.game-menu-fab.active {
  background: #4aff13a9;
  transform: rotate(90deg);
}

/* Show FAB when game is active */
.teamDisplay.game-active ~ .game-menu-fab,
.game-menu-fab.game-active {
  display: flex;
}

/* Game Menu Dropdown */
.game-menu-dropdown {
  position: fixed;
  right: 22px;
  bottom: 100px;
  z-index: 12001;
  display: none;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.game-menu-dropdown.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.game-menu-item {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 50%;
  padding: 0;
  color: #667eea;
  font-family: "Concert One", Arial, sans-serif;
  font-size: 1.4em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 48px;
  height: 48px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-menu-item:hover {
  background: #667eea;
  color: #fff;
  transform: scale(1.5);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.game-menu-item.home-item:hover {
  background: #22c55e;
  border-color: #22c55e;
}

.game-menu-item.restart-item:hover {
  background: #f59e0b;
  border-color: #f59e0b;
}

.game-menu-item.end-item:hover {
  background: #ef4444;
  border-color: #ef4444;
}
