/* stylelint-disable selector-id-pattern, selector-class-pattern */

/* Root node */
.comments-root {
  margin-bottom: 20px;
}

/* ByMyThreads filter */
.comments-root .notByMyThreads {
  transition: all var(--common-animation-time);
}
.comments-root.filterByMyThreads .notByMyThreads {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}
.comments-root:not(.filterByMyThreads) #filterByMyThreadsIcon {
  display: none;
}

/* Empty state: hode some elements... */
.comments-root.empty .threads-list {
  display: none;
}
.comments-root.loading .threads-list-empty,
.comments-root.has-visible-threads .threads-list-empty {
  display: none;
}
.comments-root .threads-list-empty {
  padding: 10px;
  margin: 10px auto;
  text-align: center;
  opacity: 0.5;
}

/* Loading state: disable some elements... */
.comments-root > * {
  transition: all var(--common-animation-time);
}
.comments-root.loading .filters,
.comments-root.loading .bottom-actions-links {
  opacity: 0.5;
  pointer-events: none;
}
.comments-root.loading .bottom-actions-links {
  opacity: 0;
}

/* Data table */
.comments-root .threads-list {
  margin: 20px 0;
}

/* Loader splash */
.comments-root .loader-splash {
  padding: 20px;
}
.comments-root:not(.loading) .loader-splash {
  /* Inherited from `.loader-splash.hidden`, see `bw_matchbox/assets/css/common.css` */
  opacity: 0;
  pointer-events: none;
}

/* Error */
.comments-root .error {
  border-radius: 4px;
  background-color: var(--common-error-color);
  color: #fff;
  margin: 20px auto;
  padding: 10px 20px;
}
.comments-root:not(.error) .error {
  display: none;
}

/* Bottom actions (TODO: Just copied from `processes-list.css`) */
.comments-root .bottom-actions {
  position: relative;
  margin: 10px 0;
  min-height: 40px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
}
/* Action links... */
.comments-root .bottom-actions-links {
  transition: all var(--common-animation-time);
}
.comments-root .bottom-actions-links > * {
  display: none;
  margin: 0 10px;
}
.comments-root .bottom-actions-links > a {
  color: var(--layout-theme-primary-color-dark1);
  cursor: pointer;
}
.comments-root .bottom-actions-links a:hover {
  text-decoration: underline;
}
/* Show 'Reload' (after error) button if error... */
.comments-root.error .bottom-actions-links a#action-clear-and-reload,
/* Show 'Load more' button for all 'order by' values except for 'random'... */
.comments-root.has-more-data.has-search:not(.error) .bottom-actions-links a#action-load-more,
.comments-root.has-more-data:not(.order-random, .error) .bottom-actions-links a#action-load-more,
.comments-root:not(.has-more-data, .empty, .error) .bottom-actions-links span#show-total-records-number,
/* Show 'Refresh' button for 'random' 'order by' value... */
.comments-root.order-random:not(.error, .has-search) .bottom-actions-links a#action-reload-random {
  display: inline-block;
}
