/* ═══════════════════════════════════════════════════════════════
   ROI-Kalkulator | service-bots.de
   Design: service-bots.de Brand — #FF8F27 / #383c41 / #e4e9f8
   Font: Teko (headings) + system sans (body)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Teko:wght@400;500;600;700&display=swap');

/* ── Variablen ─────────────────────────────────────────────── */
.roi-wrap {
  --roi-bg:          #ffffff;
  --roi-surface:     #f7f8fc;
  --roi-surface2:    #e4e9f8;
  --roi-border:      #d8dff0;
  --roi-accent:      #FF8F27;
  --roi-accent-dark: #e07a18;
  --roi-dark:        #383c41;
  --roi-mid:         #606266;
  --roi-light:       #e4e9f8;
  --roi-green:       #2a9d5c;
  --roi-red:         #d94040;
  --roi-text:        #383c41;
  --roi-radius:      12px;
  --roi-radius-sm:   8px;
  --roi-font-head:   'Teko', sans-serif;
  --roi-font-body:   -apple-system, BlinkMacSystemFont, 'Segoe UI', 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 4px 32px rgba(56,60,65,0.10);
}

/* ── Header ────────────────────────────────────────────────── */
.roi-header {
  background: var(--roi-dark);
  padding: 2rem 3rem;
  text-align: center;
  border-bottom: 3px solid var(--roi-accent);
  position: relative;
  overflow: hidden;
}

.roi-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--roi-accent);
}

.roi-header h2 {
  font-family: var(--roi-font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.roi-header p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  font-weight: 400;
}

/* ── 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.4rem;
}

/* ── Field ─────────────────────────────────────────────────── */
.roi-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  gap: 0.5rem;
}

.roi-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--roi-mid);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.3;
}

.roi-value-badge {
  background: var(--roi-light);
  border: 1px solid var(--roi-border);
  color: var(--roi-dark);
  font-family: var(--roi-font-head);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.6rem;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 85px;
  text-align: center;
  transition: all 0.15s ease;
}

/* ── Robot Select ──────────────────────────────────────────── */
.roi-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.roi-select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--roi-light);
  border: 1.5px solid var(--roi-border);
  border-radius: var(--roi-radius-sm);
  color: var(--roi-dark);
  font-family: var(--roi-font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.65rem 2.5rem 0.65rem 0.9rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.roi-select-wrap select:focus {
  border-color: var(--roi-accent);
  box-shadow: 0 0 0 3px rgba(255,143,39,0.15);
}

.roi-select-arrow {
  position: absolute;
  right: 0.75rem;
  color: var(--roi-accent);
  font-size: 0.75rem;
  pointer-events: none;
}

.roi-manual-wrap {
  margin-top: 0.6rem;
}

.roi-manual-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--roi-mid);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.35rem;
}

.roi-manual-wrap input[type="number"] {
  width: 100%;
  background: var(--roi-light);
  border: 1.5px solid var(--roi-accent);
  border-radius: var(--roi-radius-sm);
  color: var(--roi-dark);
  font-family: var(--roi-font-head);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.6rem 0.9rem;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.roi-manual-wrap input[type="number"]:focus {
  box-shadow: 0 0 0 3px rgba(255,143,39,0.18);
}

.roi-manual-wrap input[type="number"]::-webkit-inner-spin-button,
.roi-manual-wrap input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

/* ── 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;
}

.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: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--roi-accent);
  margin-top: -7px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  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 5px rgba(255,143,39,0.18);
}

.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: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--roi-accent);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.roi-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #adb5bd;
  margin-top: 0.2rem;
}

.roi-hint {
  font-size: 0.72rem;
  color: #adb5bd;
  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.5rem;
}

.roi-results-title {
  font-family: var(--roi-font-head);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--roi-mid);
}

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

.roi-kpi {
  background: var(--roi-bg);
  border: 1px solid var(--roi-border);
  border-radius: var(--roi-radius-sm);
  padding: 0.9rem 1rem;
}

.roi-kpi--highlight {
  border-left: 3px solid var(--roi-accent);
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fff8f2 0%, var(--roi-bg) 100%);
}

.roi-kpi-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--roi-mid);
  margin-bottom: 0.25rem;
}

.roi-kpi-value {
  font-family: var(--roi-font-head);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 600;
  color: var(--roi-dark);
  line-height: 1;
  margin-bottom: 0.15rem;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.roi-kpi--highlight .roi-kpi-value {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  color: var(--roi-accent);
}

.roi-kpi-sub {
  font-size: 0.68rem;
  color: #adb5bd;
}

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

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

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

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

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

.roi-bar-outer {
  flex: 1;
  height: 26px;
  background: var(--roi-light);
  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;
}

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

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

.roi-bar-amount {
  font-family: var(--roi-font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--roi-dark);
  margin-left: 0.5rem;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

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

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

.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, #c0392b, #e57373);
}

.roi-year-fill.positive {
  background: linear-gradient(to top, #1e8449, #52c78a);
}

.roi-year-label {
  font-size: 0.78rem;
  color: var(--roi-mid);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.roi-year-amount {
  font-size: 0.75rem;
  color: var(--roi-mid);
  font-family: var(--roi-font-head);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── CTA ───────────────────────────────────────────────────── */
.roi-cta {
  background: var(--roi-bg);
  border: 1px solid var(--roi-border);
  border-radius: var(--roi-radius-sm);
  padding: 1.1rem 1.25rem;
  text-align: center;
}

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

.roi-cta-btn {
  display: inline-block;
  background: var(--roi-accent);
  color: #fff;
  font-family: var(--roi-font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.roi-cta-btn:hover {
  background: var(--roi-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,143,39,0.3);
  color: #fff;
  text-decoration: none;
}

/* ── Disclaimer ────────────────────────────────────────────── */
.roi-disclaimer {
  padding: 0.85rem 2.5rem;
  font-size: 0.7rem;
  color: #adb5bd;
  border-top: 1px solid var(--roi-border);
  background: var(--roi-surface);
  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: 1.75rem 1.5rem;
  }

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

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

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