/* Calcolatore pubblico (/calcolatore). Si appoggia ai token di beta.css:
   qui c'è solo ciò che riguarda il calcolatore e l'invito alla lista d'attesa. */

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.05rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); border-radius: 11px; padding: 4px; }
.seg-btn {
  appearance: none; border: 0; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 650;
  color: var(--muted); background: transparent;
  padding: .55rem .3rem; border-radius: 8px;
  transition: background .18s, color .18s;
}
.seg-btn.is-on { background: var(--surface); color: var(--brand-fg); box-shadow: var(--shadow); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.field { display: flex; flex-direction: column; gap: .32rem; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-size: .74rem; color: var(--muted); font-weight: 600; }
.field input, .field select {
  font-family: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface-2); border: 1px solid transparent; border-radius: 9px;
  padding: .55rem .6rem; width: 100%; min-width: 0;
  font-variant-numeric: tabular-nums;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.hidden { display: none !important; }

.promo-row { display: flex; align-items: center; gap: .55rem; }
.promo-row input[type=range] { flex: 1; accent-color: var(--brand); padding: 0; background: transparent; border: 0; }
.promo-n { width: 62px !important; text-align: center; flex-shrink: 0; }

.result { background: var(--surface-2); border-radius: 13px; padding: .95rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.amount {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 2.35rem; line-height: 1; font-weight: 800;
  letter-spacing: -.025em; font-variant-numeric: tabular-nums;
}
.amount.is-pos { color: var(--ok); }
.amount.is-neg { color: var(--danger); }
.amount.is-price { color: var(--brand-fg); }
.subline { margin: 0; font-size: .82rem; color: var(--muted); }
.subline.is-warn { color: var(--danger); font-weight: 600; }

.bar { display: flex; height: 15px; border-radius: 8px; overflow: hidden; background: var(--border); margin-top: .15rem; }
.bar > span { height: 100%; transition: width .35s cubic-bezier(.4, 0, .2, 1); }
.seg-net { background: var(--ok); }
.seg-fee { background: var(--brand); }
.seg-cost { background: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.lg { display: flex; align-items: center; gap: .35rem; font-size: .78rem; }
.lg b { font-variant-numeric: tabular-nums; font-weight: 700; }
.lg .cap { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.dot.is-net { background: var(--ok); }
.dot.is-fee { background: var(--brand); }
.dot.is-cost { background: var(--muted); }

.receipt summary {
  cursor: pointer; list-style: none;
  font-size: .82rem; font-weight: 650; color: var(--brand-fg);
  padding: .35rem 0; display: flex; align-items: center; gap: .35rem;
}
.receipt summary::-webkit-details-marker { display: none; }
.receipt summary::before { content: "›"; font-size: 1.05rem; line-height: 1; display: inline-block; transition: transform .2s; }
.receipt[open] summary::before { transform: rotate(90deg); }
.rec-lines { display: flex; flex-direction: column; gap: .3rem; padding: .25rem 0 .4rem; }
.rec-line { display: flex; justify-content: space-between; gap: .7rem; font-size: .84rem; font-variant-numeric: tabular-nums; }
.rec-line .lbl { color: var(--muted); }
.rec-total { border-top: 1px dashed var(--border); margin-top: .2rem; padding-top: .4rem; font-weight: 700; }
.rec-total .lbl { color: var(--text); }
.rec-none { font-size: .84rem; color: var(--ok); font-weight: 600; margin: 0; padding: .2rem 0 .4rem; }

.note { margin: 0; font-size: .75rem; line-height: 1.45; color: var(--muted); }

/* Invito alla lista d'attesa, sotto al calcolatore. */
.cta-box {
  margin-top: 1.5rem;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 16px;
  padding: 1.1rem 1.05rem 1.2rem;
}
.cta-box h2 { font-family: 'Sora', system-ui, sans-serif; font-size: 1.15rem; margin: 0 0 .4rem; letter-spacing: -.015em; }
.cta-box p { margin: 0 0 .9rem; font-size: .92rem; line-height: 1.5; color: var(--text); }
.cta-link {
  display: block; text-align: center; text-decoration: none;
  font-family: 'Sora', system-ui, sans-serif; font-weight: 700; font-size: 1rem;
  background: var(--brand); color: var(--brand-ink);
  padding: .85rem 1rem; border-radius: var(--radius);
}

@media (prefers-reduced-motion: reduce) {
  .bar > span, .seg-btn, .receipt summary::before { transition: none; }
}
