/* ==========================================================
   Sparkalkylator – Idun Liv
   BEM-prefix .spark__ skyddar mot CSS-konflikter i Umbraco.
   ========================================================== */

.spark, .spark *,
.spark *::before,
.spark *::after { box-sizing: border-box; }

.spark {
  font-family: 'Open Sans', sans-serif;
  color: #403939;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* --- Typography --- */
.spark__title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: #001b48;
  margin: 0 0 12px;
  line-height: 1.2;
}

.spark__intro {
  font-size: 15px;
  line-height: 1.65;
  color: #403939;
  margin: 0 0 40px;
}

.spark__section-head { margin: 48px 0 20px; }
.spark__section-head h2 { font-size: 22px; font-weight: 700; color: #001b48; }
.spark__section-head p  { font-size: 13px; color: #888; margin-top: 4px; }

.spark__badge {
  display: inline-block;
  background: #56BFDE;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: .03em;
}

/* --- Grid --- */
.spark__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 48px;
  margin-bottom: 28px;
}
@media (max-width: 600px) {
  .spark__grid { grid-template-columns: 1fr; gap: 20px; }
}

.spark__field { display: flex; flex-direction: column; }

.spark__lbl {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-weight: 600;
  color: #403939;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 4px;
}

.spark__lbl-val {
  font-size: clamp(16px, 3.5vw, 20px);
  font-weight: 700;
  color: #001b48;
  white-space: nowrap;
}

/* --- Range slider --- */
.spark__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #EBE8E5;
  outline: none;
  cursor: pointer;
  margin: 10px 0;
}
.spark__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #56BFDE;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px #56BFDE;
  cursor: pointer;
}
.spark__range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #56BFDE;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px #56BFDE;
  cursor: pointer;
}
.spark__range:focus-visible { outline: 2px solid #56BFDE; outline-offset: 4px; }

/* --- Risk toggle --- */
.spark__risk-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
}
.spark__risk-btn {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 20px;
  border: 1.5px solid #EBE8E5;
  background: #fff;
  color: #403939;
  cursor: pointer;
  transition: all .15s;
  flex: 1;
  text-align: center;
  white-space: nowrap;
}
.spark__risk-btn:hover { border-color: #56BFDE; }
.spark__risk-btn.active { background: #56BFDE; border-color: #56BFDE; color: #fff; }
.spark__risk-btn:focus-visible { outline: 2px solid #56BFDE; outline-offset: 3px; }

.spark__custom-rate {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.spark__custom-rate input {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  padding: 6px 10px;
  border: 1px solid #EBE8E5;
  border-radius: 8px;
  width: 80px;
  color: #403939;
  outline: none;
  margin-bottom: 0;
}
.spark__custom-rate input:focus { border-color: #56BFDE; }
.spark__custom-rate span { font-size: 13px; color: #888; }

/* --- Text/number/select inputs --- */
.spark__inp-lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #403939;
  margin-bottom: 4px;
}
.spark__inp {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #EBE8E5;
  border-radius: 8px;
  width: 100%;
  color: #403939;
  outline: none;
  transition: border-color .15s;
  background: #fff;
}
.spark__inp:focus { border-color: #56BFDE; }

/* --- Idun total card --- */
.spark__idun-total {
  background: #001b48;
  border-radius: 14px;
  padding: 20px 24px;
  text-align: center;
}
.spark__idun-total-lbl { font-size: 11px; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.spark__idun-total-big { font-size: clamp(22px, 4vw, 30px); font-weight: 700; color: #fff; line-height: 1.1; }
.spark__idun-total-sub { font-size: 12px; color: #C0E8F4; font-weight: 600; margin-top: 6px; }

/* --- Compare columns --- */
.spark__compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}
@media (max-width: 600px) { .spark__compare { grid-template-columns: 1fr; } }

.spark__compare-col {
  border: 1.5px solid #EBE8E5;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.spark__compare-col--idun { border-color: #56BFDE; background: #f7fcfe; }

.spark__compare-col h3 {
  font-size: 14px;
  font-weight: 700;
  color: #001b48;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.spark__fee-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #403939;
  margin-bottom: 8px;
}
.spark__fee-row span { color: #888; }

.spark__fee-summary {
  font-size: 12px;
  color: #403939;
  line-height: 1.6;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #EBE8E5;
}

.spark__summary-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #EBE8E5;
}
.spark__summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #403939;
  margin-bottom: 6px;
}
.spark__summary-row span { color: #888; }

/* --- Compare results --- */
.spark__compare-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
@media (max-width: 600px) { .spark__compare-results { grid-template-columns: 1fr; } }

.spark__other-result { display: flex; flex-direction: column; }

.spark__other-card {
  background: #faf9f8;
  border: 1.5px solid #EBE8E5;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.spark__other-lbl { font-size: 11px; color: #888; margin-bottom: 4px; }
.spark__other-big { font-size: clamp(20px, 4vw, 26px); font-weight: 700; color: #001b48; line-height: 1.1; }
.spark__other-sub { font-size: 12px; color: #888; margin-top: 5px; }

.spark__diff-wrap { text-align: center; margin-top: 16px; }
.spark__diff-badge {
  display: inline-block;
  background: #C0E8F4;
  color: #001b48;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 22px;
  border-radius: 30px;
}

/* --- Chart --- */
.spark__chart-wrap { position: relative; width: 100%; height: 260px; margin-top: 28px; }
.spark__axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #aaa;
  margin-top: 5px;
  padding: 0 2px;
}
.spark__legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.spark__legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #403939; }
.spark__legend-dot  { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* --- Payout stats --- */
.spark__payout-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width: 600px) { .spark__payout-stats { grid-template-columns: 1fr; } }

.spark__payout-stat {
  background: #f7fcfe;
  border-radius: 12px;
  padding: 16px;
  border: 1.5px solid #C0E8F4;
  text-align: center;
}
.spark__payout-lbl { font-size: 11px; color: #888; margin-bottom: 4px; }
.spark__payout-big { font-size: clamp(16px, 3vw, 20px); font-weight: 700; color: #001b48; }

/* --- Checkbox --- */
.spark__check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #403939;
}
.spark__check-row input[type=checkbox] {
  accent-color: #56BFDE;
  width: 16px; height: 16px;
  cursor: pointer;
}
