.history-collapsed {
  summary {
    cursor: pointer;
    color: #0036b3;
    font-size: 13px;
    padding: 6px 0;
    list-style: none;

    &::-webkit-details-marker {
      display: none;
    }

    &:hover {
      text-decoration: underline;
    }
  }
}

.field--name-field-history.comment-wrapper {
  margin-bottom: 2em;

  .comments-title {
    font-weight: normal;
    font-size: 18px;
  }

  .comments-items {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-sizing: border-box;
    max-width: 720px;
  }

  .comments-items > .comment:last-child {
    margin-bottom: 0;
  }

  .comment {
    background: #ced9eb;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-sizing: border-box;
  }

  .comment__submitted {
    font-size: 12px;
    color: #55565b;
    margin: 0 0 14px;
  }

  .field--name-comment-body {
    font-size: 14px;
    line-height: 1.5;
  }
}

.has-collapsed-history {
  .history-toggle-checkbox {
    display: none;
  }

  .history-toggle-label {
    display: inline-block;
    cursor: pointer;
    color: #0036b3;
    font-size: 14px;
    padding: 6px 0 12px;
  }

  .history-toggle-label:hover {
    text-decoration: underline;
  }

  .comments-items > .comment {
    display: none;
  }

  .comments-items > .comment:nth-last-child(-n+3) {
    display: block;
  }

  .history-toggle-checkbox:checked ~ .comment {
    display: block;
  }

  .history-toggle-checkbox:checked ~ .history-toggle-label {
    cursor: default;
    pointer-events: none;
    text-decoration: none;
    font-size: 0;
  }

  .history-toggle-checkbox:checked ~ .history-toggle-label::after {
    content: attr(data-label-expanded);
    font-size: 14px;
  }
}
