.ihub-editor {
  border: var(--borderDefault);
  border-radius: 0.375rem;
  overflow: hidden;
}

.ihub-editor-menu {
  display: flex;
  gap: 5px;
  padding: 0.5rem;
  border-bottom: var(--borderDefault);
  overflow-x: scroll;
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.ihub-editor-menu::-webkit-scrollbar {
  display: none;
}

.ihub-editor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0.125rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  color: var(--Gunmetal);
}

.ihub-editor-btn:hover {
  background-color: var(--opacityBackground);
}

.ihub-editor-btn.is-active {
  background-color: var(--opacityBackground);
  color: var(--DarkCyan);
}

.ihub-editor-divider {
  width: 1px;
  height: 1.5rem;
  margin: 0 0.5rem;
  background-color: var(--opacityBackground);
}

.ihub-editor-content-wrapper {
  min-height: 200px;
  padding: 1rem;
}
.ihub-editor-content {
  min-height: 190px;
  border: none;
  max-height: 70vh;
  overflow-y: scroll;
}
.ihub-editor-content:focus-visible {
  outline: none;
}

.ihub-editor-content-wrapper p.is-editor-empty:first-child::before {
  color: #adb5bd;
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

.ihub-editor-char-count {
  padding: 0.5rem;
  border-top: var(--borderDefault);
  display: flex;
  justify-content: space-between;
}
.ihub-editor-char-count p {
  font-size: 0.75rem;
  color: #6c757d;
  margin: 0px;
}
.ihub-editor-char-count p:empty {
  width: 10px;
  height: 5px;
}

/* Table styling */
.ihub-editor .ProseMirror table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  margin: 1rem 0;
  overflow: hidden;
}

.ihub-editor .ProseMirror td,
.ihub-editor .ProseMirror th {
  border: var(--borderDefault);
  padding: 0.5rem;
  position: relative;
}

.ihub-editor .ProseMirror th {
  background-color: #f8f9fa;
  font-weight: bold;
}

/* Code block styling */
.ihub-editor .ProseMirror pre {
  background-color: #f8f9fa;
  padding: 0.75rem;
  border-radius: 0.25rem;
  overflow-x: auto;
}

/* Blockquote styling */
.ihub-editor .ProseMirror blockquote {
  border-left: 3px solid #e2e8f0;
  padding-left: 1rem;
  margin-left: 0;
  color: #6c757d;
}

/* Task list styling */
.ihub-editor .ProseMirror ul[data-type="taskList"] {
  list-style-type: none;
  padding: 0;
}

.ihub-editor .ProseMirror ul[data-type="taskList"] li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.ihub-editor .ProseMirror ul[data-type="taskList"] li > label {
  margin-right: 0.5rem;
  user-select: none;
}

.ihub-editor .ProseMirror ul[data-type="taskList"] li > div {
  flex: 1;
}
.ihub-editor .ProseMirror ul[data-type="taskList"] li > div p {
  margin: 0px;
}

@media (max-width: 767px) {
  .ihub-editor-char-count {
    display: block;
  }
  .ihub-editor-char-count p {
    display: inline-block;
    margin-right: 1rem;
  }
}
