/*
 * IMPACCT 2.0 — Active Filter Bar
 * Slim sticky bar showing active filters as dismissible pill chips.
 * All colors use theme CSS variables from theme.css.
 */

/* ── Filter Bar Container ── */
.active-filter-bar {
    display: none; /* shown by JS when filters are active */
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
    animation: af-slide-in 0.2s ease-out;
}

@keyframes af-slide-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── "ACTIVE FILTERS" Label ── */
.af-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    flex-shrink: 0;
    padding-right: 4px;
}

/* ── Pills Container ── */
.af-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

/* ── Individual Filter Pill ── */
.af-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 20px;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
}

.af-pill:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.af-pill-text {
    line-height: 1;
}

/* ── Pill Close (×) Button ── */
.af-pill-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}

.af-pill-close:hover {
    background: var(--color-danger);
    color: #ffffff;
}

/* ── Clear All Button ── */
.af-clear-all {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-danger);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm, 4px);
    transition: background 0.12s;
    flex-shrink: 0;
    margin-left: auto;
}

.af-clear-all:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .active-filter-bar {
        padding: 6px 10px;
        gap: 6px;
    }

    .af-label {
        width: 100%;
        margin-bottom: 2px;
    }

    .af-pill {
        font-size: 0.72rem;
        padding: 3px 6px 3px 8px;
    }
}
