/* easyMDECustom.css */

.comment-actions > .user-comment-editor {
  overflow: hidden;
  border-radius: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.single-comment > .edit-comment-editor {
  width: 100%;
}

.single-comment > .comment-author {
  width: 100%;
  margin-bottom: 0.5rem;
}

.edit-user-comment-btn {
  position: absolute;
  top: -20px;
  right: 5px;
  border: none;
  background: none;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  z-index: 9995;
}

.edit-user-comment-btn svg {
  fill: var(--buttons-backgrounds);
  height: fit-content;
  width: fit-content;
}

.edit-user-comment-btn:hover svg {
  fill: #ffffffcb;
}

.delete-user-comment-btn {
  position: absolute;
  top: -20px;
  right: -20px;
  border: none;
  background: none;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  z-index: 9995;
}

.delete-user-comment-btn svg {
  fill: var(--buttons-backgrounds);
  height: fit-content;
  width: fit-content;
}

.delete-user-comment-btn:hover svg {
  fill: #ffffffcb;
}

.save-edit-comment-btn, .cancel-edit-comment-btn {
  background: none;
  border: none;
  color: var(--buttons-backgrounds);
  cursor: pointer;
}

.save-edit-comment-btn:hover, .cancel-edit-comment-btn:hover {
  color: #ffffffcb;
}


.EasyMDEContainer {
  display: block;
  margin-bottom: 1rem;
  background: #ffffff21;
  border-radius: 0.75rem;
  border: none !important;
}

.EasyMDEContainer > .CodeMirror > .CodeMirror-scroll {
  width: 100%;
  overflow: auto !important;
}

.EasyMDEContainer > .CodeMirror {
  background: #ffffff27;
  border: 1px solid #ffffff1f;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

.EasyMDEContainer > .editor-toolbar {
  border: 1px solid #ffffff1f;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.EasyMDEContainer > .editor-toolbar button {
  color: #c1c1c1;
  border: none;
}

.editor-toolbar button:hover {
  background: #1d1d1d;
  color: #c1c1c1;
  border: none;
}

.editor-toolbar button.active {
  background: #1d1d1d;
  color: #c1c1c1;
  border: none;
}

.comment-actions[data-category="good"] .EasyMDEContainer {
  border: 1px solid var(--good-dark);
  background: var(--good-opacity);
}

.comment-actions[data-category="excellent"]
  .user-comment-editor
  > .EasyMDEContainer
  .CodeMirror {
  display: block;
  background: var(--excellent-opacity);
}

.comment-actions[data-category="good"] .user-comment-editor {
  border: 1px solid var(--good-dark);
  background: var(--good-opacity);
}
.comment-actions[data-category="good"]
  .user-comment-editor
  > .EasyMDEContainer
  .CodeMirror {
  display: block;
  background: var(--good-opacity);
}

.comment-actions[data-category="forgettable"] .user-comment-editor {
  border: 1px solid var(--forgettable-dark);
  background: var(--forgettable-opacity);
}
.comment-actions[data-category="forgettable"]
  .user-comment-editor
  > .EasyMDEContainer
  .CodeMirror {
  display: block;
  background: var(--forgettable-opacity);
}

.comment-actions[data-category="marginal"] .user-comment-editor {
  border: 1px solid var(--marginal-dark);
  background: var(--marginal-opacity);
}
.comment-actions[data-category="marginal"]
  .user-comment-editor
  > .EasyMDEContainer
  .CodeMirror {
  display: block;
  background: var(--marginal-opacity);
}

.comment-actions[data-category="poor"] .user-comment-editor {
  border: 1px solid var(--poor-dark);
  background: var(--poor-opacity);
}
.comment-actions[data-category="poor"]
  .user-comment-editor
  > .EasyMDEContainer
  .CodeMirror {
  display: block;
  background: var(--poor-opacity);
}

.comment-actions[data-category="none"] .user-comment-editor {
  border: 1px solid var(--none-dark);
  background: var(--none-opacity);
}
.comment-actions[data-category="none"]
  .user-comment-editor
  > .EasyMDEContainer
  .CodeMirror {
  display: block;
  background: var(--none-opacity);
}

/* Editor Buttons */
.user-comment-editor > .save-user-comment-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin: 0rem 0rem 1rem 1rem;
  border-radius: 0.5rem;
  background: #ffffff0a;
  border: 1px solid #ffffff0a;
  color: #ffffffc0;
  padding: 0.25rem 0.75rem;
}

.user-comment-editor > .cancel-user-comment-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin: 0rem 0rem 1rem 0.5rem;
  border-radius: 0.5rem;
  background: #ffffff0a;
  border: 1px solid #ffffff0a;
  color: #ffffffc0;
  padding: 0.25rem 0.75rem;
}

