/* Crypto Staking & APY Reward Calculator — content styles.
   Prefix: --cry-  /  .cry-

   Reference point: token-denominated results as the primary figures (this
   is what staking actually pays out), with an optional, clearly-labelled
   fiat conversion row beneath — never the other way around, since a fiat
   figure here depends entirely on a price the user typed in, not a live
   rate this tool has access to.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --cry-surface: #ffffff;
  --cry-panel:   #f5f6f8;
  --cry-line:    #dde1e6;
  --cry-text:    #161a1f;
  --cry-muted:   #5c6570;
  --cry-mono:    ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.cry-wrap {
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.cry-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--cry-line);
  border-radius: 2px;
  background: var(--cry-surface);
}

.cry-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 28rem) {
  .cry-field-grid { grid-template-columns: 1fr; }
}

.cry-field {
  display: grid;
  gap: 0.375rem;
}

.cry-field--price {
  margin-bottom: 0.75rem;
}

.cry-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cry-muted);
}

.cry-field input,
.cry-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--cry-mono);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--cry-text);
  background: var(--cry-surface);
  border: 1px solid var(--cry-line);
  border-radius: 2px;
}

.cry-field select {
  font-family: inherit;
  font-size: 0.875rem;
}

.cry-field input:focus-visible,
.cry-field select:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.cry-error {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #b3261e;
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid #b3261e;
  border-radius: 2px;
}

.cry-presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--cry-line);
  padding-top: 0.875rem;
}

.cry-preset-lbl {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cry-muted);
}

.cry-chip {
  padding: 0.3125rem 0.75rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cry-text);
  background: var(--cry-panel);
  border: 1px solid var(--cry-line);
  border-radius: 2px;
  cursor: pointer;
}

.cry-chip:hover {
  border-color: var(--tf-accent);
  color: var(--tf-accent);
}

/* ── Primary action button ──────────────────────────────────────────────── */

.cry-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;
}

.cry-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.cry-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.cry-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Results ─────────────────────────────────────────────────────────────── */

.cry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .cry-grid { grid-template-columns: 1fr; }
}

.cry-metric {
  padding: 1.125rem 0.75rem;
  border: 1px solid var(--cry-line);
  border-radius: 2px;
  background: var(--cry-panel);
  text-align: center;
}

.cry-metric--apy {
  background: var(--cry-surface);
  border-color: var(--tf-accent);
  border-width: 2px;
}

.cry-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--cry-muted);
}

.cry-metric-value {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cry-text);
}

.cry-metric--apy .cry-metric-value {
  color: var(--tf-accent);
  font-size: 1.375rem;
  font-weight: 800;
}

.cry-fiat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 26rem) {
  .cry-fiat-row { grid-template-columns: 1fr; }
}

.cry-fiat-item {
  padding: 0.75rem;
  border: 1px dashed var(--cry-line);
  border-radius: 2px;
  text-align: center;
}

.cry-fiat-label {
  margin: 0 0 0.25rem;
  font-size: 0.6875rem;
  color: var(--cry-muted);
}

.cry-fiat-value {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cry-muted);
}

.cry-note {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--cry-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.cry-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 42rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .cry-wrap,
  .cry-ad { padding-inline: 1rem; }
  .cry-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"] {
  --cry-surface: var(--tf-surface);
  --cry-panel: var(--tf-surface);
  --cry-line: var(--tf-surface);
  --cry-text: var(--tf-ink);
  --cry-muted: var(--tf-ink-soft);
}
