.adt-table-wrap {
  width: 100%;
}

.adt-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.adt-table caption {
  text-align: left;
  padding: 8px 0;
  font-weight: 600;
}

.adt-cell {
  text-wrap: wrap;
  min-width: 200px;
  padding: 5px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  background: #fff;
  /*white-space: nowrap;*/
}

.adt-align-left {
  text-align: left;
}

.adt-align-center {
  text-align: center;
}

.adt-align-right {
  text-align: right;
}

/* Header sticky top */
.adt-table thead th.adt-cell {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .15);
}

/* Corner (logo cell) layout */
.adt-corner {
  width: 150px;
  min-width: 150px;
  text-align: center;
  padding: 20px;
}

.adt-logo {
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

.adt-corner-label {
  margin-top: 6px;
  font-size: 12px;
  opacity: .8;
}

/* Titolo unico */
.adt-title-cell {
  font-weight: 700;
  text-align: center;
}

/* Header typography */
.adt-head-title {
  font-weight: 700;
}

.adt-head-sub {
  font-size: 12px;
  opacity: .8;
  margin-top: 2px;
}

/* Sticky first column (row titles) */
.adt-sticky-first-col .adt-table th.adt-row-title {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

/* Top-left corner cell (sopra tutto) */
.adt-sticky-first-col .adt-table thead th.adt-corner {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
}

/* righe alternate (facoltativo) */
.adt-table tbody tr:nth-child(even) .adt-cell {
  background: rgba(0, 0, 0, .015);
}

.adt-sticky-first-col .adt-table tbody tr:nth-child(even) th.adt-row-title {
  background: #fff;
}

/* Trigger */
.adt-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
  outline: none;
}

.adt-tooltip:focus {
  outline: 2px solid rgba(0, 0, 0, .25);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Floating tooltip (appeso al body => non viene tagliato da overflow) */
.adt-float-tooltip {
  position: fixed;
  z-index: 999999;
  display: none;
  max-width: 320px;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .88);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .12s ease;
}

/* freccetta */
.adt-float-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #e2e8f0;
}

/* se lo mettiamo sotto, freccia sopra */
.adt-float-tooltip.is-below::after {
  top: -6px;
  bottom: auto;
  border-top-color: transparent;
  border-bottom-color: #e2e8f0;
}

.adt-float-tooltip__content {
  margin: 0;
}

.adt-section-row .adt-section-cell {
  text-align: center;
  font-weight: 600;
  background: #e2e8f0;
}

.adt-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  /* importante per non tagliare roba in verticale */
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  position: relative;
}

/* === FORCE HORIZONTAL SCROLL  === */
.adt-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.adt-table {
  display: inline-table;
  width: auto !important;
  min-width: 100% !important;
  white-space: nowrap;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
}

.adt-table-wrap table {
  max-width: none !important;
}

/* Sticky first col sempre */
.adt-sticky-first-col .adt-table th.adt-row-title {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

/* Top-left corner sticky */
.adt-sticky-first-col .adt-table thead th.adt-corner {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
}

.adt-table-wrap {
  max-width: 100%;
  overflow: visible !important;
}

.adt-caption {
  text-align: left;
  padding: 8px 0;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 32px;
}

.adt-row-title {
  vertical-align: middle;
}

table * {
  font-size: 14px;
  font-family: "Poppins";
  font-weight: 400;
  line-height: 25px;
}

table td,
table th {
  border: 1px solid #e2e8f0 !important;
}

@media (max-width: 768px) {
  .adt-title-cell {
    text-align: var(--adt-title-align, center);
  }
}

/* Rounded corners without breaking sticky first column */
.adt-table thead tr:first-child th:first-child {
  border-top-left-radius: 15px;
}

.adt-table thead tr:first-child th:last-child {
  border-top-right-radius: 15px;
}

.adt-table tbody tr:last-child th:first-child {
  border-bottom-left-radius: 15px;
}

.adt-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 15px;
}

.adt-table p {
  margin: 6px 2px !important;
}

.adt-sticky-first-col .adt-table th.adt-row-title {
  max-width: 200px;
  white-space: normal;
}

.adt-corner {
  min-width: 200px;
  width: 200px;
}

@media screen and (max-width: 780px) {
  table * {
    font-size: 12px;
    font-family: "Poppins";
    font-weight: 400;
    line-height: 15px;
  }

  /* Sovrascriviamo la regola globale usando !important */
  .adt-table {
    min-width: 100px !important;
    width: auto !important;
  }

  .adt-cell {
    /* Riduciamo il min-width delle celle per permettere alla tabella di stringersi */
    min-width: 80px;
    max-width: none;
    /* Rimuoviamo il limite se vogliamo che respiri */
    white-space: normal;
    /* Permette al testo di andare a capo */
  }

  .adt-sticky-first-col .adt-table th.adt-row-title {
    max-width: 100px;
    min-width: 100px;
    white-space: normal;
  }

  .adt-corner {
    min-width: 120px;
    width: 120px;
  }
}

.adt-table-scroll {
  border-radius: 12px;
}

.adt-table strong {
  font-weight: 600;
}