/* ===== 水印工具专属样式 =====
   页面骨架（top-nav / sidebar / accordion / btn / toast 等）复用 style.css 通用区，
   密度/位置网格复用 style.css 的 .wm-density-grid / .wm-pos-grid，本文件只放水印工具自己的样式。 */

/* ---------- 左侧：模板列表 ---------- */
.template-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.template-count {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.template-item {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
}

.template-item:hover {
  border-color: var(--primary-color);
}

.template-item.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
}

.template-thumb {
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-name {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-top: 8px;
}

/* ---------- 中部：预览区 ---------- */
.preview-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  min-width: 0;
}

.border-stage {
  position: relative;
}

.empty-placeholder {
  width: 360px;
  height: 360px;
  max-width: 80%;
  max-height: 80%;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.empty-placeholder:hover,
.border-stage.dragover .empty-placeholder {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: #f0f7ff;
}

.empty-placeholder i {
  font-size: 3rem;
}

.empty-placeholder p {
  font-size: 0.9rem;
}

/* 照片 + 水印画布容器 */
.wm-frame {
  position: relative;
  line-height: 0;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
  border-radius: 2px;
}

.wm-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.wm-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* ---------- 右侧：控件 ---------- */
.exif-checks-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
}

.exif-checks-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.text-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-dark);
  box-sizing: border-box;
}

.text-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.select-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
}

.select-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* 平铺 / 单个 排列方式按钮 */
.wm-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 四选项质量网格（2×2）与体积提示 */
.quality-grid-4 {
  grid-template-columns: repeat(2, 1fr) !important;
}

.quality-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: -6px 0 12px;
}

.btn-wm-mode {
  padding: 8px 4px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #f3f4f6;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  color: var(--text-dark);
  transition: all 0.2s;
}

.btn-wm-mode:hover {
  background: #e9ecef;
}

.btn-wm-mode.active {
  background: #fff;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ---------- 照片悬浮操作条（更换 / 移除） ---------- */
.frame-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 5;
  line-height: 1;
}

.border-stage:hover .frame-toolbar {
  opacity: 1;
}

.frame-toolbar button {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  font-size: 1.1rem;
  color: var(--text-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.frame-toolbar button:hover {
  color: var(--primary-color);
}

/* ---------- 示例预览标记 ---------- */
.demo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.5px;
}
