/* ============================================================
   TradeJournal — Advanced Filter (Trades page)
   Reuses the Add Trade Modal's at-modal / at-tabs / at-chip /
   at-rating / at-grid component language for 100% visual
   consistency. This file only adds the few bits that pattern
   doesn't already cover.
   ============================================================ */

/* ── Filter button count badge ─────────────────────────────── */
#adv-filter-btn {
    position: relative;
}

.adv-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--r-full);
    background: var(--primary);
    color: var(--on-primary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

/* ── Min/Max range pairs — small "–" divider between the two
   at-input fields for a clearer visual pairing ───────────── */
.af-range {
    position: relative;
}

/* ── Active filter chips row (above the trades table) ─────── */
.active-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-sm);
    margin-bottom: var(--s-lg);
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px 5px 12px;
    background: var(--canvas-soft);
    border: 1px solid var(--hairline-cool);
    border-radius: var(--r-full);
    font-size: 12px;
    color: var(--ink-secondary);
    white-space: nowrap;
}

.active-filter-chip__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: var(--r-full);
    background: var(--hairline-cool);
    color: var(--ink-mute);
    cursor: pointer;
    flex: none;
    transition: background 120ms ease, color 120ms ease;
}

.active-filter-chip__remove:hover {
    background: var(--loss);
    color: #fff;
}

.active-filter-chip__remove svg {
    width: 10px;
    height: 10px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.active-filters-clear {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-mute);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.active-filters-clear:hover {
    color: var(--ink);
}

@media (max-width: 640px) {
    .active-filters-row {
        gap: var(--s-xs);
    }
}