/* /var/www/html/assets/css/watermark.css
   이미지 워터마크 도구 스타일. 캔버스 미리보기 + 옵션 컨트롤. style.css 다크 테마 위에 얹는다.
   이미지는 업로드되지 않고 브라우저 canvas에서만 처리된다. */

.wm-tool {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 8px 0 34px;
}

/* 드롭 / 업로드 영역 */
.wm-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  padding: 28px;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 245, 242, 0.7);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.wm-drop:hover, .wm-drop.is-over {
  border-color: #8fdcbc;
  background: rgba(143, 220, 188, 0.08);
  color: var(--text);
}
.wm-drop strong { font-size: 1.02rem; color: var(--text); }
.wm-drop span { font-size: 0.88rem; }
.wm-drop .wm-drop-icon {
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  display: grid; place-items: center; margin-bottom: 4px;
}
.wm-drop .wm-drop-icon::before {
  content: ""; width: 20px; height: 16px; border: 2px solid rgba(245,245,242,0.6);
  border-radius: 3px;
}

/* 편집 영역: 미리보기 + 컨트롤 */
.wm-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.wm-canvas-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background-image:
    linear-gradient(45deg, #2a2a2a 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a2a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a2a 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a2a 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  background-color: #1a1a1a;
}
#wm-canvas { max-width: 100%; height: auto; display: block; }

.wm-controls { display: flex; flex-direction: column; gap: 15px; min-width: 0; }

.wm-field { display: flex; flex-direction: column; gap: 8px; }
.wm-field label, .wm-group-label {
  font-size: 0.88rem; font-weight: 700; color: rgba(245, 245, 242, 0.82);
}

.wm-input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04); color: var(--text); font-size: 1rem;
}
.wm-input:focus { outline: none; border-color: rgba(255, 255, 255, 0.5); }

.wm-group { display: flex; flex-direction: column; gap: 8px; }

/* 세그먼트 버튼 */
.wm-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.wm-seg button {
  padding: 8px 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); color: rgba(245, 245, 242, 0.82);
  font-size: 0.86rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.wm-seg button:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.wm-seg button.is-on { background: #f5f5f2; border-color: #f5f5f2; color: #141414; }

/* 색상 스와치 */
.wm-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wm-swatches button {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25); background: var(--sw, #fff);
  cursor: pointer; padding: 0; transition: transform 0.12s ease, border-color 0.12s ease;
}
.wm-swatches button:hover { transform: scale(1.08); }
.wm-swatches button.is-on { border-color: #8ab4ff; box-shadow: 0 0 0 2px rgba(138, 180, 255, 0.4); }
.wm-color {
  width: 40px; height: 30px; padding: 0; border: 1px solid var(--line);
  border-radius: 7px; background: transparent; cursor: pointer;
}

.wm-range { width: 100%; accent-color: #8fdcbc; cursor: pointer; }

.wm-check { position: relative; display: inline-flex; }
.wm-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.wm-check > span {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px 9px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); color: rgba(245, 245, 242, 0.82);
  font-size: 0.88rem; font-weight: 600; line-height: 1; transition: background 0.15s ease, color 0.15s ease;
}
.wm-check > span::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid rgba(245, 245, 242, 0.4);
}
.wm-check input:checked + span { background: #f5f5f2; border-color: #f5f5f2; color: #141414; }
.wm-check input:checked + span::before {
  border-color: #141414; background: #141414
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
}

.wm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.wm-note { margin: 0; min-height: 1.2em; font-size: 0.88rem; color: rgba(245, 245, 242, 0.6); }
.wm-note.is-ok { color: #8fe0a8; }
.wm-note.is-error { color: #f0a3a3; }

/* 안내 */
.wm-guide { margin: 34px 0 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.02); }
.wm-guide h2 { margin: 0 0 14px; font-size: 1.3rem; }
.wm-guide h3 { margin: 18px 0 6px; font-size: 1.02rem; }
.wm-guide p, .wm-guide li { color: rgba(245, 245, 242, 0.72); line-height: 1.7; }
.wm-guide ol, .wm-guide ul { margin: 0; padding-left: 20px; }
.wm-guide li + li { margin-top: 6px; }
.wm-guide p { margin: 0 0 8px; }

@media (max-width: 820px) {
  .wm-editor { grid-template-columns: 1fr; }
}

/* ---------- 이미지 압축(공유 UI 재사용) ---------- */
.ic-stat {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: rgba(245, 245, 242, 0.78);
}
.ic-stat b { color: var(--text); font-variant-numeric: tabular-nums; }
.ic-stat .ic-down { color: #8fe0a8; font-weight: 700; }
.wm-range-row { display: flex; align-items: center; gap: 12px; }
.wm-range-row .wm-range { flex: 1; }
.wm-range-val { min-width: 3em; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.wm-canvas-wrap canvas { max-width: 100%; height: auto; display: block; }