.comment-actions[data-category="good"] .save-user-comment-btn:hover,
.cancel-user-comment-btn:hover {
  color: var(--good);
}
/* End Editor Buttons */

.comment-actions[data-category="good"] .editor-statusbar {
  color: var(--good);
}

.comment-actions > .user-comment-editor > .EasyMDEContainer > .editor-toolbar {
  border: none;
  border-radius: 0;
}

/* editor buttons */
.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .editor-toolbar
  button {
  background: none;
  color: #ffffffc0;
  border: none;
  border-radius: 0.5rem;
}

.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .editor-toolbar
  button:hover {
  background: var(--good);
  color: #ffffffc0;
}

.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .editor-toolbar
  button.active {
  background: var(--good);
  color: #ffffffc0;
}

.comment-actions > .user-comment-editor > .EasyMDEContainer .CodeMirror {
  border: none;
  border-radius: 0;
  margin: 0rem 0.5rem;
  border-radius: 0.25rem;
}

.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .CodeMirror
  > .CodeMirror-scroll {
  min-height: 110px !important;
}
.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .CodeMirror
  > .CodeMirror-scroll
  > .CodeMirror-sizer {
  min-height: 110px !important;
}

.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .CodeMirror
  > .CodeMirror-scroll
  > .CodeMirror-sizer {
  min-height: 110px !important;
  margin-bottom: 0px !important;
}

.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .CodeMirror
  > .CodeMirror-scroll
  > .CodeMirror-sizer
  > *
  > .CodeMirror-lines
  > *
  > .CodeMirror-cursors
  > .CodeMirror-cursor {
  border-left: 1px solid #ffffffc0 !important;
}

.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .CodeMirror
  > .CodeMirror-scroll
  > .CodeMirror-sizer
  > *
  > .CodeMirror-lines
  > *
  > .CodeMirror-code
  > .CodeMirror-line
  > *
  > span {
  background: none !important;
  color: #ffffffc0;
}

.comment-actions
  > .user-comment-editor
  > .EasyMDEContainer
  > .CodeMirror
  > .CodeMirror-scroll
  > .CodeMirror-sizer
  > *
  > .CodeMirror-lines
  > *
  > .CodeMirror-code
  > .CodeMirror-line
  > * {
  background: none !important;
  color: #ffffffc0;
}

/* Edit Comment */
.child-score-container
  > .score-comment
  > .single-comment
  > .edit-comment-editor
  > .EasyMDEContainer
  > .CodeMirror
  > .CodeMirror-scroll
  > .CodeMirror-sizer
  > *
  > .CodeMirror-lines
  > *
  > .CodeMirror-code
  > .CodeMirror-line
  > *
  > span {
  background: none !important;
}

.comment-user-actions {
  position: absolute;
  top: 8px;
  right: 8px;
}

.single-comment p {
  margin: 0px;
  word-break: break-all;
}

.single-comment p img {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  /* margin-top: 0.5rem; */
  margin-bottom: 0.5rem;
}

/* Стили для комментариев */
.comment-indicator {
  margin-left: 0.75rem;
  width: 1.2rem;
  color: var(--mainwhite-opacity);
  font-size: 14px;
}

.comment-indicator svg {
  width: 24px;
  height: 24px;
  fill: var(--mainwhite-opacity);
}

.score-comment {
  display: none;
  max-height: 0;
  overflow: hidden;
  max-height: 0px;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.score-comment.visible {
  display: flex;
  width: 100%;
  max-height: 1000px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  border-radius: 1rem;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1rem;
  overflow: visible;
  color: #ffffffc0;
}

.single-comment {
  position: relative;
  display: flex;
  font-size: 0.85rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #ffffffc0;
  background: #ffffff0a;
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.tippy-box {
  width: max-content !important;
}

.add-user-comment-btn {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  align-content: center;
  background-size: cover;
  cursor: pointer;
  background: none;
  border: none;
}

.add-user-comment-btn > span > svg {
  width: 24px;
  height: 24px;
  background-size: cover;
  fill: var(--mainwhite-opacity);
}

.comment-indicator:hover svg {
  fill: #ffffff9c;
}

.add-user-comment-btn:hover svg {
  fill: #ffffff9c;
}
