/* Cryptographic Hash & Checksum Calculator — content styles.
   Prefix: --hc-  /  .hc-

   Reference point: a checksum verification table — one row per algorithm,
   because that's genuinely how these tools get used (computing all the
   common algorithms at once to match whatever a download page happened to
   publish). Sixth distinct developer-cluster layout this build loop: a
   results table, not a card grid, canvas, split pane, or single column.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --hc-surface: #ffffff;
  --hc-panel:   #f5f6f4;
  --hc-line:    #dadedb;
  --hc-text:    #14181a;
  --hc-muted:   #5e6862;
  --hc-good:    #1c7a4c;
  --hc-bad:     #b3261e;
  --hc-mono:    ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.hc-wrap {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Mode tabs ───────────────────────────────────────────────────────────── */

.hc-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.hc-tab {
  padding: 0.4375rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--hc-muted);
  background: var(--hc-panel);
  border: 1px solid var(--hc-line);
  border-radius: 2px;
  cursor: pointer;
}

.hc-tab--active {
  color: var(--tf-accent-ink);
  background: var(--tf-accent);
  border-color: var(--tf-accent);
}

/* ── Input panels ────────────────────────────────────────────────────────── */

.hc-input-panel {
  margin-bottom: 1rem;
}

.hc-input-panel label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hc-muted);
}

.hc-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 7rem;
  padding: 0.75rem 0.875rem;
  font-family: var(--hc-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--hc-text);
  background: var(--hc-surface);
  border: 1px solid var(--hc-line);
  border-radius: 2px;
  resize: vertical;
}

.hc-textarea:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.hc-drop-zone {
  padding: 2rem 1rem;
  text-align: center;
  border: 2px dashed var(--hc-line);
  border-radius: 2px;
  background: var(--hc-panel);
  cursor: pointer;
}

.hc-drop-zone:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

.hc-drop--active {
  border-color: var(--tf-accent);
  background: var(--tf-accent-wash);
}

.hc-drop-text {
  margin: 0 0 0.375rem;
  font-size: 0.875rem;
  color: var(--hc-text);
  font-weight: 600;
}

.hc-file-info {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--hc-muted);
}

/* ── Primary action button ──────────────────────────────────────────────── */

.hc-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tf-accent-ink);
  background: var(--tf-accent);
  border: 1px solid var(--tf-accent);
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.hc-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.hc-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.hc-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Results table ───────────────────────────────────────────────────────── */

.hc-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.hc-results-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hc-muted);
}

.hc-status {
  font-size: 0.75rem;
  color: var(--hc-muted);
}

.hc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hc-line);
  border-radius: 2px;
  margin-bottom: 1rem;
}

.hc-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--hc-surface);
}

.hc-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hc-muted);
  background: var(--hc-panel);
  border-bottom: 1px solid var(--hc-line);
}

.hc-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--hc-line);
  font-size: 0.8125rem;
  vertical-align: middle;
}

.hc-table tbody tr:last-child td {
  border-bottom: none;
}

.hc-algo-cell {
  font-weight: 700;
  color: var(--hc-text);
  white-space: nowrap;
}

.hc-hash-cell {
  width: 100%;
}

.hc-hash-value {
  font-family: var(--hc-mono);
  font-size: 0.75rem;
  color: var(--hc-text);
  word-break: break-all;
}

.hc-copy-cell {
  white-space: nowrap;
}

.hc-copy-btn {
  padding: 0.25rem 0.625rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hc-text);
  background: var(--hc-panel);
  border: 1px solid var(--hc-line);
  border-radius: 2px;
  cursor: pointer;
}

.hc-copy-btn:hover {
  border-color: var(--tf-accent);
  color: var(--tf-accent);
}

/* ── Compare panel ───────────────────────────────────────────────────────── */

.hc-compare-panel {
  padding: 1rem;
  border: 1px solid var(--hc-line);
  border-radius: 2px;
  background: var(--hc-panel);
  margin-bottom: 1.5rem;
}

.hc-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hc-muted);
}

.hc-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--hc-mono);
  font-size: 0.8125rem;
  color: var(--hc-text);
  background: var(--hc-surface);
  border: 1px solid var(--hc-line);
  border-radius: 2px;
}

.hc-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.hc-compare-status {
  margin: 0.625rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  min-height: 1.2em;
}

.hc-compare-status--good { color: var(--hc-good); }
.hc-compare-status--bad  { color: var(--hc-bad); }

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.hc-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 52rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .hc-wrap,
  .hc-ad { padding-inline: 1rem; }
}

/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --hc-surface: var(--tf-surface);
  --hc-panel: var(--tf-surface);
  --hc-line: var(--tf-rule);
  --hc-text: var(--tf-ink);
  --hc-muted: var(--tf-ink-soft);
  --hc-good: #5fd099;
  --hc-bad: #da8581;
}
