/* ======================================= */
/* Pill Filter System (Shared Component)   */
/* Used by: View Matchups, Track Record,   */
/*          Picks, and future filter pages  */
/* ======================================= */

/* Pill Group - container for filter pills */
.pill-group {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.pill-group-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.pill-group-scroll::-webkit-scrollbar {
    display: none;
}

/* Filter Pill - primary filter element */
.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    min-height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.filter-pill:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: rgb(16 185 129 / 0.05);
}

.filter-pill.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgb(16 185 129 / 0.3);
}

.filter-pill.pill-compact {
    padding: 0.375rem 0.75rem;
    min-width: 36px;
    min-height: 36px;
    font-size: 0.8rem;
}

.filter-pill-outline {
    background: transparent;
    border-style: dashed;
}

.filter-pill-outline:hover {
    border-style: solid;
}

.filter-pill-outline.active {
    background: rgb(16 185 129 / 0.08);
    border-style: solid;
}

.filter-pill-sm {
    padding: 0.25rem 0.75rem;
    min-height: 30px;
    font-size: 0.8rem;
}

/* Segment Control - toggle between 2 options */
.segment-control {
    display: flex;
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.segment-btn {
    position: relative;
    z-index: 1;
    padding: 0.375rem 1rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.segment-btn.active {
    color: white;
    font-weight: 600;
}

.segment-slider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 4px);
    background: var(--accent-primary);
    border-radius: 999px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.segment-control:has(.segment-btn:last-of-type.active) .segment-slider {
    transform: translateX(calc(100% + 2px));
}

/* Chip Group - container for filter chips */
.chip-group {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    align-items: center;
}

.chip-group-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.chip-group-scroll::-webkit-scrollbar {
    display: none;
}

/* Filter Chip - smaller variant for secondary filters */
.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    min-height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.filter-chip:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-chip.active {
    background: rgb(16 185 129 / 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
}

/* Filter count badge */
.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--accent-primary);
    color: white;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Filter group label */
.pill-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding-left: 0.25rem;
}

/* Responsive: Pill Filters */
@media (max-width: 768px) {
    .filter-pill {
        padding: 0.375rem 0.75rem;
        min-height: 36px;
        font-size: 0.8rem;
    }

    .filter-pill.pill-compact {
        padding: 0.375rem 0.625rem;
        min-width: 32px;
        min-height: 32px;
    }

    .segment-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .pill-group-scroll {
        max-width: calc(100vw - 2rem);
    }
}
