/* ==========================================================
   工作台名称自定义 · 样式
   ========================================================== */

/* ---------- 标题可点击 ---------- */
.ws-name {
  cursor: pointer;
  border-radius: 5px;
  padding: 1px 4px;
  margin: 0 -4px;
  transition: background .14s, color .14s;
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-name:hover {
  background: rgba(118, 118, 128, .12);
}
.ws-name:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.ws-name:active {
  background: rgba(118, 118, 128, .2);
}

/* ---------- 铅笔按钮 ---------- */
.ws-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 3px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .16s, background .14s, color .14s, transform .16s;
  flex: none;
}
.brand:hover .ws-edit {
  opacity: 1;
  transform: none;
}
.ws-edit:hover {
  background: rgba(118, 118, 128, .14);
  color: var(--text);
}
/* 触屏没有 hover，常显 */
@media (hover: none) {
  .ws-edit { opacity: 1; transform: none; }
}

/* ---------- 弹窗内预览 ---------- */
.fld-hint {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text3);
  margin-top: -2px;
}

.ws-preview-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(118, 118, 128, .07);
  border: .5px solid var(--line);
}
.ws-preview-lbl {
  font-size: 10.5px;
  color: var(--text3);
  flex: none;
}
.ws-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.ws-preview .logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  flex: none;
}
.ws-preview-name {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 767px) {
  .ws-name { max-width: 46vw; font-size: 14.5px; }
}

/* ---------- 深色 ---------- */
@media (prefers-color-scheme: dark) {
  .ws-preview-wrap { background: rgba(255, 255, 255, .07); }
}
