// Delivery log table (inside .arraysubs-audit-table-wrap)
//
// Sized to fit beside the expanded admin menu from a 1024px wide window:
// tighter cells, wrapping endpoint names, event keys and times, and one Time
// column for the created time and the next retry. Narrower screens scroll the
// table inside its wrapper.
.arraysubs-webhooks-log {
  &.widefat th,
  &.widefat td {
    padding: 8px;
    vertical-align: top;
  }

  &__row {
    cursor: pointer;
  }

  &__key {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-top: 2px;
    padding: 0;
    background: transparent;
    color: #646970;
    font-size: 11px;
  }

  &__event {
    min-width: 88px;
  }

  &__endpoint {
    min-width: 72px;
    overflow-wrap: anywhere;
  }

  &__status {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }

  &__nowrap {
    white-space: nowrap;
  }

  &__response {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  // Wide enough to keep the date on one line when the time wraps under it.
  &__time {
    min-width: 92px;
  }

  &__next {
    display: block;
    margin-top: 2px;
    color: #646970;
    font-size: 12px;
  }

  &__action {
    width: 1%;
    white-space: nowrap;
  }

  .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }

  td .button.button-small {
    min-height: 24px;
    padding: 0 6px;
    line-height: 22px;
  }
}

@media (max-width: 782px) {
  // Keep the log table readable and scroll it inside its wrapper.
  .arraysubs-webhooks-log {
    min-width: 720px;
  }
}
