/* Filter Bar Container */
.filter-bar { 
    margin-bottom: 30px; 
    background: white; 
    padding: 12px 15px; 
    border-radius: 15px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); 
    flex-wrap: wrap;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto; /* Pushes the group to the right */
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between selects and the Clear link */
}

.filter-actions-right {
    display: flex;
    align-items: center;
}

.filter-form {
    display: flex; 
    justify-content: space-between; /* This pushes the two child divs apart */
    align-items: center;
    flex-grow: 1; 
    gap: 15px;
}

/* Stat Pill (Total Count) */
.stat-pill {
    background: #f1f5f9;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

/* Inputs & Selects */
.filter-select {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 13px;
    background: white;
    outline: none;
}

/* Action Buttons */
.btn-pick { 
    background: var(--accent); 
    color: white !important; 
    padding: 10px 14px; 
    border-radius: 10px; 
    text-decoration: none; 
    font-size: 13px; 
    font-weight: 700; 
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.filter-clear-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    padding: 5px 10px;
    white-space: nowrap;
    border-left: 1px solid #e2e8f0; /* Optional: adds a subtle divider */
    margin-left: 5px;
}

.filter-clear-link:hover {
    color: #ef4444; /* Subtle red hint for "clear/delete" action */
}

/* Pagination Styling */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding-bottom: 40px;
}

.page-link {
    padding: 10px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.page-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.page-info {
    font-weight: 700;
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 768px) {
    /* 1. Make the main bar stack its contents */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    /* 2. Ensure the form uses the full width */
    .filter-form {
        flex-direction: column;
        align-items: stretch; /* Stretch children to full width */
        width: 100%;
    }

    /* 3. This is the crucial part for Sudoku: 
       Make the dropdown container stack vertically */
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    /* 4. Make dropdowns and buttons full width so they look uniform */
    .filter-select, 
    .btn-pick {
        width: 100%;
        box-sizing: border-box; /* Prevents padding from breaking width */
    }

    /* 5. Clean up the "Clear" link positioning */
    .filter-clear-link {
        border-left: none;
        padding: 5px 0;
        text-align: center;
        margin-left: 0;
    }

    /* 6. Fix the right-side actions (Pick for me) */
    .filter-actions-right {
        width: 100%;
        margin-top: 5px;
    }
}