/**
 * Comment form ("Add new comment").
 */
.title.comment-form__title {
  font-weight: normal;
  font-size: 18px;
}

.comment-form {
  max-width: 720px;
  background: #f1f4f9;
  border-radius: 6px;
  padding: 10px;
}

.comment-form .field--widget-text-textarea > div {
  margin-bottom: 5px;
}

.comment-form .ck-editor {
  background: #fff;
  border-radius: 6px;
  padding: 6px;
}

.comment-form .ck-editor__editable {
  min-height: 120px;
  background: #fff;
}

.comment-form .field--name-field-files details {
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 5px;
}

.comment-form .field--name-field-files summary {
  display: none;
}

.comment-form .field--name-comment-body .form-item__label,
.comment-form .field--name-field-files .form-item__label {
  display: none;
}

.comment-form .field--name-field-files .form-managed-file.no-value {
  background: #e3e9f3;
  border: 1px solid #dbdee1;
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

.comment-form .field--name-field-files input[type="file"] {
  color: transparent;
}

.comment-form .field--name-field-files input[type="file"]::file-selector-button {
  color: #0036b3;
}

.comment-form .field--name-field-files input[type="file"] {
  font-size: 14px;
  background: #f1f4f9;
}

.comment-form .field--name-field-files .form-managed-file__main {
  width: 100%;
}

.comment-form .field--name-field-files input[type="file"]::file-selector-button {
  padding: 5px 12px;
  margin-right: 10px;
  background: #f1f4f9;
  border: none;
  border-radius: 4px;
  color: #0036b3;
  font-size: 14px;
  cursor: pointer;
}

.comment-form .field--name-field-files input[type="file"]::file-selector-button:hover {
  background: #e6ecf5;
}

.comment-form .field--name-field-files .form-item__description {
  background: #ced9eb;
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 12px;
  color: #55565b;
  line-height: 1.5;
}

.comment-form .form-actions {
  margin-top: 16px;
}

.comment-form .form-submit {
  padding: 8px 20px;
}

.comment-form .form-item {
  margin-top: 0;
}

.comment-form .field--type-file .form-item {
  margin: 0;
}

.comment-form .form-item__label {
  font-weight: 400;
}

.comment-form .form-wrapper {
  margin: 0;
}

.comment-form .details-wrapper {
  margin: 0;
  padding: 8px 12px;
  background: #e3e9f3;
  border-radius: 6px;
}

/**
 * Comments wrapper (field_comments — user correspondence).
 */
.field--name-field-comments.comment-wrapper {
  .comments-wrapper {
    max-width: 720px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-sizing: border-box;
  }

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

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

  .comment--own {
    background: #e3ecfa;
    border-left: 6px solid #0036b3;
    padding-left: 10px;

    .field-files-view .field-files-view-item {
      background: #d6e2f5;
    }
  }

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

    a {
      color: #0036b3;
      text-decoration: none;

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

  .field--name-comment-body {
    background: #fbfbfb;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  /**
   * Files list in the form.
   */
  .has-table .tabledrag-cell-content {
    display: flex;
  }

  .field--name-field-files {
    margin-top: 10px;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;

    .field__item {
      background: #e3e9f3;
      border-radius: 4px;
      padding: 4px 10px;
      font-size: 12px;
    }

    .file__size {
      font-size: 12px;
    }
  }

  .field-files-view {
    margin-top: 16px;
  }

  .comment__actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    margin-left: 12px;

    a {
      font-size: 12px;
      color: #0036b3;
      text-decoration: none;

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