/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * @file
 * Comment section and individual comments.
 */

:root {
  --comment-indentation: var(--sp2);
  --comment-indentation--md: var(--sp4);
}

.comment--level-1 {
  border-block-start: 2px solid var(--color--gray-95);
}

.comment--level-1 ~ .comment--level-1 {
  margin-block-start: var(--sp2);
}

.comments__title {
  display: flex;
  align-items: center;
  margin-block-start: 0;
}

.comments__count {
  position: relative;
  display: inline-block;
  min-width: 2.125rem;
  margin-block-start: 0;
  margin-block-end: var(--sp0-5);
  margin-inline-start: var(--sp);
  margin-inline-end: var(--sp);
  padding-block: 0;
  padding-inline-start: 0.3125rem;
  padding-inline-end: 0.3125rem;
  text-align: center;
  color: var(--color--white);
  border-radius: 2px;
  background-color: var(--color--primary-40);
  font-size: 0.6875rem;
  line-height: 1.3125rem;
}

.comments__count::after {
  position: absolute;
  inset-block-end: -0.4375rem;
  inset-inline-start: 0.5rem;
  width: 0;
  height: 0;
  content: "";
  border-block-start: 0.4375rem solid var(--color--primary-40);
  border-inline-end: 0.5rem solid transparent;
}

.comment-form {
  padding-block-end: var(--sp2);
}

.add-comment__form {
  padding-inline-start: 0;
}

.comment {
  position: relative;
  padding-block-start: var(--sp2);
  padding-inline-start: var(--sp3);
}

@media (min-width: 43.75rem) {
  .comment {
    padding-inline-start: 0;
  }
}

.comment__text-content {
  font-size: 1rem;
}

.comment__text-content blockquote {
  font-size: 1.3125rem;
  line-height: var(--sp2);
}

/* Override for .field:not(:last-child) */

.comment__text-content:not(:last-child) {
  margin-block-end: 0;
}

.comment__links {
  margin-block: var(--sp) 0;
}

.comment__links-link {
  -webkit-text-decoration: none;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: bold;
  line-height: var(--sp);
}

.comment__links-link:hover {
  -webkit-text-decoration: underline;
  text-decoration: underline;
}

.add-comment__picture-wrapper {
  inset-block-start: calc(var(--line-height-base) + var(--sp0-5));
}

.add-comment__picture,
.comment__picture {
  position: absolute;
  inset-inline-start: 0;
  overflow: hidden;
  width: var(--sp2);
  height: var(--sp2);
  border-radius: 50%;
  background-color: var(--color--gray-95);
}

.add-comment__picture *:not(img),
.comment__picture *:not(img) {
  display: inherit;
  width: inherit;
  height: inherit;
}

.add-comment__picture img,
.comment__picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* @TODO: create image-style for profile's avatar to have image squared by default. */
}

@media all and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .add-comment__picture img,
  .comment__picture img {
    position: absolute;
    /* stylelint-disable csstools/use-logical */
    top: 50%;
    left: 50%;
    /* stylelint-enable csstools/use-logical */
    width: 100%;
    height: auto;
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 43.75rem) {
  .add-comment__picture,
  .comment__picture {
    inset-inline-start: calc(-1 * var(--sp5));
    width: var(--sp3);
    height: var(--sp3);
  }
}

@media (min-width: 43.75rem) {
  .indented .comment__picture {
    inset-inline-start: calc(-1 * var(--sp4));
    width: var(--sp2);
    height: var(--sp2);
  }
}

.comment__meta * {
  display: inline;
}

.comment__author {
  margin-inline-end: var(--sp);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: var(--sp);
}

.comment__author a {
  -webkit-text-decoration: none;
  text-decoration: none;
}

.comment__time {
  margin: 0;
  color: var(--color-text-neutral-soft);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: var(--sp);
}

.indented {
  margin-inline-start: var(--comment-indentation);
}

.indented > .comment:not(:last-of-type, .has-children)::before {
  position: absolute;
  inset-block-start: var(--sp2);
  inset-inline-start: calc(-1 * var(--comment-indentation) - var(--sp)); /* Comment's padding-top */
  width: 0;
  height: 100%;
  content: "";
  border-inline-start: solid 1px var(--color--gray-95);
}

@media (min-width: 43.75rem) {
  .indented > .comment:not(:last-of-type, .has-children)::before {
    inset-inline-start: calc(-1 * var(--comment-indentation--md) + var(--sp));
  }
}

@media (min-width: 43.75rem) {
  .indented {
    margin-inline-start: var(--comment-indentation--md);
  }
}

.show-hide-btn {
  margin-block-start: var(--sp2);
  margin-block-end: 0;
  margin-inline-start: var(--sp3);
  margin-inline-end: 0;
  padding-block: 0;
  padding-inline-start: 0;
  padding-inline-end: 0;
  cursor: pointer;
  color: var(--color-text-neutral-medium);
  border: 0;
  background: none;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.125rem;
  -webkit-appearance: none;
  appearance: none;
}

.show-hide-btn[aria-expanded="true"]::after {
  content: "\0020 -";
}

.show-hide-btn[aria-expanded="false"]::after {
  content: "\0020 +";
}

@media (min-width: 43.75rem) {
  .show-hide-btn {
    margin-inline-start: 0;
  }
}
