/* ============================================================================
   FILTER CHIPS - Horizontal pill-based filter bar
   ============================================================================ */

.filter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
    align-items: center;
}

/* Base chip style */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--chat-border, #ddd);
    background: transparent;
    color: var(--chat-text, #555);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.3;
}

.filter-chip i {
    font-size: 0.75rem;
}

.filter-chip:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.06);
}

/* Active state - default blue */
.filter-chip.active {
    border-color: #667eea;
    background: #667eea;
    color: #fff;
    font-weight: 600;
}

/* ── Category-specific colors (active state) ── */

.filter-chip.chip-todo.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #fff;
}
.filter-chip.chip-todo:not(.active):hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.filter-chip.chip-event.active {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: #fff;
}
.filter-chip.chip-event:not(.active):hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
}

.filter-chip.chip-diary.active {
    border-color: #10b981;
    background: #10b981;
    color: #fff;
}
.filter-chip.chip-diary:not(.active):hover {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.filter-chip.chip-shopping.active {
    border-color: #f59e0b;
    background: #f59e0b;
    color: #fff;
}
.filter-chip.chip-shopping:not(.active):hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.filter-chip.chip-expense.active {
    border-color: #ef4444;
    background: #ef4444;
    color: #fff;
}
.filter-chip.chip-expense:not(.active):hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.filter-chip.chip-info.active {
    border-color: #6b7280;
    background: #6b7280;
    color: #fff;
}
.filter-chip.chip-info:not(.active):hover {
    border-color: #6b7280;
    color: #6b7280;
    background: rgba(107, 114, 128, 0.08);
}

/* ── Dark theme ── */
[data-theme="dark"] .filter-chip {
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .filter-chip:hover {
    border-color: #818cf8;
    color: #818cf8;
    background: rgba(129, 140, 248, 0.1);
}

[data-theme="dark"] .filter-chip.active {
    border-color: #667eea;
    background: #667eea;
    color: #fff;
}

/* Dark theme category overrides stay the same - filled active states work in both themes */

/* ── Responsive ── */
@media (max-width: 576px) {
    .filter-chips-container {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .filter-chip {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}
