/* /tool/watermark-remover — 제미나이 워터마크 제거 도구 (완전 클라이언트사이드). 2026-09-22 신규. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  background: #f5f6f8;
  color: #1f2937;
}

/* ── 상단 네비 (view/tool/_e/topnav.php 공통 partial, navPrefix='wr') ── */
.wr-topnav { border-bottom: 1px solid #e2e6ec; background: #fff; }
.wr-topnav-left {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 16px;
  max-width: 1100px; margin: 0 auto; padding: 14px 24px; position: relative;
}
.wr-site-brand { font-weight: 900; font-size: 16px; color: #7c3aed; text-decoration: none; flex-shrink: 0; }
.wr-topnav a:not(.wr-site-brand) {
  color: #556; text-decoration: none; font-size: 13px;
  display: inline-flex; align-items: center; gap: 4px;
}
.wr-topnav a:not(.wr-site-brand):hover { color: #7c3aed; }

.wr-tool-switcher { position: relative; }
.wr-tool-switcher-btn .fa-chevron-down { font-size: 10px; margin-left: 2px; transition: transform .15s; }
.wr-tool-switcher.open .fa-chevron-down { transform: rotate(180deg); }
.wr-tool-switcher-panel {
  display: none; position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px;
  background: #fff; border: 1px solid #e2e6ec; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: 6px; z-index: 100;
}
.wr-tool-switcher.open .wr-tool-switcher-panel { display: block; }
.wr-tool-switcher-item {
  display: flex !important; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  font-size: 13px !important; color: #334155 !important; white-space: nowrap;
}
.wr-tool-switcher-item:hover { background: #f5f6f8; color: #334155 !important; }
.wr-tool-switcher-item.on { background: #f3ecfe; color: #7c3aed !important; font-weight: 700; }
.wr-tool-switcher-item i { width: 16px; text-align: center; color: #7c3aed; }

.wr-nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid #e2e6ec; border-radius: 8px;
  color: #334155; font-size: 16px; padding: 6px 10px; cursor: pointer; flex-shrink: 0;
}
.wr-nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
@media (max-width: 720px) {
  .wr-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .wr-nav-links {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 8px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border: 1px solid #e2e6ec; border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: 6px; min-width: 180px; z-index: 60;
  }
  .wr-nav-links.open { display: flex; }
  .wr-nav-links a { padding: 10px 12px; border-radius: 8px; font-size: 13px !important; }
  .wr-nav-links a:hover { background: #f5f6f8; }
}

/* ── 페이지 ── */
.wr-page { max-width: 720px; margin: 0 auto; padding: 32px 16px 60px; }

.wr-header { margin-bottom: 20px; }
.wr-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  color: #6d28d9; background: #f3ecfe; border: 1px solid #ddd0fb;
  border-radius: 50px; padding: 5px 12px; margin: 0 6px 12px 0;
}
.wr-badge-alt { color: #b45309; background: #fef3e2; border-color: #fcd9a8; }
.wr-header h1 { font-size: 24px; margin: 0 0 8px; font-weight: 900; letter-spacing: -.01em; }
.wr-header h1 i { color: #7c3aed; margin-right: 8px; }
.wr-sub { color: #64748b; font-size: 13px; margin: 0; line-height: 1.6; }

.wr-lib-warning {
  background: #fdecea; border: 1px solid #f5c2c0; color: #9c2b26;
  border-radius: 8px; padding: 12px 16px; font-size: 13px; margin: 16px 0;
}

.wr-ad-slot { text-align: center; padding: 14px 0; }

/* ── 업로드 영역 ── */
.wr-drop-zone {
  margin: 8px 0 20px; padding: 40px 20px; border: 2px dashed #c9b6f7;
  border-radius: 14px; background: #fff; text-align: center; color: #667;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.wr-drop-zone:hover { border-color: #9d6df0; box-shadow: 0 8px 24px rgba(124,58,237,.08); }
.wr-drop-zone.drag-over { background: #faf7ff; border-color: #7c3aed; box-shadow: 0 8px 24px rgba(124,58,237,.18); }
.wr-drop-icon { font-size: 30px; color: #c9b6f7; margin-bottom: 10px; transition: color .15s; }
.wr-drop-zone:hover .wr-drop-icon, .wr-drop-zone.drag-over .wr-drop-icon { color: #7c3aed; }
.wr-drop-zone p { margin: 0 0 12px; font-size: 14px; }
.wr-drop-hint { font-size: 12px !important; color: #94a3b8; margin: 8px 0 0 !important; }

.wr-file-btn {
  display: inline-block; padding: 8px 18px; background: #7c3aed; color: #fff;
  border-radius: 8px; font-size: 14px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(124,58,237,.3); transition: transform .15s, box-shadow .15s;
}
.wr-file-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(124,58,237,.4); }

.wr-error {
  background: #fdecea; border: 1px solid #f5c2c0; color: #9c2b26;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
}

/* ── 큐(업로드한 이미지 카드 목록) ── */
.wr-queue { display: flex; flex-direction: column; gap: 16px; }

.wr-bulk-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0;
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 12px;
}

.wr-item {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 16px;
  padding: 16px; box-shadow: 0 10px 30px rgba(15,23,42,.06);
  position: relative; overflow: hidden;
}
.wr-item::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #d946ef);
}

.wr-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wr-item-name { font-size: 13px; font-weight: 800; color: #1f2937; word-break: break-all; flex: 1; }
.wr-item-size { font-size: 11px; color: #94a3b8; white-space: nowrap; }
.wr-item-remove {
  background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 14px;
  padding: 4px 6px; border-radius: 6px; flex-shrink: 0;
}
.wr-item-remove:hover { background: #fdecea; color: #dc2626; }

/* 캔버스 + 워터마크 위치 선택 오버레이 */
.wr-canvas-wrap {
  position: relative; max-width: 100%; margin: 0 auto; background: #111; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; touch-action: none;
}
.wr-canvas { display: block; max-width: 100%; height: auto; }
.wr-box {
  position: absolute; border: 2px solid #22d3ee; background: rgba(34,211,238,.18);
  cursor: move; box-shadow: 0 0 0 9999px rgba(0,0,0,.28);
}
.wr-box-handle {
  position: absolute; right: -6px; bottom: -6px; width: 16px; height: 16px;
  background: #22d3ee; border: 2px solid #fff; border-radius: 50%;
  cursor: nwse-resize; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.wr-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.wr-presets-label { font-size: 11px; color: #94a3b8; margin-right: 2px; }
.wr-presets button {
  border: 1.5px solid #e2e8f0; background: #f8fafc; color: #64748b; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px; cursor: pointer; transition: all .15s;
}
.wr-presets button:hover { border-color: #9d6df0; color: #334155; }
.wr-presets button.is-active { background: #f3ecfe; border-color: #7c3aed; color: #6d28d9; }

.wr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.wr-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #e2e8f0; background: #fff;
  color: #334155; font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.wr-btn:hover { background: #f0f3f7; border-color: #aab4c2; }
.wr-btn:disabled { opacity: .5; cursor: not-allowed; }
.wr-btn-ghost { background: #f8fafc; }
.wr-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(124,58,237,.3);
}
.wr-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(124,58,237,.4); background: linear-gradient(135deg, #7c3aed, #a855f7); }
.wr-btn-primary:active { transform: translateY(0); }
.wr-btn-download {
  background: linear-gradient(135deg, #0f2744, #1d4ed8); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(29,78,216,.25);
}
.wr-btn-download:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(29,78,216,.35); background: linear-gradient(135deg, #0f2744, #1d4ed8); }

.wr-status {
  margin-top: 10px; font-size: 12px; padding: 8px 12px; border-radius: 8px; background: #f8fafc; color: #475569;
}
.wr-status.is-ok { background: #ecfdf5; color: #15803d; }
.wr-status.is-err { background: #fdecea; color: #9c2b26; }

/* 다른 도구 추천 */
.wr-other-tools { margin: 24px 0; padding: 20px; background: #fff; border: 1px solid #e2e6ec; border-radius: 14px; }
.wr-other-tools-label { font-size: 12px; font-weight: 700; color: #667; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.wr-other-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.wr-other-tool-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid #e2e6ec; border-radius: 10px; text-decoration: none; color: #334155;
  font-size: 13px; font-weight: 700; transition: all .15s;
}
.wr-other-tool-card:hover { border-color: #7c3aed; background: #f3ecfe; transform: translateY(-2px); }
.wr-other-tool-card i { font-size: 16px; color: #7c3aed; }

.wr-footer { text-align: center; padding: 20px 0; color: #94a3b8; font-size: 12px; line-height: 1.7; }

@media (max-width: 480px) {
  .wr-actions { flex-direction: column; align-items: stretch; }
  .wr-bulk-bar { flex-direction: column; align-items: stretch; }
}
