/* PA WebForms template - GridView/DataGrid/DetailsView */
.pa-table-wrap {
  width: 100%;
  overflow-x: auto;
}

table.pa-table,
table.grid,
.GridView,
.DataGrid,
.DetailsView,
.pa-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--pa-text);
  font-size: .92rem;
}

table.pa-table th,
table.grid th,
.GridView th,
.DataGrid th,
.DetailsView th {
  padding: .78rem .9rem;
  background: #eaf0f7;
  color: #40516a;
  border-bottom: 1px solid var(--pa-border);
  font-size: .78rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

table.pa-table td,
table.grid td,
.GridView td,
.DataGrid td,
.DetailsView td {
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--pa-border);
  vertical-align: middle;
}

table.pa-table tr:hover td,
table.grid tr:hover td,
.GridView tr:hover td,
.DataGrid tr:hover td {
  background: #fbfdff;
}

.pa-table__actions,
.grid-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  justify-content: flex-end;
  white-space: normal;
}

.pa-table-action-primary,
.pa-user-detail-trigger {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.7rem;
  padding: .45rem .8rem;
  border: 2px solid var(--pa-primary);
  border-radius: var(--pa-radius);
  background: var(--pa-primary);
  color: #fff;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(23, 50, 77, .12);
}

.pa-table-action-primary:hover,
.pa-table-action-primary:focus,
.pa-user-detail-trigger:hover,
.pa-user-detail-trigger:focus {
  border-color: var(--pa-dark);
  background: var(--pa-dark);
  color: #fff;
  text-decoration: none;
}

.pa-table-action-primary i,
.pa-user-detail-trigger i {
  color: inherit;
  font-size: 1.05rem;
}

.pa-row-action,
.pa-section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  min-width: 2.7rem;
  height: 2.7rem;
  min-height: 2.7rem;
  border: 2px solid var(--pa-border);
  border-radius: var(--pa-radius);
  background: #fff;
  color: var(--pa-primary);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(23, 50, 77, .1);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.pa-row-action:hover,
.pa-row-action:focus,
.pa-section-action:hover,
.pa-section-action:focus {
  border-color: var(--pa-primary);
  background: var(--pa-soft);
  color: var(--pa-primary);
  box-shadow: 0 0 0 .18rem rgba(23, 74, 124, .16);
  outline: 0;
  text-decoration: none;
}

.pa-row-action--delete,
.pa-row-action--reset {
  color: var(--pa-primary);
}

.pa-section-action--done {
  border-color: rgba(0, 122, 82, .38);
  background: #f1fbf6;
  color: var(--pa-success);
}

.pa-section-action--alert {
  border-color: rgba(173, 120, 0, .42);
  background: #fff8df;
  color: var(--pa-warning);
}

.pa-section-action--incomplete,
.pa-section-action--delete {
  border-color: rgba(176, 0, 32, .36);
  background: #fff4f4;
  color: var(--pa-danger);
}

.pa-pager,
.GridPager,
.PagerStyle {
  padding: .85rem;
  background: #fff;
  border-top: 1px solid var(--pa-border);
  text-align: right;
}

.pa-pager a,
.GridPager a,
.PagerStyle a,
.pa-pager span,
.GridPager span,
.PagerStyle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  margin-left: .25rem;
  padding: .25rem .55rem;
  border: 1px solid var(--pa-border);
  border-radius: 4px;
  color: var(--pa-dark);
  font-weight: 800;
  text-decoration: none;
}

.pa-pager span,
.GridPager span,
.PagerStyle span {
  background: var(--pa-primary);
  border-color: var(--pa-primary);
  color: #fff;
}

.pa-empty-state {
  padding: 2rem;
  border: 1px dashed var(--pa-border-strong);
  border-radius: var(--pa-radius);
  background: #fff;
  color: var(--pa-muted);
  text-align: center;
}

@media (max-width: 700px) {
  .pa-table-wrap {
    overflow-x: visible;
  }

  table.pa-table,
  table.grid,
  .GridView,
  .DataGrid {
    display: block;
    background: transparent;
  }

  table.pa-table thead,
  table.grid thead,
  .GridView thead,
  .DataGrid thead,
  table.pa-table th,
  table.grid th,
  .GridView th,
  .DataGrid th {
    display: none;
  }

  table.pa-table tbody,
  table.pa-table tr,
  table.pa-table td,
  table.grid tbody,
  table.grid tr,
  table.grid td,
  .GridView tbody,
  .GridView tr,
  .GridView td,
  .DataGrid tbody,
  .DataGrid tr,
  .DataGrid td {
    display: block;
    width: 100%;
  }

  table.pa-table tr,
  table.grid tr,
  .GridView tr,
  .DataGrid tr {
    margin-bottom: .85rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--pa-border);
    border-radius: var(--pa-radius);
  }

  table.pa-table td,
  table.grid td,
  .GridView td,
  .DataGrid td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: .75rem;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--pa-border);
    overflow-wrap: anywhere;
  }

  table.pa-table td:last-child,
  table.grid td:last-child,
  .GridView td:last-child,
  .DataGrid td:last-child {
    border-bottom: 0;
  }

  table.pa-table td::before,
  table.grid td::before,
  .GridView td::before,
  .DataGrid td::before {
    color: #40516a;
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  table.pa-table td:nth-child(1)::before,
  table.grid td:nth-child(1)::before,
  .GridView td:nth-child(1)::before,
  .DataGrid td:nth-child(1)::before {
    content: "Codice";
  }

  table.pa-table td:nth-child(2)::before,
  table.grid td:nth-child(2)::before,
  .GridView td:nth-child(2)::before,
  .DataGrid td:nth-child(2)::before {
    content: "Descrizione";
  }

  table.pa-table td:nth-child(3)::before,
  table.grid td:nth-child(3)::before,
  .GridView td:nth-child(3)::before,
  .DataGrid td:nth-child(3)::before {
    content: "Stato";
  }

  table.pa-table td:nth-child(4)::before,
  table.grid td:nth-child(4)::before,
  .GridView td:nth-child(4)::before,
  .DataGrid td:nth-child(4)::before {
    content: "Azioni";
  }

  .pa-table__actions,
  .grid-actions {
    justify-content: flex-start;
    white-space: normal;
  }
}
