/* Sport Icons and Map Markers Styles */

/* Sport icon base styles */
.sport-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.sport-icon:hover {
  transform: scale(1.1);
}

.sport-icon svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Sport badges for UI components */
.sport-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  text-transform: capitalize;
}

.sport-badge-basketball { background-color: #FF6B35; }
.sport-badge-soccer { background-color: #4CAF50; }
.sport-badge-volleyball { background-color: #2196F3; }
.sport-badge-tennis { background-color: #9C27B0; }
.sport-badge-hockey { background-color: #00BCD4; }
.sport-badge-golf { background-color: #607D8B; }
.sport-badge-swimming { background-color: #00ACC1; }
.sport-badge-running { background-color: #FF5722; }
.sport-badge-cycling { background-color: #795548; }
.sport-badge-fitness { background-color: #FF9800; }
.sport-badge-yoga { background-color: #9E9E9E; }
.sport-badge-badminton { background-color: #8BC34A; }
.sport-badge-tabletennis { background-color: #FFC107; }
.sport-badge-cricket { background-color: #3F51B5; }
.sport-badge-other { background-color: #757575; }

/* Map info window styles */
.game-info-window {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 16px;
}

.game-info-window h3 {
  font-weight: 600;
  line-height: 1.2;
}

.game-info-window button {
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-info-window button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

/* Map legend styles enhancement */
.map-legend {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  max-height: 400px;
  overflow-y: auto;
  min-width: 180px;
}

.map-legend-title {
  font-weight: 700;
  margin-bottom: 12px;
  color: #333;
  font-size: 16px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 8px;
}

.map-legend-item {
  display: flex;
  align-items: center;
  margin: 8px 0;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.map-legend-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.map-legend-icon {
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.map-legend-label {
  color: #555;
  font-weight: 500;
}

/* Sport filter buttons */
.sport-filter-container {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 8px;
}

.sport-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #333;
}

.sport-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sport-filter-btn.active {
  color: white;
  border-color: transparent;
}

.sport-filter-btn.active.filter-basketball { background: #FF6B35; }
.sport-filter-btn.active.filter-soccer { background: #4CAF50; }
.sport-filter-btn.active.filter-volleyball { background: #2196F3; }
.sport-filter-btn.active.filter-tennis { background: #9C27B0; }
.sport-filter-btn.active.filter-hockey { background: #00BCD4; }
.sport-filter-btn.active.filter-golf { background: #607D8B; }
.sport-filter-btn.active.filter-swimming { background: #00ACC1; }
.sport-filter-btn.active.filter-running { background: #FF5722; }
.sport-filter-btn.active.filter-cycling { background: #795548; }
.sport-filter-btn.active.filter-fitness { background: #FF9800; }
.sport-filter-btn.active.filter-all { background: #424242; }

/* Marker clustering styles */
.marker-cluster-small {
  background: rgba(255, 107, 53, 0.8);
}

.marker-cluster-medium {
  background: rgba(255, 87, 34, 0.8);
}

.marker-cluster-large {
  background: rgba(233, 30, 99, 0.8);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  color: white;
  font-weight: bold;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Game card sport indicators */
.game-card-sport-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Sport type selector dropdown */
.sport-selector {
  position: relative;
  display: inline-block;
}

.sport-selector-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  min-width: 160px;
  justify-content: space-between;
}

.sport-selector-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.sport-selector.open .sport-selector-dropdown {
  display: block;
}

.sport-selector-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sport-selector-option:hover {
  background-color: #f5f5f5;
}

.sport-selector-option.selected {
  background-color: #e3f2fd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .map-legend {
    font-size: 12px;
    padding: 12px;
    min-width: 140px;
  }
  
  .map-legend-title {
    font-size: 14px;
  }
  
  .sport-filter-container {
    padding: 8px;
    gap: 6px;
  }
  
  .sport-filter-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .game-info-window {
    padding: 12px;
    min-width: 240px;
  }
}

/* Animation for marker pulse effect */
@keyframes markerPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.marker-pulse {
  animation: markerPulse 2s infinite;
}

/* User location marker styles */
.user-location-pulse {
  width: 40px;
  height: 40px;
  background: rgba(33, 150, 243, 0.3);
  border-radius: 50%;
  position: absolute;
  animation: locationPulse 2s infinite;
}

@keyframes locationPulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Sport icon grid for selection */
.sport-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  padding: 16px;
}

.sport-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.sport-icon-item:hover {
  background-color: #f5f5f5;
  transform: translateY(-2px);
}

.sport-icon-item.selected {
  border-color: #2196F3;
  background-color: #e3f2fd;
}

.sport-icon-label {
  font-size: 12px;
  text-align: center;
  color: #666;
  font-weight: 500;
}