/*
 * Tournament Filters Section
 * Modern, professional filter interface for tournament discovery
 * 
 * @package CMSMGA
 * @version 5.0
 */

/* ===== TOURNAMENT FILTERS SECTION ===== */
.tournament-filters-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--color-primary-800), var(--color-primary-700));
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.tournament-filters-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent,
    var(--color-accent-400),
    transparent
  );
  z-index: 2;
}

.tournament-filters-section::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, 
    color-mix(in srgb, var(--color-primary-500) 10%, transparent) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}



.tournament-filters-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

/* ===== HEADER STYLES ===== */
.tournament-filters-header {
  text-align: center;
  margin-bottom: 3rem;
}

.tournament-filters-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--text-inverse);
  margin-bottom: 1rem;
  position: relative;
}

.tournament-filters-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4rem;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-500), var(--color-accent-400));
  border-radius: 2px;
}

.tournament-filters-subtitle {
  font-size: var(--text-lg);
  color: color-mix(in srgb, var(--color-white) 80%, transparent);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== CONTENT STYLES ===== */
.tournament-filters-content {
  background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-600));
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-primary);
  backdrop-filter: blur(10px);
  color: var(--text-inverse);
}

/* ===== FILTER GRID ===== */
.tournament-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.tournament-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tournament-filter-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-inverse);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.tournament-filter-select {
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-primary);
  border-radius: 12px;
  background: var(--bg-surface) !important;
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.tournament-filter-select:hover {
  border-color: var(--color-primary-400);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tournament-filter-select:focus {
  outline: none;
  border-color: var(--color-primary-600);
  box-shadow: 0 0 0 3px var(--bg-primary-transparent-20);
}

.tournament-filter-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0.5rem;
}

/* ===== SEARCH SECTION ===== */
.tournament-search-section {
  border-top: 1px solid var(--border-secondary);
  padding-top: 2rem;
}

.tournament-search-wrapper {
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.tournament-search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-primary);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: 500;
  transition: all 0.3s ease;
}

.tournament-search-input::placeholder {
  color: var(--text-secondary);
}

.tournament-search-input:hover {
  border-color: var(--color-primary-400);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tournament-search-input:focus {
  outline: none;
  border-color: var(--color-primary-600);
  box-shadow: 0 0 0 3px var(--bg-primary-transparent-20);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .tournament-filters-section {
    padding: 3rem 0;
  }
  
  .tournament-filters-container {
    padding: 0 1rem;
  }
  
  .tournament-filters-content {
    padding: 2rem 1.5rem;
  }
  
  .tournament-filters-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .tournament-search-wrapper {
    flex-direction: column;
    gap: 1rem;
  }
  
  .tournament-search-input {
    width: 100%;
  }
  
  .tournament-filters-title {
    font-size: var(--text-3xl);
  }
  
  .tournament-filters-subtitle {
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  .tournament-filters-content {
    padding: 1.5rem 1rem;
  }
  
  .tournament-filters-title {
    font-size: var(--text-2xl);
  }
}

/* ===== ANIMATIONS ===== */
.tournament-filters-section {
  animation: fadeInUp 0.8s ease-out;
}

.tournament-filter-group {
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
}

.tournament-filter-group:nth-child(1) { animation-delay: 0.1s; }
.tournament-filter-group:nth-child(2) { animation-delay: 0.2s; }
.tournament-filter-group:nth-child(3) { animation-delay: 0.3s; }
.tournament-filter-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ACCESSIBILITY ===== */
.tournament-filter-select:focus-visible,
.tournament-search-input:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  .tournament-filters-content {
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-600));
    border-color: var(--border-accent);
  }
  
  .tournament-filter-select,
  .tournament-search-input {
    background: var(--bg-surface) !important;
    border-color: var(--border-accent);
  }
} 