/* ═══════════════════════════════════════════════════════════
   CalcolaPro — Shared Calculator CSS
   Importato dopo style.css da tutti i calcolatori.
   Definisce le classi standard e le utility per eliminare
   gli stili inline ripetuti nei 36 calcolatori.
   ═══════════════════════════════════════════════════════════ */

/* ─── CALC-FORM ─────────────────────────────────────────────
   Contenitore principale del form di calcolo.
   ──────────────────────────────────────────────────────────── */
.calc-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* ─── CALC-SECTION ──────────────────────────────────────────
   Sezione di input con separatore inferiore.
   Usare .last per l'ultima sezione (nessun separatore).
   ──────────────────────────────────────────────────────────── */
.calc-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.calc-section:last-child,
.calc-section.last {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.calc-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── DISCLAIMER ────────────────────────────────────────────
   Testo disclaimer standard sotto i risultati.
   ──────────────────────────────────────────────────────────── */
.disclaimer {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.disclaimer strong,
.disclaimer b { color: var(--text); }

/* ─── CROSS-LINKS ───────────────────────────────────────────
   Sezione link correlati. Già definita in style.css.
   Questa regola garantisce il naming semantico per i nuovi file.
   ──────────────────────────────────────────────────────────── */
/* .cross-links definita in style.css — nessuna duplicazione */

/* ═══════════════════════════════════════════════════════════
   ALERT / NOTICE BOXES
   Eliminano i pattern di colori inline ripetuti nei calcolatori.
   ═══════════════════════════════════════════════════════════ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.65;
  margin-bottom: 0;
}
.alert + .alert { margin-top: 10px; }

.alert-warning {
  background: #fef9c3;
  border: 1.5px solid #fde68a;
}
.alert-warning strong,
.alert-warning b { color: #92400e; }
.alert-warning,
.alert-warning span:not(.alert-title) { color: #78350f; }

.alert-info {
  background: var(--blue-xlight);
  border: 1.5px solid var(--blue-light);
}
.alert-info strong,
.alert-info b { color: var(--blue-dark); }
.alert-info,
.alert-info span:not(.alert-title) { color: #1e3a8a; }

.alert-success {
  background: #d1fae5;
  border: 1.5px solid #a7f3d0;
}
.alert-success strong,
.alert-success b { color: #065f46; }
.alert-success,
.alert-success span:not(.alert-title) { color: #047857; }

/* ═══════════════════════════════════════════════════════════
   CALC-SUBSECTION
   Box di input con sfondo grigio per raggruppare campi correlati
   (es: "Immobile 1", "Immobile 2", sezioni parametri avanzati).
   ═══════════════════════════════════════════════════════════ */
.calc-subsection {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}
.calc-subsection:last-of-type { margin-bottom: 0; }

.calc-subsection-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 12px;
}
.calc-subsection-title.red { color: var(--red); }
.calc-subsection-title.green { color: var(--green); }

/* ═══════════════════════════════════════════════════════════
   TOOL-CLUSTER
   Box scuro con gradiente per mostrare strumenti correlati.
   Versione dark di .related-tools per i nuovi calcolatori.
   ═══════════════════════════════════════════════════════════ */
.tool-cluster {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a8a 100%);
  border-radius: 16px;
  padding: 28px 24px;
  margin-top: 16px;
}
.tool-cluster-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.tool-cluster-header span { font-size: 1.5rem; }
.tool-cluster h2,
.tool-cluster h3 {
  color: #fff; font-size: 1.15rem; font-weight: 800; margin: 0;
}
.tool-cluster-sub {
  color: rgba(255,255,255,0.6); font-size: 13px;
  margin: 0 0 20px;
}
.tool-cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.tool-cluster-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  display: block;
  transition: background var(--transition);
}
.tool-cluster-card:hover {
  background: rgba(255,255,255,0.13);
  text-decoration: none;
}
.tool-cluster-card-tag {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.tool-cluster-card-title {
  color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 4px;
}
.tool-cluster-card-desc {
  color: rgba(255,255,255,0.5); font-size: 12px;
}
.tool-cluster-card-cta {
  margin-top: 10px;
  font-weight: 700; font-size: 12px;
  padding: 6px 12px; border-radius: 6px;
  text-align: center; display: block;
  color: var(--navy);
}

/* ─── ARTICLE-META ──────────────────────────────────────────
   Riga autore/data sotto il sottotitolo dell'header calcolatore.
   Stesso pattern gia' in uso (inline) sulle pagine guida.
   ──────────────────────────────────────────────────────────── */
.article-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; font-size: 13px; color: var(--text-muted);
  flex-wrap: wrap; margin-top: 16px;
}
.article-meta a { color: inherit; text-decoration: underline; }
