/* hc.css – Czyszczenie Kodu HTML */

.hc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0 56px;
  --ac:     #2563eb;
  --ach:    #1d4ed8;
  --tx:     #0f172a;
  --tx2:    #475569;
  --tx3:    #94a3b8;
  --bd:     #e2e8f0;
  --bd2:    #cbd5e1;
  --bg:     #f8fafc;
  --white:  #ffffff;
  --green:  #16a34a;
  --red:    #dc2626;
  --shadow: 0 1px 3px rgba(15,23,42,.07), 0 4px 16px rgba(15,23,42,.06);
}

/* Layout */
.hc-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 680px) { .hc-layout { grid-template-columns: 1fr; } }

/* Sidebar */
.hc-sidebar {
  background: var(--white);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 20px;
}
.hc-sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--tx3);
  margin-bottom: 14px;
}

.hc-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--tx);
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}
.hc-opt input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--ac);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
}
.hc-opt code {
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  background: var(--bg);
  padding: 0 3px;
  border-radius: 3px;
  color: var(--tx2);
}
.hc-note { color: var(--tx3); font-size: 12px; }
.hc-note-text {
  font-size: 11px;
  color: var(--tx3);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--bd);
}
.hc-note-text code { font-size: 11px; font-family: 'Courier New', monospace; }

.hc-sel-btns {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Editors */
.hc-editors { display: flex; flex-direction: column; gap: 14px; }

.hc-editor-block {}

.hc-editor-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tx2);
}
.hc-char-count { font-size: 12px; font-weight: 400; color: var(--tx3); }

.hc-textarea {
  display: block !important;
  width: 100% !important;
  min-height: 340px !important;
  height: 340px !important;
  max-height: none !important;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  padding: 12px 14px !important;
  border: 1.5px solid var(--bd2) !important;
  border-radius: 10px !important;
  background: var(--bg) !important;
  color: var(--tx) !important;
  resize: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .18s !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.hc-textarea:focus { border-color: var(--ac) !important; box-shadow: 0 0 0 3px rgba(37,99,235,.1) !important; }
#hc-output { background: var(--white) !important; }

/* Custom drag handle below each textarea */
.hc-drag-handle {
  width: 100%;
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-top: none;
  border-radius: 0 0 10px 10px;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.hc-drag-handle::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  border-top: 1px solid var(--bd2);
  border-bottom: 1px solid var(--bd2);
}
.hc-drag-handle:hover { background: var(--bd); }

/* Action row */
.hc-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.hc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 22px;
  background: var(--ac);
  color: #fff !important;
  border: none !important;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
  text-decoration: none !important;
}
.hc-btn-primary:hover { background: var(--ach); box-shadow: 0 4px 14px rgba(37,99,235,.4); }
.hc-btn-primary:active { transform: scale(.97); }

.hc-btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid var(--bd2);
  border-radius: 7px;
  background: transparent;
  color: var(--tx2);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.hc-btn-sm:hover { background: var(--bg); }
.hc-btn-danger { color: var(--red) !important; border-color: #fca5a5 !important; }
.hc-btn-danger:hover { background: #fef2f2 !important; }

.hc-stats {
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  margin-left: auto;
}

/* Copy button */
.hc-copy-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--white);
  border: 1.5px solid var(--bd2);
  border-radius: 7px;
  cursor: pointer;
  color: var(--tx2);
  font-family: inherit;
  transition: background .15s, color .15s;
}
.hc-copy-btn:hover { background: var(--bg); }
.hc-copy-btn.hc-copied { color: var(--green); border-color: #86efac; }

/* Preview */
.hc-preview-wrap { margin-top: 4px; }
.hc-preview-box {
  background: var(--white);
  border: 1.5px solid var(--bd);
  border-radius: 10px;
  padding: 16px 20px;
  min-height: 80px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--tx);
}
.hc-preview-box * { max-width: 100%; }
.hc-preview-box img { height: auto; }

.hc-out-block { position: relative; }
