/**
 * co2-calc.css v1.1 — CO2-Quick-Calc Widget Styling
 * Welle 2026-05-17 Nacht. UX-Adaption: Page-Token + Page-Pattern-Mimik.
 *
 * Nutzt die Country-Sub-Page CSS-Tokens (--bg, --ink, --muted, --line, --accent,
 * --accent-orange, --card) damit das Widget seamless mit den existierenden
 * Components (.step-pill, .price-table, .persona-card, .btn, .highlight-box,
 * .sources-block) integriert. Component-CSS-Override gegen globale .article-wrap
 * a-Selektoren (Standing Rule HH).
 */

/* ===== SECTION-CONTAINER ===== */
.gos-co2-section {
  margin: 48px 0;
}
@media (max-width: 768px) {
  .gos-co2-section { margin: 36px 0; }
}

/* ===== CARD-CONTAINER (wirkt wie .persona-card) ===== */
.co2-calc-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 18px 0;
}
@media (min-width: 768px) {
  .co2-calc-wrap { padding: 28px 32px; }
}

/* Override globale Cascading-Selektoren (.article-wrap a) — Standing Rule HH */
.co2-calc-wrap a,
.co2-calc-wrap a:hover,
.co2-calc-wrap a:focus,
.co2-calc-wrap a:focus-visible {
  text-decoration: none !important;
  border-bottom: 0 !important;
}

/* ===== HEAD ===== */
.co2-calc-head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.co2-calc-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
@media (min-width: 768px) { .co2-calc-title { font-size: 1.55rem; } }
.co2-calc-sub {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ===== STEPS ===== */
.co2-step { margin-bottom: 22px; }
.co2-step:last-of-type { margin-bottom: 0; }

.co2-step-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 12px;
}

/* Pills (wirkt wie .trust-chip + .step-pill kombiniert, ausgewählt = .step-pill.is-current) */
.co2-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.co2-pill {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.co2-pill:hover {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent);
}
.co2-pill.is-selected {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--accent);
}
.co2-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Slider — wirkt wie das Wizard-Slider-Pattern */
.co2-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 12px;
}
.co2-slider-lbl {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.co2-slider-out {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
input.co2-slider {
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
input.co2-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
input.co2-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
input.co2-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
  cursor: pointer;
}
input.co2-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
  cursor: pointer;
}

/* Form-Pratfall — wirkt wie .highlight-box, aber subtiler */
.co2-form-pratfall {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 14px 0 4px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ===== BUTTONS (wirkt wie .btn .btn-primary / .btn-secondary) ===== */
.co2-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.co2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  text-align: center;
  line-height: 1.3;
  flex: 1 1 220px;
}
.co2-btn-primary {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
}
.co2-btn-primary:hover {
  background: #ff8050;
  border-color: #ff8050;
  text-decoration: none;
}
.co2-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.co2-btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.co2-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Endowment-Button (Bridge-zum-Wizard) — Pattern aus .cta-bridge */
.co2-btn-endowment {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent) 100%);
  color: #fff;
  border-color: rgba(255, 107, 53, 0.5);
  flex: 2 1 280px;
}
.co2-btn-endowment:hover {
  background: linear-gradient(135deg, #ff8050 0%, #ffb350 100%);
  text-decoration: none;
}
.co2-btn-main {
  font-size: 1rem;
  font-weight: 700;
  display: block;
  line-height: 1.3;
}
.co2-btn-sub {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
  display: block;
  margin-top: 3px;
}

/* ===== RESULT ===== */
.co2-result-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.co2-result-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.co2-result-meta {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Tabelle — wirkt wie .price-table */
.co2-result-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.co2-result-table thead th {
  background: rgba(245, 158, 11, 0.08);
  color: var(--accent);
  font-weight: 700;
  text-align: right;
  padding: 12px 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}
.co2-result-table thead th:first-child {
  text-align: left;
}
.co2-result-table tbody th.co2-row-label {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  width: 30%;
}
.co2-result-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  color: #d4dae6;
}
.co2-result-table tbody tr:last-child th,
.co2-result-table tbody tr:last-child td {
  border-bottom: none;
}
.co2-row-mid    { color: #d4dae6; }
.co2-row-cons   { color: var(--accent); }
.co2-row-worst  { color: var(--accent-2); font-weight: 800; }

.co2-result-table tbody tr.co2-row-worst-bg td,
.co2-result-table tbody tr.co2-row-worst-bg th { background: rgba(248, 113, 113, 0.04); }

.co2-cell-num {
  font-weight: 700;
}
.co2-cell-unit {
  margin-left: 4px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

/* Mobile: Tabelle → Karten-Stack */
@media (max-width: 720px) {
  .co2-result-table { display: none; }
  .co2-result-cards {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0 22px;
  }
}
@media (min-width: 721px) {
  .co2-result-cards { display: none; }
}

.co2-result-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.co2-result-card h5 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.co2-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.co2-card-row:first-of-type { border-top: none; padding-top: 2px; }
.co2-card-lbl {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.co2-card-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #d4dae6;
}
.co2-card-cons .co2-card-val { color: var(--accent); }
.co2-card-worst .co2-card-val { color: var(--accent-2); font-weight: 800; }

/* Pratfall im Result — wirkt wie .highlight-box mit accent-2 */
.co2-result-pratfall {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Result-Actions */
.co2-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

/* Footer (Methodik-Link + Quellen) — wirkt wie kompakte .sources-block */
.co2-result-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 720px) {
  .co2-result-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.co2-methodik-link {
  color: var(--accent) !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  border-bottom: 1px dotted rgba(245, 158, 11, 0.4) !important;
}
.co2-methodik-link:hover {
  border-bottom-color: var(--accent) !important;
  text-decoration: none !important;
}
.co2-sources {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}

/* Reduced-Motion */
@media (prefers-reduced-motion: reduce) {
  .co2-pill, .co2-btn { transition: none; }
}
