/* ═══════════════════════════════════════════════════════════════
   ROI-Kalkulator | service-bots.de
   Design: Clean industrial / tech — slate + electric blue
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variablen ─────────────────────────────────────────────── */
.roi-wrap {
  --roi-bg:          #0d1117;
  --roi-surface:     #161b22;
  --roi-surface2:    #1f2937;
  --roi-border:      rgba(255,255,255,0.08);
  --roi-accent:      #00d4ff;
  --roi-accent2:     #0090b3;
  --roi-green:       #22c55e;
  --roi-text:        #e2e8f0;
  --roi-muted:       #6b7280;
  --roi-radius:      16px;
  --roi-radius-sm:   10px;
  --roi-font-head:   'Syne', sans-serif;
  --roi-font-body:   'DM Sans', sans-serif;
}

/* ── Base ──────────────────────────────────────────────────── */
.roi-wrap * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.roi-wrap {
  background: var(--roi-bg);
  border-radius: var(--roi-radius);
  overflow: hidden;
  font-family: var(--roi-font-body);
  color: var(--roi-text);
  max-width: 1100px;
  margin: 2rem auto;
  border: 1px solid var(--roi-border);
  box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.07);
}

/* ── Header ────────────────────────────────────────────────── */
.roi-header {
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3a 50%, #091420 100%);
  padding: 2.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--roi-border);
  position: relative;
  overflow: hidden;
}

.roi-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.roi-header-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.roi-header h2 {
  font-family: var(--roi-font-head);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.roi-header p {
  color: var(--roi-muted);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ── Body ──────────────────────────────────────────────────── */
.roi-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* ── Inputs Panel ──────────────────────────────────────────── */
.roi-inputs {
  padding: 2rem 2.5rem;
  border-right: 1px solid var(--roi-border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Field ─────────────────────────────────────────────────── */
.roi-field {}

.roi-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
  gap: 0.5rem;
}

.roi-field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--roi-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.roi-value-badge {
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.25);
  color: var(--roi-accent);
  font-family: var(--roi-font-head);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
  text-align: center;
  transition: all 0.2s ease;
}

/* ── Slider ────────────────────────────────────────────────── */
.roi-slider-wrap {
  position: relative;
  padding: 0.3rem 0;
}

.roi-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: transparent;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.roi-field input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--roi-surface2);
  border-radius: 2px;
}

.roi-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--roi-accent);
  margin-top: -8px;
  box-shadow: 0 0 0 4px rgba(0,212,255,0.15), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roi-field input[type="range"]:hover::-webkit-slider-thumb,
.roi-field input[type="range"]:focus::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 0 6px rgba(0,212,255,0.2), 0 2px 12px rgba(0,212,255,0.3);
}

.roi-field input[type="range"]::-moz-range-track {
  height: 4px;
  background: var(--roi-surface2);
  border-radius: 2px;
}

.roi-field input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--roi-accent);
  box-shadow: 0 0 0 4px rgba(0,212,255,0.15);
  cursor: pointer;
}

.roi-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #374151;
  margin-top: 0.25rem;
}

.roi-hint {
  font-size: 0.72rem;
  color: #374151;
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ── Results Panel ─────────────────────────────────────────── */
.roi-results {
  padding: 2rem 2.5rem;
  background: var(--roi-surface);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.roi-results-title {
  font-family: var(--roi-font-head);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--roi-muted);
}

/* ── KPI Grid ──────────────────────────────────────────────── */
.roi-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.roi-kpi {
  background: var(--roi-bg);
  border: 1px solid var(--roi-border);
  border-radius: var(--roi-radius-sm);
  padding: 1rem 1.1rem;
  transition: border-color 0.3s ease;
}

.roi-kpi--highlight {
  border-color: rgba(0,212,255,0.3);
  background: linear-gradient(135deg, rgba(0,212,255,0.06) 0%, var(--roi-bg) 100%);
  grid-column: 1 / -1;
}

.roi-kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--roi-muted);
  margin-bottom: 0.35rem;
}

.roi-kpi-value {
  font-family: var(--roi-font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--roi-accent);
  line-height: 1;
  margin-bottom: 0.2rem;
  transition: color 0.3s ease;
}

.roi-kpi--highlight .roi-kpi-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.roi-kpi-sub {
  font-size: 0.72rem;
  color: #4b5563;
}

/* ── Bar Chart ─────────────────────────────────────────────── */
.roi-chart-section {
  background: var(--roi-bg);
  border: 1px solid var(--roi-border);
  border-radius: var(--roi-radius-sm);
  padding: 1.25rem 1.25rem 1rem;
}

.roi-chart-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--roi-muted);
  margin-bottom: 1rem;
}

.roi-bar-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.roi-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.roi-bar-label {
  font-size: 0.75rem;
  color: var(--roi-muted);
  width: 80px;
  flex-shrink: 0;
}

.roi-bar-outer {
  flex: 1;
  height: 28px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
}

.roi-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  min-width: 4px;
  position: relative;
}

.roi-bar--ohne {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

.roi-bar--mit {
  background: linear-gradient(90deg, #059669, var(--roi-green));
}

.roi-bar-amount {
  font-family: var(--roi-font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--roi-text);
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* ── Timeline ──────────────────────────────────────────────── */
.roi-timeline-section {
  background: var(--roi-bg);
  border: 1px solid var(--roi-border);
  border-radius: var(--roi-radius-sm);
  padding: 1.25rem;
}

.roi-timeline {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 0.5rem;
  height: 80px;
  margin-top: 0.75rem;
}

.roi-year-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  height: 100%;
  justify-content: flex-end;
}

.roi-year-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s cubic-bezier(0.4,0,0.2,1), background 0.5s;
  min-height: 4px;
}

.roi-year-fill.negative {
  background: linear-gradient(to top, #ef4444, #fca5a5);
}

.roi-year-fill.positive {
  background: linear-gradient(to top, #059669, #34d399);
}

.roi-year-label {
  font-size: 0.65rem;
  color: var(--roi-muted);
  font-weight: 600;
}

.roi-year-amount {
  font-size: 0.6rem;
  color: var(--roi-muted);
  font-family: var(--roi-font-head);
  font-weight: 700;
}

/* ── CTA ───────────────────────────────────────────────────── */
.roi-cta {
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,144,179,0.05));
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--roi-radius-sm);
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.roi-cta p {
  font-size: 0.85rem;
  color: var(--roi-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.roi-cta-btn {
  display: inline-block;
  background: var(--roi-accent);
  color: var(--roi-bg);
  font-family: var(--roi-font-head);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.roi-cta-btn:hover {
  background: #33dbff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,212,255,0.3);
  color: var(--roi-bg);
  text-decoration: none;
}

/* ── Disclaimer ────────────────────────────────────────────── */
.roi-disclaimer {
  padding: 1rem 2.5rem;
  font-size: 0.72rem;
  color: #374151;
  border-top: 1px solid var(--roi-border);
  background: rgba(0,0,0,0.2);
  line-height: 1.5;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .roi-body {
    grid-template-columns: 1fr;
  }

  .roi-inputs {
    border-right: none;
    border-bottom: 1px solid var(--roi-border);
    padding: 1.5rem;
  }

  .roi-results {
    padding: 1.5rem;
  }

  .roi-header {
    padding: 2rem 1.5rem;
  }

  .roi-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .roi-kpi--highlight {
    grid-column: 1 / -1;
  }

  .roi-disclaimer {
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .roi-kpi-grid {
    grid-template-columns: 1fr;
  }

  .roi-kpi--highlight {
    grid-column: 1;
  }
}
