/* 触发按钮样式（保留但移除交互，可按需删除） */
.cus-color-card {
  margin-bottom: 20px;
  margin-bottom: 0px;
}
.custom-color-picker {
  position: relative;
  display: block;
  width: 100%;
}
.color-trigger {
  font-size: 14px;
  color: #fff;
  text-align: left;
  border-radius: 4px;
  background-color: transparent;
  color: #606266;
  /* 移除cursor: pointer，取消可点击样式 */
  transition: border-color 0.2s;
}
.color-preview {
  border: 1px solid #666;
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 2px;
  background: #409eff;

  width: 76px;
  height: 27px;
  border-radius: 4px;
  background-color: rgb(141, 204, 27);
}

.color-trigger span {
  font-size: 14px;
  color: #fff;
}

/* 核心修改1：颜色选择面板默认显示（删除display: none） */
.color-panel {
  position: static;
  top: 42px;
  left: 0;
  width: 100%;
  padding: 0px;
  background: transparent;

  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  z-index: 1000;
  /* display: none; 移除这行，默认展示 */
}
/* 无需再用show类，可删除该样式 */
/* .color-panel.show { display: block; } */

/* 主选色区（饱和度+明度） */
.color-main {
  border-radius: 4px;
  width: 100%;
  height: 108px;
  position: relative;
  margin-bottom: 10px;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}
.color-main-mask {
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}
.color-white-mask {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0));
}
.color-black-mask {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, #000, transparent);
}
.main-handle {
  z-index: 2;
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  top: 0;
  left: 100%;
  transform: translate(-50%, -50%);
}

/* 色相条 */
.color-hue {
  width: 100%;
  height: 16px;
  position: relative;
  margin-bottom: 15px;
  background: linear-gradient(
    to right,
    red,
    orange,
    yellow,
    lime,
    cyan,
    blue,
    magenta,
    red
  );
  border-radius: 0px;
  cursor: pointer;
}
.hue-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transform: translate(-50%, -50%);
  left: 0;
}

/* 透明度调节条 */
.color-alpha {
  display: none;
  width: 100%;
  height: 10px;
  position: relative;
  margin-bottom: 15px;
  border-radius: 5px;
  background: repeating-linear-gradient(
    45deg,
    #f0f0f0 0,
    #f0f0f0 4px,
    #fff 4px,
    #fff 8px
  );
}
.alpha-mask {
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #000, rgba(0, 0, 0, 0));
  border-radius: 5px;
}
.alpha-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transform: translate(-50%, -50%);
  left: 100%;
}

/* 颜色值输入框 */
.color-input {
  display: none;
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}
.color-input input {
  flex: 1;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  outline: none;
  font-size: 12px;
}
.color-input input:focus {
  border-color: #409eff;
}

/* 预设色板 */
.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;

  display: none;
}
.palette-item {
  width: 20px;
  height: 20px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid #e6e6e6;
}
.palette-item:hover {
  transform: scale(1.1);
}
