/* 装修模板库顶部页面分组下拉。独立文件，避免改动 template-library-embed.css 的超长单行样式。 */
#section-template-library .page-tab-menu {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

#section-template-library .page-tab-menu .page-tab-trigger {
  min-height: 32px;
  padding: 0 11px 0 14px;
  border: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #707a84;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

#section-template-library .page-tab-menu .page-tab-trigger:hover {
  color: #353c43;
  background: rgba(53, 60, 67, .06);
}

#section-template-library .page-tab-menu.is-active .page-tab-trigger {
  color: #fff;
  background: #353c43;
}

#section-template-library .page-tab-menu.is-active .page-tab-trigger:hover {
  background: #2f353b;
}

#section-template-library .page-tab-menu[data-component-mode="1"] .page-tab-trigger {
  cursor: default;
}

#section-template-library .page-tab-trigger .page-tab-chevron {
  width: 12px;
  height: 12px;
  color: currentColor;
  opacity: .7;
  transition: transform .22s cubic-bezier(.23, 1, .32, 1), opacity .18s ease;
}

#section-template-library .page-tab-menu.is-open .page-tab-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

#section-template-library .page-tab-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  min-width: 190px;
  padding: 5px;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px -18px rgba(22, 28, 35, .3), 0 2px 7px rgba(22, 28, 35, .07);
  transform-origin: top left;
  animation: page-tab-popover-in .18s cubic-bezier(.23, 1, .32, 1);
}

@keyframes page-tab-popover-in {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#section-template-library .page-tab-options {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

#section-template-library .page-tab-option {
  min-height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4b5560;
  cursor: pointer;
  font-size: 12px;
  outline: none;
  transition: background-color .14s ease, color .14s ease;
}

#section-template-library .page-tab-option:hover,
#section-template-library .page-tab-option:focus-visible {
  background: #f2f4f5;
  color: #272d33;
}

#section-template-library .page-tab-option.is-selected {
  background: #f4f5f6;
  color: #272d33;
}

#section-template-library .page-tab-option-label {
  flex: 1;
  white-space: nowrap;
}

#section-template-library .page-tab-option-hint {
  color: #a0a8b0;
  font-size: 9px;
  letter-spacing: .02em;
}

#section-template-library .page-tab-option-check {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #353c43;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .16s ease, transform .16s cubic-bezier(.23, 1, .32, 1);
}

#section-template-library .page-tab-option-check svg {
  width: 13px;
  height: 13px;
}

#section-template-library .page-tab-option.is-selected .page-tab-option-check {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 780px) {
  #section-template-library .page-tab-menu {
    flex: 1;
  }

  #section-template-library .page-tab-menu .page-tab-trigger {
    width: 100%;
    justify-content: center;
    padding: 0 8px;
  }

  #section-template-library .page-tab-popover {
    left: 0;
    right: 0;
    min-width: 0;
  }
}
