/* Compact Filter Bar Redesign */

/* Container for the entire sorting section */
.quick-top-three-header {
    margin: 1rem 0;
    padding: 0;
}

/* Updated Filter Bar - More Compact */
.best-bats-content .filter-bar,
.filter-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    max-width: 700px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Primary button container */
.filter-bar .primary-filter {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

/* Primary "BEST [LEAGUE]" button */
.filter-bar .primary-button {
    background: linear-gradient(135deg, #0073e6 0%, #005bb5 100%);
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.875rem 3rem;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 115, 230, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    transition: all 0.2s ease;
    min-width: 250px;
    width: 60%;
    max-width: 400px;
}

.filter-bar .primary-button:hover {
    background: linear-gradient(135deg, #005bb5 0%, #004494 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 115, 230, 0.4);
}

/* Secondary filters container */
.filter-bar .secondary-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Updated button styles - smaller and tighter */
.best-bats-content .filter-bar button,
.filter-bar button,
.quick-top-three-header .filter-bar button,
#quick_top_3 .filter-bar button {
    flex: 0 0 auto;
    background: white;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: auto;
}

.best-bats-content .filter-bar button:hover,
.filter-bar button:hover {
    background-color: #f7fafc;
    border-color: #0073e6;
    color: #0073e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 115, 230, 0.15);
}

.best-bats-content .filter-bar button.active,
.filter-bar button.active {
    background: #0073e6;
    border-color: #0073e6;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 115, 230, 0.3);
}

/* Reduce header size */
.best-bats-content .quick-top-header {
    max-width: 600px;
    margin: 0 auto;
    padding: 0.5rem 0;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .filter-bar {
        padding: 0.5rem;
        gap: 0.4rem;
    }
    
    .filter-bar .primary-button {
        font-size: 0.95rem;
        padding: 0.75rem 2rem;
        width: 80%;
        min-width: 200px;
    }
    
    .filter-bar .secondary-filters {
        flex-wrap: nowrap;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    
    .filter-bar button {
        font-size: 0.7rem;
        padding: 0.35rem 0.625rem;
        white-space: nowrap;
    }
    
    .best-bats-content .quick-top-header {
        font-size: 1.1rem;
    }
}

/* Dark mode support */
body.dark-mode .filter-bar {
    background: #2d2d2d;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .filter-bar .primary-button {
    background: linear-gradient(135deg, #4a9eff 0%, #3182ce 100%);
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.4);
}

body.dark-mode .filter-bar .primary-button:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    box-shadow: 0 3px 8px rgba(74, 158, 255, 0.5);
}

body.dark-mode .filter-bar button {
    background: #3a3a3a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #d0d0d0;
}

body.dark-mode .filter-bar button:hover {
    background-color: #404040;
    border-color: #4a9eff;
    color: #4a9eff;
}

body.dark-mode .filter-bar button.active {
    background: #4a9eff;
    border-color: #4a9eff;
    color: #1a1a1a;
}