.admin-messages > .admin-message-success > div {
  padding-block: 0.5rem;
}

.admin-messages:not(:has(> li:not(.admin-message-success))) {
  margin-block-end: 1rem;
}

/* Unfold wraps the breadcrumb list in a div with responsive bottom margins. */
#main > .px-4 > div:has(> ul.flex-wrap) {
  margin-block-end: 1rem;
}

@media (width < 64rem) {
  #changelist-form #result_list,
  .mobile-admin-table > table {
    display: table;
    width: max-content;
    min-width: 100%;
  }

  #changelist-form #result_list > tbody {
    display: table-row-group;
  }

  #changelist-form #result_list > tbody > tr {
    display: table-row;
    border: 0;
    box-shadow: none;
  }

  #changelist-form #result_list > thead > tr > th,
  #changelist-form #result_list > tbody > tr > :is(th, td) {
    display: table-cell;
    padding: 0.5rem 0.75rem;
  }

  #changelist-form #result_list > tbody > tr > :is(th, td)::before {
    content: none;
  }

  #changelist-form #result_list label:has(#action-toggle) > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .mobile-admin-table {
    overflow-x: auto;
  }

  .mobile-admin-table > table :is(th, td) {
    padding: 0.5rem 0.75rem;
    text-align: start;
    white-space: nowrap;
  }

  .mobile-admin-table > table td {
    border-top: 1px solid rgb(var(--color-base-200));
  }

  .dark .mobile-admin-table > table td {
    border-color: rgb(var(--color-base-800));
  }
}
