/* Calculadora: "Quanto está a perder sem marcações online?" (página /calculadora). */

/* Cores do site (tokens de css/style.css, regras do CLAUDE.md). */
.ncs-calc {
  --ncs-bg: var(--bg);              /* fundo #070D0A */
  --ncs-surface: var(--surface);    /* cartões */
  --ncs-surface-2: var(--surface-2);/* campos e trilho dos sliders */
  --ncs-border: var(--line-2);
  --ncs-text: var(--fg);            /* texto #E6EAE5 */
  --ncs-muted: var(--muted);
  --ncs-accent: var(--green);       /* verde da marca #20744F: botões, sliders, contornos */
  --ncs-accent-text: var(--green-text); /* variante de texto #4CC38A, só para texto pequeno */
  --ncs-accent-ink: var(--on-green);/* texto em cima do verde */
  --ncs-loss: var(--fg);            /* valores perdidos: sem cores de destaque fora da marca */
  --ncs-radius: 24px;
}

/* ---------- base (só afeta a calculadora) ---------- */
.ncs-calc, .ncs-calc * { box-sizing: border-box; }
.ncs-calc {
  font-family: var(--body);
  color: var(--ncs-text);
  background: var(--ncs-bg);
  padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 112px);
  line-height: 1.5;
}
/* A largura e as margens vêm de .wrap, como no resto do site. */

.ncs-eyebrow { display: inline-block; margin-bottom: 14px; }
.ncs-title {
  font-family: var(--display);
  font-size: clamp(32px, 4.6vw, 52px); line-height: 1.05; margin: 0 0 14px;
  font-weight: 700; letter-spacing: -.03em; max-width: 760px; text-wrap: balance;
}
.ncs-lead { color: var(--ncs-muted); font-size: clamp(16px, 2vw, 18px); max-width: 640px; margin: 0 0 36px; }

.ncs-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .ncs-grid { grid-template-columns: 1fr; } }

.ncs-card {
  background: var(--ncs-surface); border: 1px solid var(--ncs-border);
  border-radius: var(--ncs-radius); padding: clamp(20px, 3vw, 32px);
}

/* ---------- tipo de negócio ---------- */
.ncs-label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.ncs-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 30px; }
@media (max-width: 520px) { .ncs-types { grid-template-columns: repeat(2, 1fr); } }
.ncs-type {
  appearance: none; border: 1px solid var(--ncs-border); background: var(--ncs-surface-2);
  color: var(--ncs-text); font: inherit; font-size: 14px; font-weight: 500;
  padding: 11px 8px; border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s;
}
.ncs-type:hover { border-color: var(--ncs-muted); }
.ncs-type[aria-pressed="true"] { background: var(--ncs-accent); color: var(--ncs-accent-ink); border-color: var(--ncs-accent); font-weight: 600; }
.ncs-type:focus-visible, .ncs-range:focus-visible, .ncs-num:focus-visible, .ncs-cta:focus-visible {
  outline: 2px solid var(--ncs-accent); outline-offset: 2px;
}

/* Sem o realce azul que o Chrome do telemóvel põe ao tocar: o estado ativo já é verde. */
.ncs-type, .ncs-cta { -webkit-tap-highlight-color: transparent; }

/* ---------- pacote ---------- */
.ncs-types.ncs-packs { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }
.ncs-packs .ncs-type { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; }
.ncs-pack-price { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- campos ---------- */
.ncs-field { margin-bottom: 26px; }
.ncs-field:last-child { margin-bottom: 0; }
.ncs-field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.ncs-field-head .ncs-label { margin: 0; }
.ncs-help { color: var(--ncs-muted); font-size: 13.5px; margin: 0 0 12px; }
.ncs-numwrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ncs-num {
  width: 76px; text-align: right; font: inherit; font-weight: 700; font-size: 18px;
  color: var(--ncs-text); background: var(--ncs-surface-2); border: 1px solid var(--ncs-border);
  border-radius: 10px; padding: 6px 10px; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.ncs-num::-webkit-outer-spin-button, .ncs-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ncs-unit { color: var(--ncs-muted); font-size: 15px; min-width: 14px; }

.ncs-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0;
  --p: 50%;
}
.ncs-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(to right, var(--ncs-accent) var(--p), var(--ncs-surface-2) var(--p));
}
.ncs-range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--ncs-surface-2); }
.ncs-range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--ncs-accent); }
.ncs-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; margin-top: -8px;
  background: var(--ncs-text); border: 4px solid var(--ncs-accent); box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.ncs-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ncs-text); border: 4px solid var(--ncs-accent); box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* ---------- resultado ---------- */
.ncs-result { position: sticky; top: 20px; }
.ncs-result-kicker { color: var(--ncs-muted); font-size: 15px; margin: 0 0 6px; }
.ncs-big {
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 64px); font-weight: 800; letter-spacing: -.03em; line-height: 1;
  color: var(--ncs-loss); font-variant-numeric: tabular-nums; margin: 0 0 6px;
}
.ncs-big small { font-size: .4em; font-weight: 600; color: var(--ncs-muted); letter-spacing: 0; margin-left: 4px; }
.ncs-sub { color: var(--ncs-muted); font-size: 14.5px; margin: 0 0 24px; }

.ncs-stats { display: grid; gap: 1px; background: var(--ncs-border); border: 1px solid var(--ncs-border); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.ncs-stat { background: var(--ncs-surface-2); padding: 14px 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ncs-stat span { color: var(--ncs-muted); font-size: 14px; }
.ncs-stat strong { font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ncs-insight {
  border-left: 3px solid var(--ncs-accent); padding: 4px 0 4px 14px; margin: 0 0 24px;
  font-size: 15px; color: var(--ncs-text);
}

.ncs-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: var(--ncs-accent); color: var(--ncs-accent-ink); text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 16px 20px; border-radius: 14px; border: 0; cursor: pointer;
  transition: transform .15s, filter .15s;
}
.ncs-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ncs-cta svg { width: 18px; height: 18px; }
.ncs-cta-note { text-align: center; color: var(--ncs-muted); font-size: 13px; margin: 10px 0 0; }

.ncs-disclaimer { color: var(--ncs-muted); font-size: 12.5px; margin: 28px 0 0; max-width: 760px; }

/* barra fixa no telemóvel: mostra o valor enquanto mexe nos sliders */
.ncs-peek { display: none; }
@media (max-width: 860px) {
  .ncs-peek {
    display: flex; align-items: center; gap: 10px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50;
    background: var(--ncs-surface); border: 1px solid var(--ncs-border); border-radius: 14px;
    padding: 12px 16px; color: var(--ncs-text); text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.5);
    transition: opacity .2s, transform .2s;
  }
  .ncs-peek span { color: var(--ncs-muted); font-size: 14px; }
  .ncs-peek strong { color: var(--ncs-loss); font-size: 18px; font-variant-numeric: tabular-nums; }
  .ncs-peek em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--ncs-accent-text); font-weight: 600; }
  .ncs-peek.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) { .ncs-cta, .ncs-peek { transition: none; } }
