/* FILTER-P0-25: two visible cascading work filters; retired entries stay data-only. */
.library-section #workDomainFilter,
.library-section #workTypeFilter {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.library-section #workDomainFilter .filter-popover-trigger,
.library-section #workTypeFilter .filter-popover-trigger {
  min-height: 28px;
  padding: 5px 9px !important;
  border: 0;
  border-radius: 8px;
  background: transparent !important;
  color: #657589 !important;
  font-size: 10px !important;
  white-space: nowrap;
}
.library-section #workDomainFilter .filter-popover-trigger:hover,
.library-section #workTypeFilter .filter-popover-trigger:hover,
.library-section #workDomainFilter.is-open .filter-popover-trigger,
.library-section #workTypeFilter.is-open .filter-popover-trigger {
  background: #f6f4fc !important;
  color: #564aa1 !important;
}
.library-section .work-domain-menu,
.library-section .work-type-menu {
  position: absolute;
  z-index: 360;
  top: calc(100% + 6px);
  display: block;
  box-sizing: border-box;
  max-height: min(340px, calc(100vh - 210px));
  overflow: hidden;
  padding: 8px;
  border: 1px solid #e1e6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(40, 54, 76, .15);
}
.library-section .work-domain-menu { left: 0; width: max-content; min-width: 168px; max-width: min(230px, calc(100vw - 28px)); }
.library-section .work-type-menu { left: auto !important; right: 0; width: max-content; min-width: 182px; max-width: min(310px, calc(100vw - 28px)); }
.library-section .work-domain-menu[hidden],
.library-section .work-type-menu[hidden] { display: none !important; }
.library-section .work-cascade-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(270px, calc(100vh - 280px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.library-section .work-cascade-list > button {
  min-height: 31px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #536176;
  font: inherit;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.library-section .work-cascade-list > button:hover { background: #f4f2fb; }
.library-section .work-cascade-list > button.active { background: #f0edfb; color: #564aa1; font-weight: 600; }
.library-section .work-cascade-list > button small {
  display: block;
  margin-top: 2px;
  color: #9aa4b3;
  font-size: 9px;
  font-weight: 400;
}

/* Recycle bin lives in the existing top-right ··· menu. */
.view-menu-divider { height: 1px; margin: 7px 2px; background: #edf0f5; }
.view-menu-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #58667a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.view-menu-action:hover { background: #f5f7fb; color: #3f4f66; }
.view-menu-action span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.view-menu-action b { font-size: 11px; font-weight: 600; }
.view-menu-action small { color: #929dad; font-size: 9px; line-height: 1.35; }
.view-menu-action i { color: #9aa4b3; font-style: normal; }

@media (max-width: 768px) {
  .library-section #workDomainFilter .filter-popover-trigger,
  .library-section #workTypeFilter .filter-popover-trigger { font-size: 9px !important; padding: 5px 7px !important; }
  .library-section .work-domain-menu,
  .library-section .work-type-menu { left: auto !important; right: 0 !important; }
}
