/* Blocco prezzi — tabella nel design v2 del tema (scelto rispetto alla
   table-striped piatta storica): header blu, righe alternate, card. */

.b-prezzi__title {
  margin-bottom: var(--sp-8);
}

.b-prezzi__scroll {
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-top: 34px; /* spazio per il badge dente sporgente */
}

/* Badge dente come sulle landing (pacchetti): cerchio bianco sporgente
   con bordo nel colore dell'header e il dente storico Risorsa-13 */
.b-prezzi__scroll::before {
  content: '';
  position: absolute;
  top: -28px;
  left: 50%;
  translate: -50% 0;
  width: 56px;
  height: 56px;
  border: 8px solid var(--c-primary-dark);
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40.5 40.5'%3E%3Ccircle fill='%23fff' cx='20.25' cy='20.25' r='20.25'/%3E%3Cpath fill='%230080e9' d='M28.31,11.09a6.6,6.6,0,0,0-8-.41,6.58,6.58,0,0,0-8,.41c-2.2,2.11-2,5.48-1,8a12.29,12.29,0,0,0,1,1.9l.42-.27h0l-.41.28c.18.3.37.61.54.93a7.76,7.76,0,0,1,.93,2.77,23.27,23.27,0,0,0,.61,3.61c.25.9.75,2.77,2.47,2.77,1.4,0,2.3-2,2.91-6.4.13-.87.4-1,.56-1s.43.17.55,1c.61,4.43,1.51,6.4,2.91,6.4,1.73,0,2.23-1.86,2.47-2.77a23.42,23.42,0,0,0,.61-3.59,7.86,7.86,0,0,1,.94-2.8c.17-.32.36-.64.54-.93a12,12,0,0,0,1-1.91C30.25,16.57,30.5,13.2,28.31,11.09Zm-4.5,18.24c-.26-.28-.86-1.54-1.33-4.93-.27-1.9-1.31-2.4-2.18-2.5h-.14c-.82.09-1.86.59-2.12,2.49C17.57,27.74,17,29,16.71,29.33c-.39-.13-.65-1.08-.76-1.5a23.34,23.34,0,0,1-.57-3.36,9.17,9.17,0,0,0-1.12-3.39c-.19-.36-.4-.7-.6-1a10.65,10.65,0,0,1-.87-1.63c-.76-1.95-1-4.57.58-6.1h0a4.87,4.87,0,0,1,6.3,0c.23.23,2.34,2.25,4.34,2.25a.85.85,0,0,0,0-1.69,4.51,4.51,0,0,1-2.4-1.11,4.94,4.94,0,0,1,5.52.5c1.59,1.53,1.35,4.15.59,6.09a10.66,10.66,0,0,1-.89,1.66c-.19.33-.4.66-.58,1a9.39,9.39,0,0,0-1.13,3.42,21,21,0,0,1-.57,3.34C24.45,28.25,24.19,29.21,23.81,29.33ZM13,12Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.b-prezzi__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--c-surface);
  border-radius: var(--radius);
}

.b-prezzi__table th,
.b-prezzi__table td {
  text-align: left;
  padding: var(--sp-3) var(--sp-6);
  border-bottom: 1px solid var(--c-surface-grey);
}

.b-prezzi__table thead th {
  background: var(--c-primary-dark);
  color: #fff;
  font-weight: 600;
  /* Il badge dente sporge 28px dentro l'header: il testo parte sotto,
     come nell'header dei pacchetti landing */
  padding-top: calc(var(--sp-3) + 28px);
}

.b-prezzi__table thead th:first-child {
  border-top-left-radius: var(--radius);
}

.b-prezzi__table thead th:last-child {
  border-top-right-radius: var(--radius);
}

.b-prezzi__table tbody tr:nth-child(even) td {
  background: var(--c-surface-alt);
}

.b-prezzi__table tbody tr:last-child td {
  border-bottom: 0;
}

.b-prezzi__table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius);
}

.b-prezzi__table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius);
}

/* Su mobile la card scrolla in orizzontale: lo scroll ritaglierebbe
   il badge sporgente, quindi si nasconde */
@media (max-width: 47.999rem) {
  .b-prezzi__scroll {
    overflow-x: auto;
    margin-top: 0;
  }

  .b-prezzi__scroll::before {
    display: none;
  }

  .b-prezzi__table thead th {
    padding-top: var(--sp-3);
  }
}

.b-prezzi__table .b-prezzi__col-prezzo {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
  color: var(--c-primary-dark);
  font-variant-numeric: tabular-nums;
}

.b-prezzi__table thead .b-prezzi__col-prezzo {
  color: #fff;
}

.b-prezzi__nota {
  display: block;
  font-weight: 400;
  color: var(--c-text-muted);
}

.b-prezzi__finanziamenti {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
  color: var(--c-text-muted);
}

.b-prezzi__finanziamenti .icon {
  color: var(--c-primary);
}

.b-prezzi__cta {
  margin-top: var(--sp-6);
}
