/* Sports Filter Styles */

.sports-filter {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.sports-filter-button {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sports-filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sports-filter-button.active {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.filter-icon {
  font-size: 20px;
}

.filter-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-badge {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.filter-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.sports-filter-button.active .filter-arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.sports-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.sports-dropdown.open {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-header {
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.dropdown-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-action:active {
  transform: scale(0.95);
}

/* Sports List */
.sports-list {
  max-height: 350px;
  overflow-y: auto;
  padding: 8px;
}

.sport-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.sport-item:hover {
  background: #f5f5f5;
}

.sport-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.sport-item .sport-icon {
  font-size: 24px;
}

.sport-item .sport-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.sport-item .checkmark {
  opacity: 0;
  color: #667eea;
  font-size: 18px;
  font-weight: bold;
  transition: opacity 0.2s ease;
}

.sport-item input[type="checkbox"]:checked ~ .checkmark {
  opacity: 1;
}

.sport-item input[type="checkbox"]:checked ~ .sport-name {
  color: #667eea;
  font-weight: 600;
}

/* Scrollbar styling */
.sports-list::-webkit-scrollbar {
  width: 6px;
}

.sports-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.sports-list::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.sports-list::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* Mobile Responsive - Bottom Sheet */
@media (max-width: 768px) {
  .sports-filter {
    max-width: 100%;
  }

  .sports-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 20px 20px 0 0;
    max-height: 0;
    transform: translateY(100%);
  }

  .sports-dropdown.open {
    max-height: 70vh;
    transform: translateY(0);
  }

  .dropdown-header {
    border-radius: 20px 20px 0 0;
    padding: 20px 16px;
  }

  .dropdown-header h3 {
    font-size: 20px;
  }

  .sports-list {
    max-height: calc(70vh - 80px);
    padding: 12px;
  }

  .sport-item {
    padding: 14px;
    margin-bottom: 4px;
  }

  .sport-item .sport-icon {
    font-size: 28px;
  }

  .sport-item .sport-name {
    font-size: 16px;
  }

  /* Add backdrop on mobile */
  .sports-dropdown.open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    animation: fadeIn 0.3s ease;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .sports-filter-button,
  .sports-dropdown,
  .sport-item,
  .filter-arrow {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .sports-filter-button {
    border: 2px solid white;
  }

  .sport-item:hover {
    background: #e0e0e0;
    border: 1px solid #333;
  }
}
