/* Decimal Hours to Minutes Converter — content styles.
   Prefix: --dh-  /  .dh-

   Reference point: two small, symmetric converter panels (decimal→h:m and
   h:m→decimal) sit side by side conceptually — each with its own live
   result line right under its own inputs, so both directions are visible
   without switching modes. A quick-reference table of common fractions
   follows as a scannable lookup, not something you have to calculate.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --dh-surface: #ffffff;
  --dh-panel:   #f5f6f7;
  --dh-line:    #dde1e4;
  --dh-text:    #14181c;
  --dh-muted:   #626a72;
  --dh-bad:     #b3261e;
  --dh-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.dh-wrap {
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Converter panels ────────────────────────────────────────────────────── */

.dh-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--dh-line);
  border-radius: 2px;
  background: var(--dh-surface);
}

.dh-panel-title {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--dh-text);
}

.dh-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.dh-field {
  display: grid;
  gap: 0.375rem;
}

.dh-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dh-muted);
}

.dh-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--dh-mono);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--dh-text);
  background: var(--dh-surface);
  border: 1px solid var(--dh-line);
  border-radius: 2px;
}

.dh-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.dh-result {
  margin: 0.875rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.dh-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--dh-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--dh-bad);
  border-radius: 2px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.dh-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;
}

.dh-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.dh-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.dh-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Reference table ─────────────────────────────────────────────────────── */

.dh-table-title {
  margin: 0 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dh-muted);
}

.dh-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--dh-line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.dh-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column: 1 / -1;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--dh-line);
  background: var(--dh-surface);
}

.dh-row:last-child { border-bottom: none; }

.dh-row-head {
  background: var(--dh-panel);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dh-muted);
}

.dh-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--dh-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.dh-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 32rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .dh-wrap,
  .dh-ad { padding-inline: 1rem; }
  .dh-panel { padding: 1.25rem; }
}

/* 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"] {
  --dh-surface: var(--tf-surface);
  --dh-panel: var(--tf-surface);
  --dh-line: var(--tf-surface);
  --dh-text: var(--tf-ink);
  --dh-muted: var(--tf-ink-soft);
  --dh-bad: #da8581;
}
