/**
 * Calculator shell — styles BOTH the battery payback calculator
 * (design/sections/batterikalkyl.section.json) and the solar calculator
 * (design/sections/solkalkyl.section.json), which reuses these zp-bk__
 * classes because the two are the same object visually.
 * Reuses the calculator language from 83-laddkalk.css; the verdict line is the
 * element that carries meaning here, so it gets the colour — green when the
 * calculation works, muted-warning when it does not.
 */

.zp-bk__head {
  max-width: 44rem;
}

.zp-bk__heading {
  font-family: var(--dw-display);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0.35rem 0 0.6rem;
}

.zp-bk__lede {
  color: var(--dw-dis);
  margin: 0 0 1.4rem;
  max-width: 38rem;
}

.zp-bk__panel {
  border: 1px solid var(--dw-line, rgba(255, 255, 255, 0.12));
  border-radius: var(--dw-r-lg);
  background: var(--dw-panel, rgba(255, 255, 255, 0.04));
  padding: 1.4rem clamp(1rem, 3vw, 1.8rem) 1.3rem;
}

.zp-bk__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  align-items: end;
}

.zp-bk__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.zp-bk__label {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--dw-dis);
}

.zp-bk__input {
  font: inherit;
  font-variant-numeric: tabular-nums;
  padding: 0.65rem 0.8rem;
  border-radius: var(--dw-r-md);
  border: 1px solid var(--dw-line, rgba(255, 255, 255, 0.2));
  background: transparent;
  color: inherit;
  width: 100%;
}

.zp-bk__input:focus-visible {
  outline: 2px solid var(--dw-ember, var(--wp--preset--color--accent));
  outline-offset: 1px;
}

.zp-bk__areas {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.zp-bk__area {
  font-family: var(--dw-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--dw-line, rgba(255, 255, 255, 0.2));
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.zp-bk__area.is-active {
  background: var(--dw-ember, var(--wp--preset--color--accent));
  border-color: transparent;
  color: var(--dw-deep);
}

.zp-bk__area:focus-visible,
.zp-bk__check input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.zp-bk__check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--dw-dis);
  cursor: pointer;
  max-width: 38rem;
}

.zp-bk__check input {
  margin-top: 0.2rem;
  accent-color: var(--dw-ember, var(--wp--preset--color--accent));
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.zp-bk__results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.zp-bk__res {
  border: 1px solid var(--dw-line, rgba(255, 255, 255, 0.12));
  border-radius: var(--dw-r-md);
  padding: 0.8rem 0.9rem;
}

.zp-bk__res b {
  display: block;
  font-family: var(--dw-display);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.zp-bk__res span {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dw-dis);
}

.zp-bk__res--verdict {
  border-color: var(--dw-ember, var(--wp--preset--color--accent));
}

.zp-bk__res--verdict b {
  color: var(--dw-ember, var(--wp--preset--color--accent));
}

.zp-bk__verdict {
  margin: 1.1rem 0 0;
  font-size: 0.98rem;
  line-height: 1.6;
  padding-left: 0.9rem;
  border-left: 3px solid var(--dw-line, rgba(255, 255, 255, 0.2));
}

.zp-bk__verdict.is-negativ {
  border-left-color: var(--dw-ember, var(--wp--preset--color--accent));
}

.zp-bk__verdict.is-positiv {
  border-left-color: var(--dw-glow, var(--wp--preset--color--primary));
}

.zp-bk__basis {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--dw-dis);
}

.zp-bk__note {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: var(--dw-dis);
}

/* The solar calculator carries more inputs than the battery one; cap the
   column count so fields stay readable instead of stretching. */
.dw-band--solkalk .zp-bk__form {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
