/* DB-V04-OWNER-FILTER-24: real hit targets for the four library filter entries.
   Popovers must escape the horizontally scrollable filter row; otherwise Safari
   paints an opened panel but clips it to the row's 46px height. */
.library-section .filter-bar,
.library-section .filter-bar .asset-filter-menu-row,
.library-section .filter-bar .identity-filter-group {
  overflow: visible !important;
}
.library-section .filter-bar #moreAssetFilters {
  z-index: 260;
}
.library-section .filter-bar #moreAssetFilters[hidden],
.library-section .filter-bar .filter-popover-menu[hidden] {
  display: none !important;
}
.library-section .filter-bar .filter-popover-trigger:focus-visible,
.library-section .filter-bar .filter-more-trigger:focus-visible,
.library-section .filter-bar .professional-feature-group button:focus-visible,
.library-section .filter-bar .project-link-list button:focus-visible,
.library-section .filter-bar .filter-popover-footer button:focus-visible {
  outline: 2px solid #8f82e8;
  outline-offset: 2px;
}
@media (max-width: 1280px) {
  .library-section .filter-bar .asset-filter-menu-row {
    flex-wrap: wrap !important;
    row-gap: 5px;
    overflow: visible !important;
  }
  .library-section .filter-bar {
    overflow: visible !important;
  }
}
.library-section .professional-feature-menu {
  right: 0;
  left: auto;
  width: min(470px, calc(100vw - 24px));
  max-height: min(460px, calc(100vh - 190px));
  overflow: auto;
  padding: 10px;
  display: block;
}
.library-section .professional-feature-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.library-section .professional-feature-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 5px;
  color: #53647e;
  font-size: 11px;
  font-weight: 600;
}
.library-section .professional-feature-group header small {
  color: #9aa5b4;
  font-size: 9px;
  font-weight: 400;
}
.library-section .professional-feature-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.library-section .professional-feature-group button {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #e4e9f2;
  border-radius: 7px;
  background: #f8fafd;
  color: #60718a;
  font: inherit;
  font-size: 10px;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.library-section .professional-feature-group button:hover {
  border-color: #d7d1ef;
  background: #f5f3fc;
  color: #5a4da5;
}
.library-section .professional-feature-group button.active {
  border-color: #bdb3ee;
  background: #ebe7ff;
  color: #5548a3;
}
.library-section .project-link-menu {
  right: 0;
  left: auto;
  width: min(320px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 190px));
  overflow: auto;
  padding: 6px;
  display: block;
}
.library-section .project-link-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.library-section .project-link-list button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #53647e;
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.library-section .project-link-list button:hover,
.library-section .project-link-list button.active {
  background: #f0f3f9;
  color: #31567f;
}
.library-section .project-link-all {
  border-bottom: 1px solid #edf0f5 !important;
  border-radius: 8px 8px 0 0 !important;
}
.library-section .filter-popover-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px 1px;
  border-top: 1px solid #edf0f5;
  margin-top: 8px;
}
.library-section .filter-popover-footer button {
  padding: 5px 8px;
  border: 1px solid #e4e9f2;
  border-radius: 7px;
  background: #fff;
  color: #657589;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.library-section .filter-popover-footer button:hover {
  border-color: #d7d1ef;
  color: #5a4da5;
}
.library-section .filter-popover-footer small {
  color: #9aa5b4;
  font-size: 9px;
  line-height: 1.4;
}
.library-section .filter-empty-note {
  margin: 0;
  padding: 18px 12px;
  color: #8b95a5;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
@media (max-width: 768px) {
  .library-section .professional-feature-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* High-specificity containment fix: the CLOSURE-23 row rule used an id and
   overflow-x:auto; keep it from clipping the newly opened panels. */
.library-section .library-figma-row #filterBar,
.library-section .library-figma-row #filterBar .asset-filter-menu-row,
.library-section .library-figma-row #filterBar .identity-filter-group {
  overflow: visible !important;
}
