/* Shared minimal list filter bar — Connectors, Jobs, Quick Actions */

.lf-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.lf-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    width: 100%;
    min-width: 0;
}

.lf-row--search {
    flex-wrap: nowrap;
}

.lf-row--filters {
    justify-content: flex-start;
}

.lf-row-spacer {
    flex: 1 1 auto;
    min-width: 8px;
}

.lf-search-wrap {
    position: relative;
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
}

.lf-search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}

.lf-search {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px 9px 34px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}

.lf-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.06);
}

.lf-select {
    flex-shrink: 0;
    min-width: 0;
    max-width: min(200px, 100%);
    padding: 7px 28px 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.lf-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.lf-segment {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    padding: 4px 5px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.lf-segment button {
    padding: 6px 10px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.lf-segment button:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.lf-segment button.active {
    background: var(--accent-secondary, rgba(0, 217, 255, 0.12));
    color: var(--accent-primary);
}

.lf-segment button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lf-view-toggle {
    display: inline-flex;
    align-items: stretch;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.lf-view-toggle button {
    padding: 7px 10px;
    border: none;
    border-right: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.lf-view-toggle button:last-child {
    border-right: none;
}

.lf-view-toggle button:hover {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.04);
}

.lf-view-toggle button.active {
    background: var(--accent-secondary, rgba(0, 217, 255, 0.12));
    color: var(--accent-primary);
}

.lf-clear {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 11px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s;
}

.lf-clear:hover {
    color: var(--accent-primary);
}

.lf-clear.hidden {
    display: none;
}

.lf-more {
    width: 100%;
}

.lf-more > summary {
    list-style: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 0;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lf-more > summary::-webkit-details-marker {
    display: none;
}

.lf-more > summary:hover {
    color: var(--text-secondary);
}

.lf-more[open] > summary {
    color: var(--accent-primary);
}

.lf-more-body {
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lf-env-pill {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lf-filter-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

.lf-filter-group--tags {
    flex: 1 1 120px;
    min-width: 0;
}

.lf-filter-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    flex-shrink: 0;
}

.lf-tag-scroll {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
}

.lf-tag-scroll::-webkit-scrollbar {
    height: 4px;
}

.lf-tag-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

.lf-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    width: max-content;
    min-height: 26px;
    align-items: center;
}

.lf-chip {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(0, 217, 255, 0.22);
    background: rgba(0, 217, 255, 0.06);
    color: var(--accent-primary);
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.lf-chip:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 217, 255, 0.12);
}

.lf-chip.active {
    background: rgba(0, 217, 255, 0.18);
    border-color: var(--accent-primary);
}

@media (max-width: 760px) {
    .lf-row--filters {
        flex-wrap: wrap;
    }

    .lf-row-spacer {
        display: none;
    }

    .lf-segment {
        flex: 1 1 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .lf-filter-group--tags {
        flex: 1 1 100%;
    }
}

[data-theme="light"] .lf-segment,
[data-theme="glass"] .lf-segment {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .lf-segment button:hover:not(:disabled),
[data-theme="glass"] .lf-segment button:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .lf-search,
[data-theme="glass"] .lf-search,
[data-theme="light"] .lf-select,
[data-theme="glass"] .lf-select {
    background: var(--bg-input);
    border-color: var(--border-color);
}

[data-theme="light"] .lf-search:focus,
[data-theme="glass"] .lf-search:focus {
    background: var(--bg-input);
}

/* Shared list row surface — matches Automations / Connectors cards */
.lf-list-row {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(22, 22, 30, 0.78);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.lf-list-row:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
    background: rgba(20, 20, 28, 0.78);
}

[data-theme="light"] .lf-list-row,
[data-theme="glass"] .lf-list-row {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm, none);
}

[data-theme="light"] .lf-list-row:hover,
[data-theme="glass"] .lf-list-row:hover {
    background: var(--bg-tertiary);
}
