/*
 * Styles for the World Forest Group Total Cost of Ownership calculator.
 *
 * All rules are scoped to the #wfg-carbon-calculator root element to
 * avoid leaking styles into the surrounding theme.  Variables such as
 * --bg and --panel are defined on the root container and can be
 * switched via the data-theme attribute (DarkForest vs LightForest).
 */

#wfg-carbon-calculator {
  /* Theme variables (default = DarkForest-ish) */
  --bg: #f2efe7;
  --panel: #f5f3ee;
  --border: #3e5f3f;
  --border-soft: rgba(62, 95, 63, 0.55);
  --text: #1f2a1f;
  --muted: rgba(31, 42, 31, 0.65);
  --accent: #e67e22;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);

  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* LightForest theme overrides */
#wfg-carbon-calculator[data-theme="LightForest"] {
  --bg: #fbfaf6;
  --panel: #ffffff;
  --border: #2f6b57;
  --border-soft: rgba(47, 107, 87, 0.45);
  --text: #1e2b26;
  --muted: rgba(30, 43, 38, 0.65);
  --accent: #f59e0b;
}

/* Titles and sections */
#wfg-carbon-calculator .page-title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

#wfg-carbon-calculator .card-shell {
  background: var(--panel);
  border: 2px solid var(--border-soft);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

#wfg-carbon-calculator .section-title {
  font-weight: 800;
  color: var(--border);
}

#wfg-carbon-calculator .label {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

#wfg-carbon-calculator .help {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

#wfg-carbon-calculator .input-like {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  width: 100%;
}

/* Results rows */
#wfg-carbon-calculator .result-row {
  background: #fff;
  border: 2px solid rgba(62, 95, 63, 0.55);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

#wfg-carbon-calculator .result-label {
  color: var(--muted);
  font-weight: 700;
}

#wfg-carbon-calculator .result-value {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
}

#wfg-carbon-calculator .result-value.big {
  font-size: 1.35rem;
}

/* Toolbar */
#wfg-carbon-calculator .toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  align-items: center;
}

#wfg-carbon-calculator .btn-outline-forest {
  border: 2px solid var(--border);
  color: var(--text);
  font-weight: 800;
  background: transparent;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}

#wfg-carbon-calculator .btn-outline-forest:hover {
  background: rgba(62, 95, 63, 0.08);
  color: var(--text);
}

#wfg-carbon-calculator .select-forest {
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  background: #fff;
  font-weight: 700;
}

/* Range sliders styled like the screenshot (orange track) */
#wfg-carbon-calculator input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

#wfg-carbon-calculator .range-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

#wfg-carbon-calculator .range-value {
  font-weight: 800;
  color: var(--muted);
  min-width: 64px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#wfg-carbon-calculator .summary-shell {
  background: var(--panel);
  border: 2px solid var(--border-soft);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

#wfg-carbon-calculator table.summary {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 2px solid rgba(62, 95, 63, 0.55);
  border-radius: 10px;
  overflow: hidden;
}

#wfg-carbon-calculator table.summary th,
#wfg-carbon-calculator table.summary td {
  padding: 1rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  vertical-align: middle;
}

#wfg-carbon-calculator table.summary thead th {
  background: rgba(62, 95, 63, 0.06);
  font-weight: 900;
  text-align: right;
}

#wfg-carbon-calculator table.summary thead th:first-child {
  text-align: left;
  width: 42%;
}

#wfg-carbon-calculator table.summary tbody td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#wfg-carbon-calculator table.summary tbody td:first-child {
  text-align: left;
  font-weight: 700;
  white-space: normal;
}

#wfg-carbon-calculator table.summary tbody tr:last-child td {
  border-bottom: none;
}

#wfg-carbon-calculator .row-highlight {
  background: rgba(62, 95, 63, 0.05);
  font-weight: 900;
}

#wfg-carbon-calculator .debug-shell {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed rgba(62, 95, 63, 0.55);
  border-radius: 10px;
  padding: 1rem;
}

#wfg-carbon-calculator .mono {
  font-variant-numeric: tabular-nums;
}