/* Styles for strength training features */

/* Flash messages */
.flash-message {
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  max-width: 90%;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.flash-message.alert {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Filter indicators */
.filter-indicators {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-indicator {
  display: flex;
  justify-content: center;
}

.filter-badge {
  display: flex;
  align-items: center;
  background-color: #f0f9ff; /* Light blue background */
  border: 1px solid #bae6fd; /* Lighter blue border */
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-label {
  font-weight: 600;
  color: #0369a1; /* Darker blue text */
  margin-right: 0.5rem;
}

.filter-value {
  color: #0284c7; /* Blue text */
  font-weight: 500;
}

.filter-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.75rem;
  color: #0369a1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.filter-clear:hover {
  opacity: 1;
}

.filter-clear svg {
  width: 16px;
  height: 16px;
}

/* Next button container */
.next-button-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem;
}

/* Next button styling */
.next-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #4f46e5; /* Indigo color */
  color: white;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.next-button:hover {
  background-color: #4338ca; /* Darker indigo on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.next-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* SVG icon animation */
.next-button svg {
  transition: transform 0.2s ease;
}

.next-button:hover svg {
  transform: translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .next-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .next-button svg {
    width: 20px;
    height: 20px;
  }
  
  .filter-badge {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
}

/* Team Match Quiz Styles */
.team-match-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.team-choices-container {
  max-width: 800px;
  margin: 0 auto 2rem;
}

.team-choices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.team-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  transition: all 0.3s ease;
  height: 200px;
  width: 100%;
  border: none;
  cursor: pointer;
}

.team-choice:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.team-logo-container {
  height: 80px;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.team-logo-container img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.team-name {
  font-size: 1.125rem;
  font-weight: 500;
  text-align: center;
  color: #1f2937;
}

.team-choice.correct {
  background-color: #10b981;
  color: white;
  transform: scale(1.05);
}

.team-choice.incorrect {
  background-color: #ef4444;
  color: white;
}

.team-choice.correct-answer {
  background-color: #10b981;
  color: white;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #10b981, 0 0 15px rgba(16, 185, 129, 0.7);
}

.team-name-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.5s ease;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 50;
}

.text-shadow-lg {
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {
  0% { transform: scale(1.05); background-color: #10b981; }
  50% { transform: scale(1.1); background-color: #059669; }
  100% { transform: scale(1.05); background-color: #10b981; }
}

.team-choice.pulsing {
  animation: pulse 1.5s ease-in-out;
}

/* Quiz Me Button */
.quiz-button {
  background-color: #8b5cf6; /* Purple */
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.quiz-button:hover {
  background-color: #7c3aed;
  transform: translateY(-1px);
}

/* Debug information */
.debug-info {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px dashed #ccc;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  font-size: 0.875rem;
  color: #4b5563;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.debug-info h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.debug-section {
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.debug-section:last-child {
  margin-bottom: 0;
}

.debug-section h5 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
}

.debug-section p {
  margin: 0.25rem 0;
  font-family: monospace;
  word-break: break-all;
}

.debug-info p {
  margin: 0.25rem 0;
}

/* Team Match Layout Adjustments */
.team-match-container {
  padding-top: 0.5rem; /* reduce gap below nav */
}

.team-match-game {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem; /* space between card and choices */
}

.team-match-game .player-info {
  flex: 1 1 40%; /* card takes ~40% width */
}

.team-match-game .team-choices-container {
  flex: 1 1 55%; /* choices take remaining width */
  max-width: none; /* allow full flex width */
  margin: 0; /* remove extra vertical spacing */
}

@media (max-width: 768px) {
  .team-match-game {
    flex-direction: column; /* stack on small screens */
    align-items: center;
  }

  .team-match-game .player-info,
  .team-match-game .team-choices-container {
    flex: 1 1 100%;
  }
}
