/* =============================================================================
 *  05-picker.css — iro.js 取色器外观
 *  原生色块被替换为 .clr-dot（与字段同高的圆角色块），点击弹出色轮
 * ========================================================================== */

/* 原生色块隐藏（仅在 iro 加载成功后添加此 class） */
input[type=color].native-color-hidden { display: none !important; }

.clr-dot {
  position: relative;
  width: 38px;
  height: 36px;
  flex: 0 0 38px;
  padding: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--field);
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.clr-dot::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 6px;
  background: var(--c, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .12);
}
.clr-dot:hover { border-color: var(--line-3); }
.clr-dot:active { transform: scale(.97); }
.clr-dot:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ------------------------------ 弹层 ------------------------------ */
.picker-pop {
  position: fixed;
  z-index: 260;
  width: 226px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 44px -12px rgba(16, 24, 40, .3), 0 0 0 1px rgba(16, 24, 40, .03);
  animation: picker-in .14s ease;
}
@keyframes picker-in { from { opacity: 0; transform: translateY(-4px); } }

.picker-body {
  display: flex;
  justify-content: center;
  padding: 2px 0 6px;
  line-height: 0;
}

.picker-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}
.picker-pop .hex {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: .4px;
  outline: none;
}
.picker-pop .hex:focus { background: #fff; border-color: var(--blue); }
.picker-pop #pickerOk { height: 30px; }

.picker-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-top: 9px;
}
.picker-swatches button {
  aspect-ratio: 1;
  border-radius: 5px;
  border: 1px solid rgba(16, 24, 40, .1);
  transition: transform .1s, box-shadow .1s;
}
.picker-swatches button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -6px rgba(16, 24, 40, .5);
}
