/* ============================================================
   id-photo/style.css — 证件照制作工具专属样式
   依赖共享 style.css 的变量与基础组件（.panel/.btn/.seg/.field/.hint/.chip）
   ============================================================ */

/* ---------- 整体布局：左画布 + 右面板 ---------- */
.idp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.idp-panels { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 980px) {
  .idp-layout { grid-template-columns: 1fr; }
}

/* ---------- 画布区 ---------- */
.idp-stage-panel { position: sticky; top: 16px; }
@media (max-width: 980px) { .idp-stage-panel { position: static; } }

.idp-stage-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

.idp-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background:
    conic-gradient(#e9edf3 25%, #f7f9fc 0 50%, #e9edf3 0 75%, #f7f9fc 0) 0 0/22px 22px;
  /* 棋盘格：暗示透明区域 */
  transition: border-color .15s;
}
.idp-stage.dragover { border-color: var(--brand); border-style: solid; }

.idp-stage canvas {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(23, 43, 77, .14);
  cursor: grab;
  touch-action: none; /* 手势交给 pointer 事件 */
}
.idp-stage canvas:active { cursor: grabbing; }
.idp-stage.painting canvas { cursor: crosshair; }

/* 空状态遮罩（未导入时显示） */
.idp-drop {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(2px);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 18px;
}
.idp-drop .ic { font-size: 40px; }
.idp-drop .t1 { font-size: 16px; font-weight: 600; color: var(--text); }
.idp-drop .t2 { font-size: 12.5px; color: var(--text-3); }
.idp-drop:hover { background: rgba(234, 240, 252, .9); }
.idp-drop[hidden] { display: none; }

/* ---------- 表单细节 ---------- */
.field label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.field.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.field .sl { margin-top: 8px; }

label.check {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text); cursor: pointer;
  padding: 4px 0;
}
label.check input { width: 16px; height: 16px; accent-color: var(--brand); }

input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="color"] {
  width: 42px; height: 30px; padding: 2px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; cursor: pointer; vertical-align: middle;
}
input[type="number"], input[type="text"] {
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 13.5px;
  width: 84px;
}

.btn.big { width: 100%; padding: 11px 0; font-size: 15px; }

/* ---------- 进度条 ---------- */
.idp-progress { margin: 10px 0 4px; }
.idp-progress .bar {
  height: 8px; border-radius: 99px; background: var(--bg-soft, #eef2f7);
  overflow: hidden; margin-bottom: 5px;
}
.idp-progress .bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand), #6ea8e8);
  border-radius: 99px; transition: width .2s;
}
.idp-progress span { font-size: 12.5px; color: var(--text-3); }

/* ---------- 说明列表 ---------- */
.idp-notes { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.9; }
.idp-notes b { color: var(--text); }
