/* API Key page only: keep the card list and its menus in normal page flow. */
.table-page-layout:has(.prototype-key-full-list) {
  height: auto;
  min-height: 0;
}

.table-page-layout:has(.prototype-key-full-list) > .layout-section-scrollable {
  flex: none;
  min-height: 0;
}

.table-page-layout:has(.prototype-key-full-list) > .layout-section-scrollable > .table-scroll-container {
  display: block;
  height: auto;
  overflow: visible;
}

/* Use the available card width, including when the desktop sidebar is open. */
.table-page-layout:has(.prototype-key-full-list) .prototype-key-list {
  container-name: aegisy-api-key-list;
  container-type: inline-size;
}

@media (min-width: 641px) {
  @container aegisy-api-key-list (max-width: 820px) {
    .table-page-layout:has(.prototype-key-full-list) .prototype-key-head {
      display: none;
    }

    .table-page-layout:has(.prototype-key-full-list) .prototype-key-row {
      grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
    }

    .table-page-layout:has(.prototype-key-full-list) .prototype-key-usage {
      grid-column: 1;
    }

    .table-page-layout:has(.prototype-key-full-list) .prototype-key-state {
      grid-column: 2;
      grid-row: 2;
    }

    .table-page-layout:has(.prototype-key-full-list) .prototype-key-actions {
      grid-column: 3;
      grid-row: 1 / 3;
    }
  }
}
