.ami-table-shell {
  overflow: auto;
  max-height: 36rem;
  border: 1px solid #d8e0e5;
  border-radius: 10px;
}

.ami-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ami-table-actions {
  margin-top: .85rem;
}

.ami-table-actions .is-disabled {
  opacity: .45;
  pointer-events: none;
}

.ami-table-actions .admin-icon-btn-primary.is-disabled {
  color: var(--pli-deep);
  background: #fff;
  border-color: #c5d0da;
}

.ami-inline-input {
  width: 100%;
  min-width: 10rem;
  height: 2rem;
  padding: .3rem .5rem;
  border: 1px solid var(--pli-blue);
  border-radius: 4px;
  background: #fff;
  color: var(--pli-text);
  font: inherit;
}

.ami-inline-input:focus {
  outline: 2px solid rgba(17, 101, 147, .18);
  outline-offset: 1px;
}

.ami-table-feedback {
  min-height: 1.25rem;
  margin: .45rem 1rem 0;
  color: #24633d;
  font-size: .75rem;
}

.ami-table-feedback.is-error {
  color: #922b21;
}

.ami-table--database {
  min-width: 2700px;
  font-size: .74rem;
}

.ami-table--database .ami-cell-id {
  width: 17rem;
  max-width: 17rem;
  font-family: Consolas, "Courier New", monospace;
}

.ami-table--database .ami-cell-token {
  width: 20rem;
  max-width: 20rem;
  font-family: Consolas, "Courier New", monospace;
}

.ami-table--database thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.ami-table--database th,
.ami-table--database td {
  text-align: center;
  vertical-align: middle;
  line-height: 1.1;
}

.ami-table--database th {
  padding: .5rem .6rem;
  background: var(--pli-deep);
  color: #fff;
  font-size: .68rem;
}

.ami-table--database td {
  height: 1.7rem;
  max-width: 220px;
  padding: .18rem .55rem;
  overflow: hidden;
  color: inherit;
  font-size: .64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ami-table--database .col-select {
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: 2.75rem;
}

.ami-table--database .col-select input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--pli-blue);
  cursor: pointer;
}

.ami-table--database tbody tr.is-selected td {
  background: #eef4fa;
}

.ami-table--database tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--pli-blue), 2px 0 6px rgba(0, 59, 90, .08);
}

.ami-cell-link {
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pli-blue);
  font: inherit;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.ami-row-actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: .4rem;
  min-width: 5rem;
}

.ami-field-source {
  margin: -.35rem 0 .75rem;
  color: var(--pli-muted);
  font-size: .78rem;
}

.ami-field-source a {
  color: var(--pli-blue);
  font-weight: 700;
}

.ami-pagination {
  margin: .75rem 0 0;
}

.ami-page .ami-table--database,
.ami-page .ami-table--database th,
.ami-page .ami-table--database td,
.ami-page .ami-table--database button,
.ami-page .ami-pagination {
  font-size: var(--ami-font-child, .70rem);
}

.ami-page .ami-table-heading {
  margin-bottom: var(--ami-space-sm, .75rem);
}

/*
  Central de respostas: dez colunas apenas, entao a tabela ocupa a largura do
  painel em vez do min-width das 17 colunas do espaco analitico. As larguras
  sao fixas para que as cinco metricas (mesmo denominador) fiquem alinhadas.
*/
.ami-table--respostas {
  width: 100%;
  min-width: 62rem;
  table-layout: fixed;
}

.ami-table--respostas th {
  padding: .5rem .4rem;
  line-height: 1.25;
  white-space: normal;
}

.ami-table--respostas td {
  max-width: none;
}

.ami-table--respostas th:nth-child(1),
.ami-table--respostas td:nth-child(1) { width: 2.75rem; }

.ami-table--respostas th:nth-child(2),
.ami-table--respostas td:nth-child(2) { width: 7rem; }

.ami-table--respostas th:nth-child(3),
.ami-table--respostas td:nth-child(3) { width: 15.5rem; }

.ami-table--respostas th:nth-child(n+4):nth-child(-n+8),
.ami-table--respostas td:nth-child(n+4):nth-child(-n+8) { width: 6.5rem; }

.ami-table--respostas th:nth-child(9),
.ami-table--respostas td:nth-child(9),
.ami-table--respostas th:nth-child(10),
.ami-table--respostas td:nth-child(10) { width: 8.5rem; }

.ami-table--respostas .ami-cell-id {
  width: 15.5rem;
  max-width: 15.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
