/* =========================================================================
 * /alpirisch/alpirisch.css
 *
 * Stili dedicati per il tool Al.Pi.Ris.Ch.
 * Tutte le regole sono prefissate .apr- per evitare conflitti con
 * .openrisk.css globale (Tailwind preflight + tema v0.3).
 * Lo scoping è sotto .alpirisch-tool (classe applicata al body).
 * ========================================================================= */

/* --------- Cut-off banner -------------------------------------------- */

.alpirisch-tool .apr-cutoff-box {
  background: #f7faf7;
  border: 1px solid #b9d6b9;
  border-left: 4px solid #2d7a2d;
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin: 1rem 0 0;
}

.alpirisch-tool .apr-cutoff-box[open] {
  background: #fff;
  padding-bottom: 1.25rem;
}

.alpirisch-tool .apr-cutoff-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 1rem;
}

.alpirisch-tool .apr-cutoff-summary::-webkit-details-marker {
  display: none;
}

.alpirisch-tool .apr-cutoff-icon {
  font-size: 1.2rem;
}

.alpirisch-tool .apr-cutoff-title em {
  font-style: italic;
  color: #2d7a2d;
}

.alpirisch-tool .apr-cutoff-hint {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--c-mute);
  font-family: var(--ff-sans);
}

.alpirisch-tool .apr-cutoff-body {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #cdddcd;
}

.alpirisch-tool .apr-cutoff-conditions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.alpirisch-tool .apr-cutoff-cond {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: #fafcfa;
  border: 1px solid #e3ebe3;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.alpirisch-tool .apr-cutoff-cond:hover {
  background: #f1f6f1;
}

.alpirisch-tool .apr-cutoff-cond input[type="checkbox"]:checked + span {
  color: #1a1a1a;
}

.alpirisch-tool .apr-cutoff-cond input[type="checkbox"]:checked ~ * {
  font-weight: 500;
}

.alpirisch-tool .apr-cutoff-cond:has(input:checked) {
  background: #eaf3ea;
  border-color: #b9d6b9;
}

.alpirisch-tool .apr-cutoff-cond input[type="checkbox"] {
  margin-top: 0.18rem;
  flex-shrink: 0;
}

.alpirisch-tool .apr-cutoff-cond span {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--c-ink-s);
}

.alpirisch-tool .apr-cutoff-result {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  background: var(--c-mute-bg, #f4f4f0);
  font-size: 0.92rem;
}

.alpirisch-tool .apr-cutoff-result.is-applicable {
  background: #eaf3ea;
  border: 1px solid #2d7a2d;
  color: #1a4f1a;
  font-weight: 500;
}

.alpirisch-tool .apr-cutoff-result.is-not-applicable {
  background: #fdf6f0;
  border: 1px solid #c08c5a;
  color: #6e4a20;
}

/* --------- Multi-select choice grid (per "tipo di processo") --------- */

.alpirisch-tool .choice-grid-multi .choice-card {
  position: relative;
}

.alpirisch-tool .choice-grid-multi .choice-card.selected {
  background: var(--c-bg-soft, #fafaf6);
  border-color: var(--c-cobalto, #1a3a9e);
}

/* --------- Note dataset injection ------------------------------------ */

.alpirisch-tool #apr-dataset {
  display: none;
}
