/* Team Popup Styles - Using ID selector to match JavaScript */
 #team-popup {
  top: -120px;
  display: none;
  background: transparent !important;
  height: 100px !important;
  z-index: 999999 !important; 

  /* Additional required styles */
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  border-bottom: 1px solid white !important;
  padding: 8px 0 !important;
  transition: top 0.5s ease-out !important;
}

#team-popup.show {
  display: block;
  top: 0;
}

.popup-content {
  width: 90%;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding-top: 8px;
}

#team-popup h2 {
  color: white;
  font-size: 14px;
  margin: 5px 0 10px;
  font-weight: 400;
  padding: 0 60px;
  line-height: 1.3;
}

/* Team Options */
.team-options {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  opacity: 0.4;
  transition: opacity 0.3s;
  flex-wrap: wrap;
}

.notification-consent:has(input:checked) + .team-options {
  opacity: 1;
}

.team-option {
  padding: 3px 12px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 9px;
  background: #e0e0e0;
  color: #555;
  transition: all 0.2s;
  border: none;
  min-width: 0;
  flex: 0 0 auto;
  height: 30px;
  line-height: 18px;
  white-space: nowrap;
  box-sizing: border-box;
  pointer-events: auto; /* enable by default; JS can disable when needed */
}

/* Enable team options when checkbox is checked */
.notification-consent:has(input:checked) ~ .team-options .team-option {
  pointer-events: auto;
}

/* Team color themes */
.team-option[data-team="green-gold"]:hover, 
.team-option[data-team="green-gold"]:active { 
  background: #008000 !important; 
  color: #FFD700 !important; 
}

.team-option[data-team="black"]:hover, 
.team-option[data-team="black"]:active { 
  background: #000 !important; 
  color: #fff !important; 
}

.team-option[data-team="original"]:hover, 
.team-option[data-team="original"]:active { 
  background: #FFA500 !important; 
  color: #fff !important; 
}

.team-option[data-team="gold"]:hover, 
.team-option[data-team="gold"]:active { 
  background: #FFD700 !important; 
  color: #000 !important; 
}

/* Notification Consent */
.notification-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
  color: white;
  font-size: 12px;
}

#allow-notifications {
  width: 14px;
  height: 14px;
  accent-color: #FF4500;
  cursor: pointer;
}

.notification-consent label {
  cursor: pointer;
}

/* Cancel Button - Top Right */
.cancel-btn {
  position: absolute;
  top: 0px;
  right: 0px;
  background: transparent;
  border: none;
  color: white;
  font-size: 12px;
  font-weight: 300;
  cursor: pointer;
  padding: 2px 8px;
  opacity: 0.8;
  transition: opacity 0.2s;
  z-index: 110001;
}

.cancel-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Install Buttons */
.install-btn {
  position: absolute;
  top: 0px;
  left: 0px;
  background: #FF4500;
  color: white;
  border: none;
  border-radius: 15px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
  display: none;
  z-index: 110001;
  min-width: 140px;
}

.install-btn:hover {
  opacity: 0.9;
}

.install-btn.show {
  display: block;
}

/* Loading state for team options */
.team-option.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Explicit disabled helper so JS/CSS can disable options without overriding all styles */
.team-option.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .popup-content {
    width: 95%;
  }
  
  #team-popup h2 {
    font-size: 12px;
    padding: 0 50px;
  }
  
  .team-options {
    gap: 4px;
  }
  
  .team-option {
    font-size: 8px;
    padding: 2px 8px;
    height: 22px;
  }
  
  .install-btn {
    font-size: 11px;
    min-width: 120px;
    padding: 3px 8px;
  }
}

/* Ensure content is visible despite transparent background */
.popup-content {
  background: rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  margin: 5px auto;
  padding: 10px 15px;
}

/* Fix for transparent background - make content area opaque */
#team-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: -1;
  pointer-events: none;
}

/* Remove the background from the main element but keep it in the pseudo-element */
#team-popup {
  background: transparent !important;
}

/* Ensure buttons are above the pseudo-element */
.cancel-btn,
.install-btn,
.team-option {
  position: relative;
  z-index: 1;
}
