/* Unified native select treatment for the workspace UI. */
html body .workspace-app select:not([multiple]):not([size]) {
  box-sizing: border-box;
  min-height: 42px;
  padding: 0 40px 0 14px;
  border: 1px solid var(--inspector-action-border, #d4d4d4);
  border-radius: 9px;
  outline: 0;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4.5 6.25 3.5 3.5 3.5-3.5' stroke='%23525252' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 16px;
  color: var(--inspector-action-text, #444);
  font-family: "Yuchao PingFang SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  color-scheme: light;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

html body .workspace-app select:not([multiple]):not([size]):hover:not(:disabled) {
  border-color: var(--inspector-action-hover-border, #a3a3a3);
  background-color: var(--inspector-action-hover, #fff);
}

html body .workspace-app select:not([multiple]):not([size]):focus,
html body .workspace-app select:not([multiple]):not([size]):focus-visible {
  border-color: var(--feature-accent, #525252);
  outline: 0;
  box-shadow: 0 0 0 3px var(--feature-focus, rgba(82, 82, 82, 0.14));
}

html body .workspace-app select:not([multiple]):not([size]):disabled {
  border-color: var(--inspector-action-disabled-border, #e5e5e5);
  background-color: var(--inspector-action-disabled-surface, #f5f5f5);
  color: var(--inspector-action-disabled-text, #a3a3a3);
  cursor: not-allowed;
  opacity: 1;
}

html body .workspace-app select option {
  background: #fff;
  color: #444;
  font-family: "Yuchao PingFang SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 400;
}

/* Enhanced select: the native control remains the source of truth while the
   trigger and listbox provide a consistent cross-platform visual surface. */
.workspace-app .yc-select {
  --yc-select-accent: var(--feature-accent, #525252);
  --yc-select-focus: var(--feature-focus, rgba(82, 82, 82, 0.14));
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  vertical-align: middle;
}

.workspace-app .feature-config-dropdown > .yc-select {
  grid-area: 1 / 1;
}

.workspace-app .yc-select > .yc-select-native {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.workspace-app .yc-select > .yc-select-native:focus,
.workspace-app .yc-select > .yc-select-native:focus-visible {
  outline: 0;
  box-shadow: none;
}

html body .workspace-app .folder-group-manage-item select.yc-select-native,
.workspace-app .folder-group-manage-item .yc-select-trigger {
  height: 36px;
  min-height: 36px;
}

.workspace-app .yc-select-trigger {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 0 13px 0 14px;
  border: 1px solid var(--inspector-action-border, #d4d4d4);
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: var(--inspector-action-text, #444);
  font-family: "Yuchao PingFang SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.workspace-app .yc-select-trigger:hover:not(:disabled) {
  border-color: var(--inspector-action-hover-border, #a3a3a3);
  background: var(--inspector-action-hover, #fff);
}

.workspace-app .yc-select-trigger:focus-visible,
.workspace-app .yc-select.is-open .yc-select-trigger {
  border-color: var(--yc-select-accent);
  outline: 0;
  box-shadow: 0 0 0 3px var(--yc-select-focus);
}

.workspace-app .yc-select-trigger:disabled {
  border-color: var(--inspector-action-disabled-border, #e5e5e5);
  background: var(--inspector-action-disabled-surface, #f5f5f5);
  color: var(--inspector-action-disabled-text, #a3a3a3);
  box-shadow: none;
  cursor: not-allowed;
}

.workspace-app .yc-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-app .yc-select-chevron {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4.5 6.25 3.5 3.5 3.5-3.5' stroke='%23525252' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform 140ms ease;
}

.workspace-app .yc-select.is-open .yc-select-chevron {
  transform: rotate(180deg);
}

.feature-config-dropdown:has(> .yc-select) > svg,
.feature-config-dropdown:has(> .yc-select) > i,
.feature-config-dropdown:has(> .yc-select) > .feature-config-dropdown-arrow {
  display: none;
}

.yc-select-menu {
  --yc-select-accent: #525252;
  position: fixed;
  z-index: 2147483000;
  display: grid;
  gap: 2px;
  max-height: min(280px, calc(100vh - 24px));
  margin: 0;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14), 0 3px 10px rgba(0, 0, 0, 0.06);
  color: #444;
  font-family: "Yuchao PingFang SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.yc-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  outline: 0;
  background: transparent;
  color: #444;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
}

.yc-select-option:hover:not(:disabled),
.yc-select-option:focus-visible {
  background: #f5f5f5;
  color: #262626;
}

.yc-select-option.is-selected {
  background: color-mix(in srgb, var(--yc-select-accent) 9%, white);
  color: var(--yc-select-accent);
  font-weight: 500;
}

.yc-select-option:disabled {
  color: #b5b5b5;
  cursor: not-allowed;
}

.yc-select-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yc-select-option-check {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  opacity: 0;
  background: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m3.75 8.25 2.5 2.5 6-6' stroke='%23525252' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.yc-select-option.is-selected .yc-select-option-check {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-app .yc-select-trigger,
  .workspace-app .yc-select-chevron {
    transition: none;
  }
}

/* The folder member button is a peer of the compact select, not a selected
   workspace capsule. Keep every interaction state on the same thin outline. */
html body .workspace-app .folder-group-manage-item .workspace-group-capsule,
html body .workspace-app .folder-group-manage-item .workspace-group-capsule[aria-pressed="true"] {
  border: 1px solid #d0d0d0;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  box-shadow: none;
}

html body .workspace-app .folder-group-manage-item .yc-select-trigger {
  border: 1px solid #d0d0d0;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

html body .workspace-app .folder-group-manage-item .workspace-group-capsule:hover,
html body .workspace-app .folder-group-manage-item .workspace-group-capsule:focus,
html body .workspace-app .folder-group-manage-item .workspace-group-capsule:focus-visible,
html body .workspace-app .folder-group-manage-item .workspace-group-capsule[aria-pressed="true"]:focus-visible {
  border-color: #a3a3a3;
  outline: 0;
  background: #fff;
  box-shadow: none;
}

html body .workspace-app .folder-group-manage-item .yc-select-trigger:hover:not(:disabled),
html body .workspace-app .folder-group-manage-item .yc-select-trigger:focus,
html body .workspace-app .folder-group-manage-item .yc-select-trigger:focus-visible,
html body .workspace-app .folder-group-manage-item .yc-select.is-open .yc-select-trigger {
  border-color: #a3a3a3;
  outline: 0;
  background: #fff;
  box-shadow: none;
}
