@use '../global/common' as global;

.acms-related-table {
  width: 100% !important;
  margin: 0 0 10px !important;
  border-collapse: collapse !important;
  border: none !important;

  .acms-related-table-item > th,
  .acms-related-table-item > td {
    display: block;
    color: global.$acms-color-black !important;
    border: none !important;
  }

  .acms-related-table-item > th:empty,
  .acms-related-table-item > td:empty {
    padding: 0;
  }

  .acms-related-table-item > th:not(:empty) {
    padding: 7px 10px 0 !important;
    text-align: left;
    white-space: nowrap;
  }

  .acms-related-table-item > td:not(:empty) {
    padding: 7px 10px !important;
  }

  @include global.media-breakpoint-up(md) {
    .acms-related-table-item > th,
    .acms-related-table-item > td {
      display: table-cell;
    }

    .acms-related-table-item > th:not(:empty) {
      width: 10em;
      padding: 7px 10px !important;
      text-align: right;
    }
  }
}

.acms-related-entry-list {
  display: flex;
  flex-flow: column nowrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.acms-related-entry {
  display: flex;
  flex-flow: row nowrap;
  padding: 10px;

  > * + * {
    margin-left: 10px;
  }

  > * {
    display: flex;
    align-items: center;
  }
}

.acms-related-entry-handler-item {
  display: grid;
  width: 36px;
}

.acms-related-entry-title-item {
  flex: 1;
}

.acms-related-entry-action-item {
  display: flex;

  > * + * {
    margin-left: 5px;
  }
}

.acms-related-entry-image {
  object-fit: cover;
}

.acms-related-entry-title {
  display: flex;
  flex-wrap: wrap;
}
