/* DB-V04-ASSET-D-RESTORE-08
 * D版视觉结构恢复：轻量工具行、右侧筛选/多选、自然比例瀑布流。
 * 仅作用于新的隔离候选；账户、API、数据和项目页规则保持原样。
 */

.library-section #libraryFigmaTools.library-final-layout {
  display: block;
  min-width: 0;
  overflow: visible;
}

.library-section .library-search-suggestions-standalone {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  max-width: 640px;
  margin-left: auto;
  padding: 6px 4px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.library-section .library-search-suggestions-standalone::-webkit-scrollbar {
  display: none;
}

.library-section .library-search-suggestions-standalone button {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid #e4e8f0;
  border-radius: 999px;
  background: #f8f9fc;
  color: #7a8798;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.library-section .library-figma-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  min-height: 51px;
  gap: 12px;
  padding: 2px 0;
  border-bottom: 1px solid #e5e9f1;
  background: transparent;
}

.library-section #resourceTypeTabs {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  max-width: 58%;
  width: auto;
  gap: 4px;
  padding: 0;
  overflow-x: auto;
  background: transparent;
  scrollbar-width: none;
}

.library-section #resourceTypeTabs::-webkit-scrollbar {
  display: none;
}

.library-section #resourceTypeTabs button {
  min-height: 31px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7c8498;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}

.library-section #resourceTypeTabs button.active {
  border: 1px solid #e1e6ef;
  background: #fff;
  box-shadow: 0 2px 8px rgba(44, 62, 84, .06);
  color: #4f478f;
  font-weight: 600;
}

.library-section #filterBar {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0;
  overflow: visible !important;
  border: 0;
  background: transparent;
}

.library-section #filterBar .asset-filter-menu-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  width: max-content;
  max-width: 100%;
  gap: 5px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}

.library-section #filterBar .asset-filter-menu-row::-webkit-scrollbar {
  display: none;
}

.library-section #filterBar .identity-filter-group {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  gap: 5px;
  overflow: visible !important;
}

.library-section #filterBar .identity-filter-group > .filter-popover {
  flex: 0 0 auto;
  min-width: 0;
}

.library-section #filterBar .filter-popover-trigger {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #657589;
  font-size: 9px;
  line-height: 1.25;
  white-space: nowrap;
}

.library-section #filterBar .filter-popover-trigger:hover,
.library-section #filterBar .filter-popover.is-open .filter-popover-trigger {
  background: #f0f3f9;
  color: #31567f;
}

.library-section #filterBar .work-domain-menu,
.library-section #filterBar .work-type-menu,
.library-section #filterBar .filter-popover-menu {
  z-index: 360;
}

.library-section #filterBar .filter-popover-menu[hidden],
.library-section #filterBar [hidden] {
  display: none !important;
}

.library-section #libraryBatchControls {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
}

.library-section #libraryBatchToggle {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  background: #fff;
  color: #657589;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.library-section #libraryBatchSelectedActions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.library-section #libraryBatchOperations {
  position: relative;
  flex: 0 0 auto;
}

.library-section #libraryBatchOperations > summary {
  min-height: 28px;
  padding: 6px 8px;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  background: #fff;
  color: #657589;
  cursor: pointer;
  font-size: 9px;
  line-height: 1.25;
  list-style: none;
  white-space: nowrap;
}

.library-section #libraryBatchOperations > summary::-webkit-details-marker {
  display: none;
}

.library-section #libraryBatchOperations .library-batch-menu {
  position: absolute;
  z-index: 370;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  padding: 6px;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(38, 55, 80, .12);
}

.library-section .library-semantic-row {
  display: none !important;
}

.library-section .masonry:not(.is-grouped),
.library-section .masonry-group {
  --columns: 244px;
  min-width: 0;
  padding: 12px 24px 60px;
  overflow: visible;
}

.library-section .asset-card {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.library-section .asset-thumb {
  border-radius: 12px;
  box-shadow: none;
}

.library-section .asset-thumb img {
  display: block;
  object-fit: cover;
}

.library-section .asset-thumb.transparent img {
  object-fit: contain;
  padding: 8%;
}

/* Only the no-preview media region changes temperature; the card body and
 * real-cover path remain untouched. */
.project-archive-figma .paf-cover.neutral-folder,
.project-archive-figma .paf-cover.neutral-folder .paf-neutral-cover {
  border-color: rgba(88, 113, 146, .20) !important;
  background: #e7eef6 !important;
}

.project-archive-figma .paf-cover.neutral-folder .paf-folder-back {
  background: #d4dfeb !important;
}

.project-archive-figma .paf-cover.neutral-folder .paf-folder-paper {
  background: #f8fafc !important;
}

.project-archive-figma .paf-cover.neutral-folder .paf-folder-front {
  background: #c6d3e1 !important;
}

@media (max-width: 760px) {
  .library-section .library-search-suggestions-standalone {
    justify-content: flex-start;
    margin-left: 0;
  }

  .library-section .library-figma-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .library-section #resourceTypeTabs,
  .library-section #filterBar {
    max-width: 100%;
    width: 100%;
  }

  .library-section #filterBar .asset-filter-menu-row {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ALIGN-10: keep the existing suggestion interaction in the search component's
   flow, while reserving the D-layout suggestion band before the tool row. */
.library-section .topbar .search-wrap {
  flex: 0 0 420px;
  width: 420px;
  height: 38px;
  overflow: visible;
}

.library-section .topbar .search-wrap > .search {
  width: 420px;
}

.library-section .topbar .search-wrap > .library-search-suggestions-standalone {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 420px;
  max-width: 420px;
  height: 24px;
  min-height: 24px;
  margin: 5px 0 0 !important;
  padding: 0 !important;
  overflow: visible;
}

.library-section #libraryFigmaTools.library-final-layout {
  padding-top: 24px;
}
