/**
 * S-Cloud — Filter Builder CSS (v2.2.48)
 */

.sc-fb-wrap { position: relative; display: inline-block; }

.sc-fb-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937;
    font-size: .85rem; font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.sc-fb-toggle:hover { border-color: #7C3AED; }
.sc-fb-wrap.is-open .sc-fb-toggle { border-color: #7C3AED; background: #faf5ff; }

.sc-fb-count {
    background: #7C3AED; color: #fff;
    font-size: .65rem; font-weight: 700;
    padding: 1px 6px; border-radius: 10px;
    min-width: 16px; text-align: center;
}
.sc-fb-counter {
    font-size: .7rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 10px;
}

.sc-fb-panel {
    position: absolute; top: calc(100% + 4px); left: 0;
    width: 480px; max-width: 92vw;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 100;
    display: none;
    padding: 12px;
}
.sc-fb-wrap.is-open .sc-fb-panel { display: block; }

.sc-fb-head {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 10px;
}
.sc-fb-clear-btn {
    background: none; border: none;
    color: #ef4444; font-size: .72rem; font-weight: 600;
    cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.sc-fb-clear-btn:hover { background: #fee2e2; }

.sc-fb-rules { max-height: 380px; overflow-y: auto; }

.sc-fb-rule {
    display: flex; gap: 6px; align-items: center;
    padding: 6px 0;
    flex-wrap: wrap;
}
.sc-fb-rule > .form-select, .sc-fb-rule > .form-control {
    flex: 0 0 auto;
}
.sc-fb-rule > select.form-select-sm { width: auto; min-width: 110px; }
.sc-fb-rule > input.form-control-sm { min-width: 120px; flex: 1; }

.sc-fb-multiselect {
    display: flex; gap: 4px; flex-wrap: wrap;
    flex: 1; min-width: 0;
}
.sc-fb-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: .72rem;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: all .12s;
}
.sc-fb-chip:hover { border-color: #e5e7eb; }
.sc-fb-chip input { margin: 0; cursor: pointer; }
.sc-fb-chip:has(input:checked) {
    background: rgba(124,58,237,.1);
    color: #7C3AED;
    border-color: rgba(124,58,237,.3);
    font-weight: 600;
}

.sc-fb-between { display: flex; gap: 4px; flex: 1; }
.sc-fb-between input { flex: 1; min-width: 100px; }
.sc-fb-size {
    display: inline-flex; align-items: center; gap: 4px;
    flex: 1; max-width: 180px;
}
.sc-fb-unit { font-size: .8rem; color: #6b7280; }

.sc-fb-remove {
    background: none; border: none;
    color: #9ca3af;
    width: 24px; height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem; line-height: 1;
    flex-shrink: 0;
}
.sc-fb-remove:hover { background: #fee2e2; color: #ef4444; }

.sc-fb-novalue {
    color: #9ca3af; font-style: italic;
    min-width: 100px;
}

.sc-fb-add {
    background: none;
    border: 1px dashed #d1d5db;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    font-size: .8rem;
    margin-top: 8px;
    transition: all .15s;
}
.sc-fb-add:hover { border-color: #7C3AED; color: #7C3AED; background: #faf5ff; }

.sc-fb-foot {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
    color: #9ca3af;
    font-size: .7rem;
}

.sc-fb-empty {
    text-align: center;
    color: #9ca3af;
    font-size: .85rem;
    padding: 16px;
    margin: 0;
}
