/* HTMLEscape — tool-specific styles.
   Shared styles (nav, panels, buttons) live in ../../css/style.css */

.he { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Toolbar ---------- */
.he-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.he-bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.he-modes {
  display: flex;
  gap: 4px;
  background: var(--card-2);
  border: 1px solid #1c1c20;
  border-radius: 11px;
  padding: 4px;
}
.he-mode {
  border: none;
  border-radius: 8px;
  background: none;
  color: #74747e;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  padding: 8px 15px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.he-mode:hover { color: #c4c4cc; }
.he-mode.active { background: var(--pink); color: #fff; }
.he-mode:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(232, 70, 124, .3); }

.he-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #74747e;
  font-size: .76rem;
  cursor: pointer;
}
.he-toggle input { accent-color: var(--pink); width: 14px; height: 14px; cursor: pointer; }
.he-toggle[hidden] { display: none; }

/* ---------- Panes ---------- */
.he-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.he-pane { display: flex; flex-direction: column; min-width: 0; }

.he-pane textarea {
  width: 100%;
  min-height: 260px;
  max-height: 50vh;
  resize: vertical;
  display: block;
  background: transparent;
  border: none;
  padding: 14px 16px;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.6;
  outline: none;
  word-break: break-word;
}
.he-pane textarea::placeholder { color: #4a4a52; }
#he-out { color: #9ae6b4; }

/* ---------- Entity table ---------- */
.he-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px;
}
.he-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #141418;
  border: 1px solid #1c1c20;
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.he-row:hover { border-color: var(--pink); background: #1a1a1f; }
.he-char {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: #1c1c20;
  border-radius: 7px;
  font-size: .9rem;
}
.he-entity {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .78rem;
  color: var(--pink);
}
.he-name {
  margin-left: auto;
  color: #5c5c66;
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 880px) {
  .he-panes { grid-template-columns: 1fr; }
  .he-pane textarea { min-height: 170px; }
  .he-bar-right { margin-left: 0; }
}
