/* Sweat Rate & Sodium Loss Calculator — content styles.
   Prefix: --sw-  /  .sw-

   Reference point: a cool, hydration-adjacent blue-neutral (distinct
   from every other health-cluster tool this loop's warmer or neutral
   grey palettes) — the only tool this loop where a cool blue tint is
   a deliberate content-area choice rather than incidental. 11th
   `health`-cluster tool this loop.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --sw-surface: #ffffff;
  --sw-panel:   #f2f6f8;
  --sw-line:    #dbe6ea;
  --sw-text:    #101a1e;
  --sw-muted:   #56676d;
  --sw-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.sw-wrap {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.sw-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--sw-line);
  border-radius: 2px;
  background: var(--sw-surface);
}

.sw-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sw-row:last-of-type {
  margin-bottom: 1.25rem;
}

.sw-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sw-muted);
}

.sw-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--sw-mono);
  font-size: 1rem;
  color: var(--sw-text);
  background: var(--sw-panel);
  border: 1px solid var(--sw-line);
  border-radius: 2px;
}

.sw-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.sw-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;
}

.sw-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.sw-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.sw-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Results ─────────────────────────────────────────────────────────────── */

.sw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .sw-grid { grid-template-columns: 1fr; }
}

.sw-metric {
  padding: 1.25rem 1rem;
  border: 1px solid var(--sw-line);
  border-radius: 2px;
  background: var(--sw-surface);
  text-align: center;
}

.sw-metric-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sw-muted);
}

.sw-metric-value {
  margin: 0;
  font-family: var(--sw-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tf-accent);
}

.sw-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--sw-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.sw-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 34rem;
  padding-inline: 1.5rem;
  overflow: hidden;
}

@media (max-width: 26rem) {
  .sw-wrap,
  .sw-ad { padding-inline: 1rem; }
  .sw-panel { padding: 1.25rem; }
  .sw-row { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* 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"] {
  --sw-surface: var(--tf-surface);
  --sw-panel: var(--tf-surface);
  --sw-line: var(--tf-surface);
  --sw-text: var(--tf-ink);
  --sw-muted: var(--tf-ink-soft);
}
