/* ==========================================================================
   SecureLynx price calculator (pricing.php).
   Namespaced under .slx-calc. Loaded as $cssMain after services.css.

   BORDERS ARE WRITTEN OUT, NOT TOKENISED, and that is on purpose. colors.css
   defines --border-primary as --white and --border-secondary as --green, which
   are solid colours rather than the low-alpha hairlines this component wants.
   Drawing a form with them puts a full-strength #39FF14 cage around every
   field. The rest of the site already writes rgba() literals for borders; this
   file now does the same, so the palette can be changed without the calculator
   turning into a christmas tree.

   Colour, spacing, radius and transition all still resolve from colors.css.
   ========================================================================== */

.slx-calc {
  width: 100%;
  margin: 0 auto 12px;
  overflow: hidden;

  border: 1px solid rgba(0, 230, 255, 0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));

  color: var(--text-primary);
}

/* ---------- head ---------- */

.slx-calc__head {
  padding: clamp(20px, 2.4vw, 28px) clamp(18px, 2.6vw, 32px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.slx-calc__kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.slx-calc__lead {
  margin: 0;
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* ---------- body: inputs beside output ---------- */

.slx-calc__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.slx-calc__inputs,
.slx-calc__out {
  padding: clamp(20px, 2.4vw, 28px) clamp(18px, 2.6vw, 32px);
}

.slx-calc__inputs {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.slx-calc__out {
  display: flex;
  flex-direction: column;
}

/* ---------- the regulated toggle ---------- */

.slx-reg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 16px;

  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);

  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.slx-reg:hover,
.slx-reg:focus-within {
  border-color: rgba(0, 230, 255, 0.48);
  box-shadow: var(--glow-cyan-soft);
}

.slx-reg input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.slx-reg__label {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.slx-reg__note {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* ---------- number fields ---------- */

.slx-field + .slx-field {
  margin-top: 20px;
}

.slx-field label {
  display: block;
  margin-bottom: 8px;
  color: rgba(245, 247, 250, 0.86);
  font-size: 0.9rem;
  font-weight: 700;
}

.slx-hint {
  color: var(--text-muted);
  font-weight: 400;
}

.slx-field input[type="number"] {
  width: 100%;
  padding: 14px 15px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(1, 9, 17, 0.68);

  color: var(--white);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.05rem;

  outline: none;
  -moz-appearance: textfield;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.slx-field input[type="number"]::placeholder {
  color: var(--text-muted);
  font-family: inherit;
}

.slx-field input[type="number"]:focus {
  border-color: rgba(0, 230, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(0, 230, 255, 0.12);
  background: rgba(1, 12, 22, 0.92);
}

/* ---------- output ---------- */

.slx-out__label {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.slx-out__figure {
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(0, 230, 255, 0.28);

  color: var(--cyan);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--glow-cyan-soft);

  transition: color var(--transition-fast);
}

/* Flashed by pricing-calc.js for 130ms on each recalculation. */
.slx-out__figure.is-updating {
  color: var(--green);
}

.slx-out__rows {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.slx-out__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}

.slx-out__row span:last-child {
  color: var(--cyan);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.slx-out__row.is-total {
  margin-top: 6px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-weight: 700;
}

.slx-out__row.is-onboarding {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.slx-out__row.is-onboarding span:last-child {
  color: var(--green);
  font-weight: 700;
}

/* The unclassed prose block sitting under the rows in pricing.php: the SRA,
   loyalty credit and contracts sentence. It inherits the row font size but is
   not a row, so it needs its own spacing or it crowds the total. */
.slx-out__rows > div:not(.slx-out__row) {
  margin-top: 16px;
  line-height: 1.65;
}

.slx-out__note {
  margin-top: auto;
  padding-top: 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Injected by pricing-calc.js: the missing-input reason, and the notice when
   the $1,000 monthly minimum has been applied. */
.slx-warn {
  color: var(--yellow);
  font-weight: 600;
}

/* ---------- foot ---------- */

.slx-calc__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: clamp(16px, 2vw, 22px) clamp(18px, 2.6vw, 32px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 7, 13, 0.35);
}

.slx-calc__method {
  flex: 1 1 40ch;
  max-width: 60ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.slx-calc__foot .btn {
  flex: none;
}

/* ---------- narrow ----------
   One column. The old breakpoint was 1280px, which is inside the 1440px
   container, so the calculator stacked on screens wide enough to hold both
   halves comfortably. */

@media (max-width: 900px) {
  .slx-calc__body {
    grid-template-columns: 1fr;
  }

  .slx-calc__inputs {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .slx-out__figure {
    font-size: 2.4rem;
  }

  .slx-calc__foot .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slx-out__figure,
  .slx-reg,
  .slx-field input[type="number"] {
    transition: none;
  }
}
