/* Filter sidebar (filterbar-ui.js): secondary sidebar between the app rail and the chat list, Lark style. Tokens from theme-min.css (dark follows them). */
#fb-btn{flex:none;width:30px;height:30px;margin:0 8px 0 -4px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--ink-soft);cursor:pointer}
#fb-btn:hover{background:var(--line-soft)}#fb-btn.on{background:var(--line-soft);color:var(--ink)}
#fb-btn:focus-visible,#fbar button:focus-visible,#fb-chip:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
#fb-chip{flex:none;display:inline-flex;align-items:center;gap:4px;height:22px;margin-left:8px;padding:0 6px 0 9px;border:0;border-radius:11px;background:var(--blue-wash);color:var(--blue);font:600 12px/1 var(--f-b);cursor:pointer;max-width:46%}
#fb-chip[hidden]{display:none}#fb-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#fb-chip svg{flex:none;opacity:.8}#fb-chip:hover svg{opacity:1}
body.fb-nopills #cf-rail{display:none}
#fbar{flex-direction:column;min-height:0;box-sizing:border-box;color:var(--ink);font:500 14.5px var(--f-b);background:var(--side)}
#fbar[hidden]{display:none!important}
#fbar .fb-h{flex:none;display:flex;align-items:center;gap:2px;height:38px;padding:0 8px 0 12px;box-sizing:content-box;margin-top:var(--topin,30px);margin-bottom:6px}
#fbar .fb-h b{flex:1;min-width:0;margin-left:8px;font:600 16px var(--f-d);letter-spacing:-.01em;white-space:nowrap;overflow:hidden}
#fbar .fb-ib{flex:none;width:30px;height:30px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--ink-soft);cursor:pointer}
#fbar .fb-ib:hover{background:var(--line-soft);color:var(--ink)}#fbar .fb-ib.on{color:var(--blue)}
#fbar .fb-list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 8px 12px;scrollbar-width:thin}
#fbar .fb-i{position:relative;width:100%;height:36px;display:flex;align-items:center;gap:12px;padding:0 12px;margin:0 0 1px;border:0;border-radius:8px;background:transparent;color:var(--muted);font:inherit;text-align:left;cursor:pointer}
#fbar .fb-i svg{flex:none;color:var(--ink-soft)}
#fbar .fb-i .fb-l{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#fbar .fb-i .fb-n{flex:none;font:400 14.5px var(--f-b);font-style:normal;color:var(--muted)}
#fbar .fb-i.has{color:var(--ink)}#fbar .fb-i.hot .fb-n{color:var(--ink-soft)}
#fbar .fb-i:hover{background:rgba(31,35,41,.06)}
#fbar .fb-i.on{background:var(--blue-wash);color:var(--blue);font-weight:600}#fbar .fb-i.on svg,#fbar .fb-i.on .fb-n{color:var(--blue)}
#fbar .fb-sec{position:relative;display:flex;align-items:center}
#fbar .fb-lh{padding-left:16px;gap:12px;color:var(--ink)}#fbar .fb-lh svg{width:14px;height:14px;color:var(--ink-soft);transition:transform .15s}
#fbar .fb-lh[aria-expanded=false] svg{transform:rotate(-90deg)}
#fbar .fb-add{position:absolute;right:4px;top:3px;opacity:0}#fbar .fb-sec:hover .fb-add,#fbar .fb-add:focus-visible{opacity:1}
#fbar .fb-i[data-lid]{padding-left:32px;color:var(--ink-soft)}#fbar .fb-i[data-lid].has{color:var(--ink)}
#fbar .fb-i[data-lid] svg.fb-tag{width:18px;height:18px;color:var(--c,#14A3B8)}
#fbar .fb-i[data-lid].on svg.fb-tag{color:var(--c,var(--blue))}
#fbar .fb-ed{display:none;flex:none;width:24px;height:24px;align-items:center;justify-content:center;border-radius:6px;color:var(--muted)}
#fbar .fb-ed svg{width:15px;height:15px}#fbar .fb-i[data-lid]:hover .fb-ed{display:inline-flex}#fbar .fb-i[data-lid]:hover .fb-n{display:none}
#fbar .fb-ed:hover{background:var(--line);color:var(--ink)}
#fbar .fb-none{padding:6px 12px 6px 48px;color:var(--muted);font-size:13px}
/* in-flow (pinned) */
body.fb-flow #fbar{display:flex;flex:none;width:224px;border-right:1px solid var(--line-soft);animation:fb-w .18s ease-out}
body.fb-flow #fbar.fb-narrow{width:56px}
@keyframes fb-w{from{width:0;opacity:0}}
body.appmode #fbar,body.m-in-chat:not(.appmode) #fbar{display:none!important}
/* icon-only column */
#fbar.fb-narrow .fb-h{flex-direction:column;height:auto;padding:0 0 4px;gap:4px;justify-content:center;align-items:center}
#fbar.fb-narrow .fb-h b,#fbar.fb-narrow .fb-l,#fbar.fb-narrow .fb-ed,#fbar.fb-narrow .fb-add,#fbar.fb-narrow .fb-lh,#fbar.fb-narrow .fb-none,#fbar.fb-narrow .fb-pin{display:none}
#fbar.fb-narrow .fb-list{padding:0 8px 12px}
#fbar.fb-narrow .fb-i{justify-content:center;padding:0}
#fbar.fb-narrow .fb-i[data-lid]{padding:0}
#fbar.fb-narrow .fb-i .fb-n{position:absolute;top:1px;right:1px;min-width:15px;height:15px;padding:0 4px;box-sizing:border-box;border-radius:8px;background:var(--blue);color:#fff;font:600 10px/15px var(--f-b);text-align:center}
#fbar.fb-narrow .fb-i.on .fb-n{background:var(--blue);color:#fff}
#fbar.fb-narrow .fb-sec{display:none}
/* floating panel (not pinned, no room, or phone) */
body.fb-ovl #fbar{display:flex;position:absolute;z-index:120;width:236px;max-height:calc(100% - 90px);background:var(--paper,#fff);border:1px solid var(--line-soft);border-radius:12px;box-shadow:0 10px 36px rgba(20,30,70,.2);animation:fb-o .16s ease-out;overflow:hidden}
body.fb-ovl #fbar .fb-h{margin-top:4px}
body.fb-ovl #fbar .fb-list{padding-top:4px}
@keyframes fb-o{from{opacity:0;transform:translateX(-10px)}}
@media(prefers-color-scheme:dark){#fbar .fb-i:hover,#fb-btn:hover{background:rgba(255,255,255,.07)}body.fb-ovl #fbar{box-shadow:0 10px 36px rgba(0,0,0,.55);border-color:var(--line)}}
@media(prefers-reduced-motion:reduce){body.fb-flow #fbar,body.fb-ovl #fbar{animation:none}}
