/* The Vanlife Store / VLS Finland Oy — Cable Calculator 2.0 */
.vls-calculator {
  --vls-bg: #f7f5f0;
  --vls-panel: #ffffff;
  --vls-ink: #1f2523;
  --vls-muted: #69736f;
  --vls-line: #d9ded9;
  --vls-dark: #1f2523;
  --vls-green: #dff1e4;
  --vls-green-text: #1f6b3a;
  --vls-red: #fde2df;
  --vls-red-text: #9c2f25;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 2rem auto;
  color: var(--vls-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
}
.vls-calculator * { box-sizing: border-box; }
.vls-calculator__shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
  background: var(--vls-bg);
  border: 1px solid var(--vls-line);
  border-radius: 8px;
  padding: 1rem;
}
.vls-calculator__panel {
  min-width: 0;
  max-width: 100%;
  background: var(--vls-panel);
  border: 1px solid var(--vls-line);
  border-radius: 8px;
  padding: 1.25rem;
}
.vls-calculator h2,
.vls-calculator h3,
.vls-calculator h4,
.vls-calculator p { margin: 0; }
.vls-calculator h2 { font-size: 1.45rem; margin-bottom: 0.35rem; }
.vls-calculator h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.vls-calculator h4 { font-size: 0.95rem; margin-bottom: 0.65rem; }
.vls-calculator__intro { color: var(--vls-muted); margin-bottom: 1.25rem; font-size: 0.95rem; }
.vls-calculator__field { min-width: 0; margin-bottom: 1rem; }
.vls-calculator label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.vls-calculator input,
.vls-calculator select {
  width: 100%;
  min-width: 0;
  border: 1px solid #c9d0cb;
  border-radius: 6px;
  padding: 0.72rem 0.75rem;
  font: inherit;
  background: #fff;
}
.vls-calculator__help { display: block; color: var(--vls-muted); font-size: 0.86rem; margin-top: 0.35rem; }
.vls-calculator__row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 0.75rem; min-width: 0; }
.vls-calculator__button-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.15rem; min-width: 0; }
.vls-calculator button,
.vls-calculator__wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--vls-dark);
  border-radius: 6px;
  padding: 0.65rem 0.95rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.vls-calculator__primary { background: var(--vls-dark); color: #fff; }
.vls-calculator__secondary,
.vls-calculator__wa { background: #fff; color: var(--vls-dark); }
.vls-calculator__error {
  display: none;
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 6px;
  background: var(--vls-red);
  color: var(--vls-red-text);
  font-weight: 700;
}
.vls-calculator__empty {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vls-muted);
  text-align: center;
  border: 1px dashed var(--vls-line);
  border-radius: 8px;
  padding: 2rem;
}
.vls-calculator__results { display: none; min-width: 0; max-width: 100%; }
.vls-calculator__main-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
  margin-bottom: 1rem;
}
.vls-calculator__metric {
  min-width: 0;
  border: 1px solid var(--vls-line);
  border-radius: 8px;
  padding: 1rem;
  background: #fbfcfb;
}
.vls-calculator__metric span,
.vls-calculator__tech span {
  display: block;
  color: var(--vls-muted);
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}
.vls-calculator__metric strong { display: block; font-size: 1.45rem; line-height: 1.15; overflow-wrap: anywhere; }
.vls-calculator__status {
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.vls-calculator__status--green { background: var(--vls-green); color: var(--vls-green-text); }
.vls-calculator__status--yellow { background: #fff2cc; color: #8a6200; }
.vls-calculator__status--red { background: var(--vls-red); color: var(--vls-red-text); }
.vls-calculator__warning {
  display: none;
  border: 1px solid #efc3bd;
  background: var(--vls-red);
  color: var(--vls-red-text);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.vls-calculator__table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--vls-line);
  border-radius: 8px;
  margin-bottom: 1rem;
}
.vls-calculator table { width: 100%; border-collapse: collapse; min-width: 520px; background: #fff; }
.vls-calculator th,
.vls-calculator td {
  padding: 0.7rem;
  border-bottom: 1px solid var(--vls-line);
  text-align: left;
  vertical-align: top;
}
.vls-calculator th { font-size: 0.82rem; color: var(--vls-muted); background: #f5f7f5; }
.vls-calculator .is-recommended td { background: #dff1e4; font-weight: 800; }
.vls-calculator .is-recommended td:first-child { border-left: 4px solid var(--vls-green-text); }
.vls-calculator .is-excellent td { background: #f7fbf8; }
.vls-calculator .is-borderline td { background: #fff8dc; }
.vls-calculator .is-not-recommended td { background: #fdebea; }
.vls-calculator details {
  min-width: 0;
  border: 1px solid var(--vls-line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 1rem;
}
.vls-calculator summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 700; }
.vls-calculator__tech {
  padding: 0 1rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  min-width: 0;
}
.vls-calculator__tech div { min-width: 0; padding: 0.7rem; border-radius: 6px; background: #f7f8f7; }
.vls-calculator__tech strong { overflow-wrap: anywhere; }
.vls-calculator__parallel {
  display: none;
  min-width: 0;
  border: 1px solid var(--vls-line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: #f7f8f7;
}
.vls-calculator__disclaimer {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--vls-line);
  border-radius: 8px;
  background: #f7f8f7;
  color: var(--vls-muted);
  font-size: 0.9rem;
}
.vls-calculator__share {
  display: none;
  gap: 0.6rem;
  flex-wrap: wrap;
  min-width: 0;
  margin-top: 1rem;
}
.vls-calculator__copy-status { color: var(--vls-muted); font-size: 0.86rem; align-self: center; }

.vls-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.vls-input-wrapper input {
  width: 100%;
  padding-right: 32px;
}

.vls-input-wrapper .vls-info-icon {
  position: absolute;
  right: 10px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.vls-input-wrapper .vls-info-icon:hover,
.vls-input-wrapper .vls-info-icon:focus {
  opacity: 1;
}

.vls-input-wrapper .vls-tooltip {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #222;
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  max-width: min(260px, calc(100vw - 32px));
  z-index: 999;
  display: none;
  font-weight: 400;
}

.vls-tooltip.visible {
  display: block;
}

@media (max-width: 820px) {
  .vls-calculator {
    margin-left: 0;
    margin-right: 0;
    overflow-x: hidden;
  }
  .vls-calculator__shell,
  .vls-calculator__main-result,
  .vls-calculator__tech,
  .vls-calculator__row {
    grid-template-columns: minmax(0, 1fr);
  }
  .vls-calculator__shell {
    padding: 0.75rem;
  }
  .vls-calculator__panel {
    padding: 1rem;
  }
}
