/* Binary, Octal & Hex Converter — content styles.
   Prefix: --bh-  /  .bh-

   Reference point: four equally-weighted linked fields, since there
   is no single "answer" here — binary, octal, decimal, and hex are
   four equivalent representations of the same value, not one input
   and three derived outputs. First tool this loop where every field
   is simultaneously an input and a result. Third `education`-cluster
   tool this loop.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --bh-surface: #ffffff;
  --bh-panel:   #f4f5f6;
  --bh-line:    #dde0e3;
  --bh-text:    #171a1c;
  --bh-muted:   #5c6368;
  --bh-error:   #b3261e;
  --bh-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.bh-wrap {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.bh-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--bh-line);
  border-radius: 2px;
  background: var(--bh-surface);
}

.bh-field {
  margin-bottom: 1rem;
}

.bh-field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--bh-text);
}

.bh-base {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bh-muted);
}

.bh-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem;
  font-family: var(--bh-mono);
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  color: var(--bh-text);
  background: var(--bh-panel);
  border: 1px solid var(--bh-line);
  border-radius: 2px;
}

.bh-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.bh-status {
  min-height: 1.25rem;
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--bh-error);
}

.bh-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ── Primary + secondary action buttons ─────────────────────────────────── */

.bh-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 2px;
  cursor: pointer;
}

.bh-btn--primary {
  color: var(--tf-accent-ink);
  background: var(--tf-accent);
  border: 1px solid var(--tf-accent);
}

.bh-btn--primary:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.bh-btn--primary:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.bh-btn--secondary {
  color: var(--bh-text);
  background: var(--bh-panel);
  border: 1px solid var(--bh-line);
}

.bh-btn--secondary:hover {
  background: var(--bh-surface);
}

.bh-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.bh-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 30rem;
  padding-inline: 1.5rem;
  overflow: hidden;
}

@media (max-width: 26rem) {
  .bh-wrap,
  .bh-ad { padding-inline: 1rem; }
  .bh-panel { padding: 1.25rem; }
  .bh-actions { grid-template-columns: 1fr; }
}

/* 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"] {
  --bh-surface: var(--tf-surface);
  --bh-panel: var(--tf-surface);
  --bh-line: var(--tf-rule);
  --bh-text: var(--tf-ink);
  --bh-muted: var(--tf-ink-soft);
  --bh-error: #da8581;
}
