/* /var/www/html/assets/css/web-tools.css
   웹 제작 도구 공용 스타일 (php-preview / css-minify / js-minify / color-convert / favicon).
   style.css 다크 테마 위에 얹는다. 카테고리 포인트색은 웹 제작(sky) 계열. */

.wt-page {
  --wt: #93cbf2;
  --wt-soft: rgba(147, 203, 242, 0.14);
  --ok: #6fcf97;
  --bad: #eb6f6f;
}

/* 2분할 작업 영역 */
.wt-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 6px;
}

.wt-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.wt-pane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.wt-pane-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.wt-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.wt-mini-btn {
  appearance: none;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wt-mini-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--text); }

.wt-code {
  width: 100%;
  min-height: 340px;
  flex: 1;
  padding: 14px;
  border: 0;
  outline: none;
  resize: vertical;
  background: rgba(0, 0, 0, 0.28);
  color: #eaeaea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
}

.wt-preview-frame {
  flex: 1;
  min-height: 340px;
  background: #fff;
}
.wt-preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
}

.wt-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.wt-bar label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; }

.wt-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  min-height: 20px;
}
.wt-note.is-error, .wt-err { color: var(--bad); }

.wt-warn {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid rgba(147, 203, 242, 0.4);
  border-radius: var(--radius);
  background: var(--wt-soft);
  color: #cfe6fa;
  font-size: 0.86rem;
  line-height: 1.5;
}

/* ---------- CSS/JS 압축·포맷 도구 ---------- */
.mn-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.mn-stats b { color: var(--text); }

/* ---------- 컬러 변환 도구 ---------- */
.cc-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}
.cc-preview {
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-image:
    linear-gradient(45deg, #d0d0d0 25%, transparent 25%),
    linear-gradient(-45deg, #d0d0d0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d0d0d0 75%),
    linear-gradient(-45deg, transparent 75%, #d0d0d0 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  overflow: hidden;
  position: relative;
}
.cc-swatch { position: absolute; inset: 0; }
.cc-picker { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.cc-picker input[type="color"] { width: 54px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; }
.cc-fields { display: flex; flex-direction: column; gap: 12px; }
.cc-field { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; }
.cc-field label { color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.cc-field input {
  height: 42px; padding: 0 12px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28); color: var(--text);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.cc-field input:focus { outline: none; border-color: var(--wt); }
.cc-copy { height: 42px; }

/* ---------- Favicon 생성기 ---------- */
.fav-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; margin-top: 8px; }
.fav-source {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}
.fav-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 150px; padding: 18px; text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.28); border-radius: 12px;
  background: rgba(0, 0, 0, 0.2); color: var(--muted); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fav-drop.is-dragover, .fav-drop:hover { border-color: var(--wt); background: var(--wt-soft); color: var(--text); }
.fav-drop strong { color: var(--text); font-size: 0.95rem; }

.fav-mode { display: flex; gap: 8px; }
.fav-mode button {
  flex: 1; height: 38px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.05); color: var(--text); font-weight: 700; cursor: pointer;
}
.fav-mode button.is-active { background: var(--wt); color: #10222f; border-color: var(--wt); }

.fav-controls { display: flex; flex-direction: column; gap: 12px; }
.fav-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; }
.fav-row label { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.fav-row input[type="text"], .fav-row select {
  height: 40px; padding: 0 12px; min-width: 0;
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(0, 0, 0, 0.28); color: var(--text);
}
.fav-row input[type="range"] { width: 100%; }
.fav-row input[type="color"] { width: 46px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: transparent; }

.fav-out { display: flex; flex-direction: column; gap: 18px; }
.fav-previews { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.035); }
.fav-prev { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fav-prev canvas {
  image-rendering: auto; border-radius: 6px;
  background-image:
    linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.fav-prev span { color: var(--muted); font-size: 0.8rem; }

.fav-downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.fav-snippet {
  padding: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(0, 0, 0, 0.28); color: #cfe6fa;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px;
  line-height: 1.6; white-space: pre; overflow-x: auto;
}

/* 가이드 */
.wt-guide { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.wt-guide h2 { font-size: 1.25rem; margin: 0 0 10px; }
.wt-guide h3 { margin: 20px 0 4px; font-size: 1rem; }
.wt-guide p, .wt-guide li { color: rgba(245, 245, 242, 0.78); line-height: 1.7; }

@media (max-width: 780px) {
  .wt-split { grid-template-columns: 1fr; }
  .cc-wrap { grid-template-columns: 1fr; }
  .fav-grid { grid-template-columns: 1fr; }
}
