/*  Filter bar  */

.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 8px 0;
}

.filter-bar-label {
    color: #888;
    font-size: 0.85em;
    white-space: nowrap;
    margin-right: 2px;
}

/*  Toggle buttons ─ */

.filter-toggle {
    cursor: pointer;
    font-size: 0.85em;
    padding: 3px 12px;
    border: 1px solid #bbb;
    border-radius: 12px;
    color: #444;
    background: #f5f5f5;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    user-select: none;
}

.filter-toggle:hover {
    border-color: #1a73e8;
    color: #1a73e8;
    background: #f0f5ff;
}

.filter-toggle.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.filter-toggle.active:hover {
    background: #1558b0;
    border-color: #1558b0;
    color: #fff;
}

.bf-add-btn {
    padding: 3px 10px;
    font-size: 1.1em;
    font-weight: bold;
    border-style: dashed;
    color: #888;
}

.bf-add-btn:hover {
    color: #1a73e8;
    border-color: #1a73e8;
    background: #f0f5ff;
}

/* ── Edit mode: button wrapper with overlays ─────────────────────────────── */

.filter-toggle-wrap {
    position: relative;
    display: inline-block;
    cursor: grab;
    margin: 4px 8px 4px 4px; /* room for corner badges */
}

.filter-toggle-wrap:active {
    cursor: grabbing;
}

.filter-toggle-wrap.bf-dragging {
    opacity: 0.4;
}

.filter-toggle-wrap.bf-drag-over .filter-toggle {
    border-color: #1a73e8;
    box-shadow: -3px 0 0 #1a73e8;
}

.filter-edit-btn,
.filter-delete-btn {
    position: absolute;
    top: -7px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    line-height: 15px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    user-select: none;
    z-index: 1;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.filter-toggle-wrap:hover .filter-edit-btn,
.filter-toggle-wrap:hover .filter-delete-btn {
    opacity: 1;
}

.filter-edit-btn {
    left: -7px;
}

.filter-delete-btn {
    right: -7px;
}

.filter-edit-btn:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

.filter-delete-btn:hover {
    background: #fde8e8;
    border-color: #c62828;
    color: #c62828;
}

/*  Lane count: show X/N when filtered  */

.lane-count {
    color: #888;
}
