.library-filters {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--library-filters-top, 128px);
  /* Grow with the open sections; reserve room for both actions in the viewport. */
  max-height: var(--library-filters-max-height, calc(100dvh - 144px));
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  color: #000;
  box-shadow: 0 2px 16px #0000001a;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}
.library-filters__heading {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}
.library-filters__heading svg { flex: none; color: #003c71; }
.library-filters__groups {
  flex: 0 1 auto;
  min-height: 64px;
  padding: 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e1e3e5 #f5f8fb;
  border-block: 1px solid;
  border-image: linear-gradient(90deg, #00eeff, #0153cc) 1;
}
.library-filter { position: relative; padding: 8px; border-radius: 8px; background: #f2f7ff; }
.library-filter + .library-filter { margin-top: 33px; }
.library-filter + .library-filter::before { content: ""; position: absolute; top: -17px; left: 0; right: 0; height: 1px; background: #ccc; }
.library-filter__heading { display: flex; align-items: center; gap: 8px; min-height: 24px; list-style: none; cursor: pointer; font-size: 12px; font-weight: 500; line-height: 15px; }
.library-filter__heading::-webkit-details-marker { display: none; }
.library-filter__heading svg { flex: none; color: #61737b; }
.library-filter__label { flex: 1; min-width: 0; }
.library-filter__heading.filter-btn--active { background: transparent; color: #000; }
.library-filter__heading .filter-badge { display: inline; width: auto; height: auto; background: transparent; color: inherit; font: inherit; }
.library-filter__heading .filter-badge::before { content: "("; }
.library-filter__heading .filter-badge::after { content: ")"; }
.library-filter__chevron { width: 7px; height: 7px; border-right: 1px solid #61737b; border-bottom: 1px solid #61737b; transform: rotate(45deg); margin: -4px 4px 0; flex: none; }
.library-filter[open] .library-filter__chevron { transform: rotate(225deg); margin-top: 4px; }
.library-filter__options { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.library-filter__option { display: flex; align-items: flex-start; gap: 10px; padding: 10px; color: #425562; font-size: 14px; font-weight: 500; line-height: 17px; cursor: pointer; overflow-wrap: anywhere; }
.library-filter__option input { appearance: none; flex: none; width: 14px; height: 14px; padding: 0; margin: 1px 0 0; border: 1px solid #425562; border-radius: 3px; background: #fff; cursor: pointer; }
.library-filter__option input:checked { background-color: #425562; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m3 7 3 3 5-6' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.library-filter__option:hover { background: #e5eeff; border-radius: 4px; }
.library-filter__heading:focus-visible, .library-filter__option input:focus-visible, .library-filters__actions :focus-visible { outline: 2px solid #0153cc; outline-offset: 3px; }
.library-filter__empty { padding: 10px; font-size: 12px; color: #61737b; }
.library-filters__actions { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; }
.library-filters__actions .filter-clear-btn { padding: 7px 12px; border: 0.8px solid #000; border-radius: 4px; color: #000; font-size: 14px; font-weight: 400; line-height: 14px; }
.library-filters__actions .filter-apply-btn { padding: 8px 12px; border: 0; border-radius: 4px; background: #0153cc; color: #fff; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 14px; cursor: pointer; }
.library-filters__actions .filter-apply-btn:hover { background: #003c99; }
.library-filters__actions .filter-clear-btn:hover { background: #f2f7ff; }
.library-filters--streams .filter-apply-btn { padding: 12px 16px; border-radius: 8px; font-size: 16px; }
@media (max-width: 1000px) { .library-filters { position: static; } }
