.editor-toolbar {
  display: flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  width: 100%;
  position: relative;
}

.toolbar-left {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  flex-wrap: wrap;
}

.editor-toolbar button {
  line-height: 1;
  display: flex;
  align-items: center;
  background: transparent;
  color: #4b5563;
  border-radius: 3px;
  border: none;
  padding: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  justify-content: center;
  align-content: center;
  transition: background 0.2s ease;
}

.editor-toolbar button:hover {
  background: #f1f3f5;
}

.editor-toolbar button.active {
  background-color: #e9f1ff;
  border-radius: 4px;
}

.editor-toolbar button.btn-open-editor {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #4b5563;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 7.5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  margin-left: auto;
  align-self: center;
  transition: background 0.2s ease;
  min-height: 32px;
  max-height: 32px;
  box-sizing: border-box;
}

.toolbar-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.editor-toolbar button.btn-open-editor:hover {
  background: #dee3e8;
}

.editor-toolbar button:focus {
  outline: none;
  box-shadow: none;
}

.editor-toolbar button.btn-open-editor {
  white-space: nowrap;
}

.toolbar-divider {
  width: 1px;
  height: 26px;
  background: #e5e7eb;
  margin: 0 14px;
}

.editor-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.editor-toolbar--entering {
  animation: editor-toolbar-enter 220ms ease-out;
}

.editor-wrapper--entering .editor-body {
  animation: editor-body-enter 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.editor-switching-out {
  opacity: 0;
  filter: blur(4px);
  transition:
    opacity 240ms ease,
    filter 280ms ease;
  pointer-events: none;
}

.editor-switching-in {
  animation: editor-content-in 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes editor-toolbar-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  input:not(.editor-title):not([type="button"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="radio"]):not([type="range"]):not([type="reset"]):not([type="submit"]),
  textarea:not(.editor-title),
  select {
    font-size: 16px !important;
  }
}

@keyframes editor-body-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editor-content-in {
  from {
    opacity: 0;
    filter: blur(8px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

.editor-title {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  box-sizing: border-box;
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  border: none;
  padding: 20px 0;
  color: #4b5563;
  background: transparent;
  appearance: none;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-preview-title.editor-title {
  display: block;
  height: auto !important;
  min-height: 72px;
  max-height: none !important;
  margin: 0 0 20px;
  overflow: visible !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word;
}

.project-content.project-content--article .editor-title {
  height: auto;
  max-height: none;
  flex: 0 0 auto;
}

.project-content.project-content--article .editor-body.article-preview .article-preview-title {
  flex: 0 0 auto;
  margin-bottom: 0 !important;
}

.project-content.project-content--article .article-preview-title + .article-preview-content,
.project-content.project-content--article .editor-title + .editor-content {
  margin-top: 0 !important;
  clear: both;
}

.editor-content {
  --editor-visual-block-width: 1056px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-left: 2px;
  min-height: 400px;
  outline: none;
  color: #4b5563;
  font-family: "Inter", sans-serif;
  line-height: 24px;
  font-size: 14px;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
}

.editor-content h1 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 28px;
  font-style: normal;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: 0;
  vertical-align: middle;
}

.editor-content h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
  line-height: 120%;
  letter-spacing: 0;
  vertical-align: middle;
}

.editor-content h3 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: 0;
  vertical-align: middle;
}

.editor-content h4 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0;
  vertical-align: middle;
}

.editor-content h5 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  vertical-align: middle;
}

.editor-content .editor-inline-heading {
  font-family: "Inter", sans-serif;
  font-style: normal;
  letter-spacing: 0;
  vertical-align: baseline;
}

.editor-content .editor-inline-heading--h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
}

.editor-content .editor-inline-heading--h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 120%;
}

.editor-content .editor-inline-heading--h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.editor-content .editor-inline-heading--h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.editor-content .editor-inline-heading--h5,
.editor-content .editor-inline-heading--h6 {
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}

.editor-toolbar button svg {
  width: 16px;
  height: 16px;
}

.editor-toolbar button[data-cmd="insertOrderedList"] svg {
  width: 26px;
  height: 26px;
}

.editor-toolbar button[data-cmd="bold"] svg {
  width: 15.5px;
  height: 15.5px;
}

.editor-toolbar button[data-cmd="underline"] svg {
  width: 16.5px;
  height: 16.5px;
}

.editor-toolbar button[data-cmd="strikeThrough"] svg {
  width: 15px;
  height: 15px;
}

.editor-toolbar button[data-cmd="strikeThrough"] {
  padding: 6.5px 6px;
}

.editor-toolbar button[data-cmd="insertInlineCode"] svg {
  width: 18.5px;
  height: 17px;
}

.editor-toolbar button[data-cmd="insertInlineCode"] {
  padding: 5.5px 4px;
}

.editor-toolbar button[data-cmd="insertOrderedList"] {
  padding: 1.5px;
}

pre {
  background: #1e1e1e;
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: "Fira Code", monospace;
  margin: 10px 0;
}

.color-picker-wrapper {
  position: relative;
  display: inline-block;
}

.color-dropdown {
  display: none;
  position: absolute;
  top: 36px;
  left: 0;
  background: #fafafa;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px;
  gap: 6px;
  display: none;
}

.color-dropdown.open {
  display: flex;
}

.color-option {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  cursor: pointer;
  border: 0.5px solid rgba(44, 53, 65, 0.18);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.color-option:hover {
  transform: scale(1.1);
}

.heading-title-wrapper {
  position: relative;
  display: inline-block;
}

.heading-dropdown {
  display: none;
  position: absolute;
  top: 36px;
  left: 0;
  background: #fafafa;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 151px;
  z-index: 1;
}

.heading-dropdown.open {
  display: block;
}

.heading-dropdown div {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.heading-dropdown div:hover {
  background: #e9f1ff;
}

.heading-dropdown .dropdown-item.active {
  background: #e9f1ff;
  color: #2582df;
}

.heading-dropdown .dropdown-item.active svg path {
  fill: #2582df;
}

.dropdown-item {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.justify-wrapper {
  position: relative;
  display: inline-block;
}

.justify-dropdown {
  display: none;
  position: absolute;
  top: 36px;
  left: 0;
  background: #fafafa;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 120px;
  z-index: 1;
}

.justify-dropdown.open {
  display: flex;
  flex-direction: row;
  gap: 4px;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  position: absolute;
  top: 36px;
  left: 0;
  z-index: 10;
}

.justify-dropdown div {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.justify-dropdown div:hover {
  background: #e9f1ff;
}

.justify-dropdown button.active {
  background: #e9f1ff;
  border-radius: 4px;
}

.table-picker-wrapper {
  position: relative;
  display: inline-block;
}

.media-insert-wrapper {
  position: relative;
  display: inline-block;
}

.media-insert-dropdown {
  position: absolute;
  top: 36px;
  left: 0;
  width: 151px;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 0;
  background: #fafafa;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  z-index: 10;
}

.media-insert-dropdown.open {
  display: flex;
}

.media-insert-dropdown button {
  width: 100%;
  min-height: auto;
  padding: 6px 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #374151;
  font-size: 14px;
  line-height: normal;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.media-insert-dropdown button:hover {
  background: #e9f1ff;
}

.table-picker {
  position: absolute;
  top: 28px;
  left: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px;
  display: none;
  z-index: 10;
}

.table-picker.open {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(10, 20px);
  grid-template-rows: repeat(10, 20px);
  gap: 3px;
}

.grid div {
  width: 20px;
  height: 20px;
  background: #fafafa;
  border: 1px solid #dee3e8;
  cursor: pointer;
}

.grid div.selected {
  background: #e9f1ff;
  border: 1px solid #c0d6fb;
  border-radius: 1px;
}

.info {
  margin-top: 6px;
  font-size: 12px;
  text-align: center;
}

.editor-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

.editor-content .img-container,
.editor-content .video-container,
.editor-content .table-wrapper {
  width: min(100%, var(--editor-visual-block-width));
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

.editor-content .highlight-block,
.editor-content .conclusion-block,
.editor-content .plain-color-block,
.editor-content .code-block {
  width: min(100%, var(--editor-visual-block-width));
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.editor-content .conclusion-block {
  align-items: center !important;
}

.editor-content .table-wrapper {
  display: block !important;
  width: 100%;
  max-width: 100%;
  margin: 10px 0;
}

.editor-content .table-wrapper table {
  width: 100%;
}

.editor-content .img-container {
  text-align: center;
}

.editor-content p[data-editor-spacer-paragraph="true"],
.editor-content p[data-editor-trailing-paragraph="true"] {
  display: block;
  min-height: 24px;
  margin: 8px 0;
  cursor: text;
}

.editor-content p,
.editor-content li,
.editor-content blockquote,
.editor-content td,
.editor-content th {
  color: #4b5563;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 24px;
}

.editor-content > p {
  display: block;
  min-height: 24px;
  margin: 0 0 8px;
  line-height: 24px;
  vertical-align: baseline;
}

.editor-content > p * {
  vertical-align: baseline;
}

.editor-content > li,
.editor-content > blockquote {
  min-height: 24px;
  margin: 0 0 8px;
  line-height: 24px;
}

.editor-content > p:first-child {
  margin-top: 0;
}

.editor-content .highlight-block p {
  line-height: 24px !important;
}

.editor-title::placeholder {
  font-size: 24px;
  font-weight: 600;
  color: #8e96a3;
  opacity: 1;
}

.editor-content.editor-content--empty::before {
  content: none;
}

.editor-content.editor-content--empty > p:first-child {
  margin: 0 0 8px !important;
  min-height: 24px;
  font-size: 14px;
  line-height: 24px !important;
}

.editor-content.editor-content--empty > p:first-child {
  position: relative;
}

.editor-content.editor-content--empty > p:first-child::before {
  content: var(--editor-empty-placeholder, "");
  position: absolute;
  left: 0;
  top: 0;
  color: #8e96a3;
  font-weight: 400;
  pointer-events: none;
  font-size: 14px;
  line-height: 24px;
}

.article-preview-title.is-placeholder,
.article-preview-content.is-placeholder {
  color: #8e96a3;
}

.editor-title:empty:before {
  content: attr(data-placeholder);
  color: #9ca3af;
}

.editor-content ul,
.editor-content ol {
  list-style-position: inside;
  padding-left: 0;
}

.editor-content ul {
  list-style-type: disc;
}

.editor-content ol {
  list-style-type: decimal;
}

.editor-content ul[style*="text-align:center"],
.editor-content ol[style*="text-align:center"] {
  display: table;
  margin: 0 auto;
}

.editor-content ul[style*="text-align:right"],
.editor-content ol[style*="text-align:right"] {
  display: table;
  margin-left: auto;
}

.cell-resizer:hover {
  background: rgba(61, 158, 255, 0.4);
}
.table-resizer:hover {
  background: #1d4ed8;
}

.editor-content .table-wrapper table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  clip-path: inset(0 round 8px);
}

.editor-content .table-wrapper td,
.editor-content .table-wrapper th {
  border-width: 0 1px 1px 0 !important;
  border-style: solid !important;
  border-color: #e9ecef !important;
}

.editor-content .table-wrapper tr > :last-child {
  border-right-width: 0 !important;
}

.editor-content .table-wrapper tr:last-child > * {
  border-bottom-width: 0 !important;
}

.img-wrapper {
  display: inline-block;
  margin: 4px 0;
  position: relative;
  text-align: left;
  max-width: 100%;
}

.img-wrapper img {
  display: inline-block;
}

.tooltip {
  position: fixed;
  background: #2c3541cc;
  color: #fff;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 9999;
}

.tooltip.visible {
  opacity: 1;
}

.tooltip-label {
  font-weight: 400;
}

.tooltip-combo {
  background: #ffffff4d;
  color: #fff;
  padding: 3px 4px;
  border-radius: 4px;
  font-size: 12px;
}

.inline-code {
  display: inline-flex !important;
  align-items: center;
  max-width: 100%;
  background: #f1f3f5 !important;
  border-radius: 6px !important;
  padding: 2px 6px !important;
  margin: 0 1px !important;
  font-size: 14px;
  color: #2c3541;
  gap: 6px;
  position: relative !important;
  vertical-align: baseline;
  white-space: nowrap;
}

.inline-code-text {
  display: inline !important;
  min-width: 0;
  color: #2c3541;
  margin: 0 !important;
  white-space: nowrap !important;
}

.inline-code-copy {
  position: static !important;
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  line-height: 0;
  user-select: none;
  -webkit-user-select: none;
}

.inline-code-copy:hover {
  opacity: 1;
}

.inline-code-copy svg {
  width: 14px;
  height: 14px;
}

.icon-revert {
  width: 19px !important;
  height: 14px !important;
}

.icon-color {
  width: 23.65px !important;
  height: 13.45px !important;
}

.size-icon {
  width: 23.65px !important;
  height: 13.45px !important;
}

.editor-toolbar .btn-color {
  padding: 7px 3px;
}

.editor-toolbar .heading-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 38px;
  padding: 6px 5px;
  margin-left: 5px;
}

.editor-toolbar .heading-title .heading-title-icon {
  width: 23.65px !important;
  height: 13.45px !important;
  flex: 0 0 auto;
}

.editor-toolbar .heading-title .heading-title-label {
  position: absolute;
  top: 2px;
  left: 19px;
  min-width: 12px;
  color: #4b5563;
  font-size: 8px;
  font-weight: 600;
  line-height: 9px;
  pointer-events: none;
  text-align: center;
}

.editor-toolbar .heading-title.active .heading-title-label {
  color: #2582df;
}

.editor-toolbar .heading-title.active .heading-title-icon path {
  fill: #2582df;
}

.editor-toolbar button[data-cmd="removeFormat"] {
  padding: 7px 3px;
}

.editor-toolbar button[data-cmd="removeFormat"].active {
  background: transparent !important;
}

.editor-toolbar button[data-cmd="removeFormat"] svg {
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.editor-toolbar button[data-cmd="removeFormat"]:hover svg {
  opacity: 0.75;
}

.editor-toolbar button[data-cmd="removeFormat"].active svg {
  opacity: 1;
}

.editor-toolbar button[data-cmd="insertUnorderedList"] svg {
  height: 18px;
  width: 18px;
}

.editor-toolbar button[data-cmd="createLink"] svg {
  height: 22px !important;
  width: 21px !important;
}

.editor-toolbar button[data-cmd="createLink"] {
  padding: 3px;
  margin-left: -5px;
}

.editor-toolbar button[data-cmd="insertHighlight"] svg {
  height: 16.5px !important;
  width: 16.5px !important;
}

.editor-toolbar button[data-cmd="insertHighlight"] {
  margin-left: -3px;
}

.editor-toolbar button[data-cmd="insertConclusion"] svg {
  height: 16.5px !important;
  width: 16.5px !important;
}

.editor-toolbar button[data-cmd="insertConclusion"] {
  margin-left: 3px;
}

.editor-toolbar button[data-cmd="insertCode"] svg {
  height: 17px !important;
  width: 17px !important;
}

.editor-toolbar button[data-cmd="insertCode"] {
  margin-left: 3px;
}

.editor-toolbar .btn-highlight svg {
  height: 17px !important;
  width: 17px !important;
}

.editor-toolbar .btn-highlight {
  margin-left: 3px;
}

.editor-toolbar .btn-color[title="Цвет с фоном"] svg {
  height: 17px !important;
  width: 17px !important;
}

.editor-toolbar .btn-color[title="Цвет с фоном"] {
  margin-left: 3px;
}

.editor-toolbar button[data-cmd="insertImage"] svg {
  height: 17px !important;
  width: 17px !important;
}

.editor-toolbar .btn-table svg {
  height: 17px;
  width: 17px;
}

.editor-toolbar button[data-cmd="insertUnorderedList"],
.editor-toolbar .justify-title {
  padding: 6px 5px;
}

.editor-toolbar .justify-title svg {
  height: 18px;
  width: 18px;
}

.font-size-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 2px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.font-size-control .font-size-btn {
  padding: 6px 4px;
  height: 20px;
  width: 18px;
  position: relative;
  z-index: 1;
}

.font-size-control .font-size-value {
  min-width: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  line-height: 1;
  padding: 6px 0;
  border-radius: 4px;
}

.font-size-control:hover {
  background: #f1f3f5;
}

.font-size-control.is-disabled {
  opacity: 0.58;
}

.font-size-control.is-disabled,
.font-size-control.is-disabled button {
  cursor: default;
}

.font-size-control.is-disabled:hover {
  background: transparent;
}

.font-size-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 100%;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(44, 53, 65, 0.12);
  z-index: 20;
}

.font-size-dropdown.open {
  display: block;
}

.font-size-dropdown button {
  width: 100%;
  padding: 8px 12px;
  border-radius: 0;
  justify-content: center;
  font-size: 14px;
}

.font-size-dropdown button.active {
  background: #e1ecff;
  border-radius: 0 !important;
}

.font-size-dropdown button:hover {
  background: #f3f7ff;
}

.video-container {
  display: block;
  width: min(100%, var(--editor-visual-block-width));
  max-width: 100%;
  margin: 16px auto;
  box-sizing: border-box;
  position: relative;
}

.video-container video,
.video-container iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 360px;
  max-height: 720px;
  border-radius: 12px;
  background: #000;
  object-fit: contain;
}

.video-menu-dropdown button:hover {
  background: #f3f4f6;
}

.video-loader {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 270px;
  width: 100%;
  padding: 28px 24px;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

.video-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  background:
    repeating-linear-gradient(to right, #d9e1ea 0 10px, transparent 10px 20px) top / calc(100% - 20px) 1px no-repeat,
    repeating-linear-gradient(to right, #d9e1ea 0 10px, transparent 10px 20px) bottom / calc(100% - 20px) 1px no-repeat,
    repeating-linear-gradient(to bottom, #d9e1ea 0 10px, transparent 10px 20px) left / 1px calc(100% - 20px) no-repeat,
    repeating-linear-gradient(to bottom, #d9e1ea 0 10px, transparent 10px 20px) right / 1px calc(100% - 20px) no-repeat;
  background-position:
    10px 0,
    10px 100%,
    0 10px,
    100% 10px;
}

.video-loader__icon {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.video-loader__text {
  color: #8e96a3;
  font-size: 14px;
  line-height: 20px;
  margin-bottom: 20px;
}

.video-loader__percent {
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  margin-bottom: 7px;
}

.video-loader__progress {
  width: min(420px, 100%);
  height: 6px;
  border-radius: 999px;
  background: #d0d7df;
  overflow: hidden;
}

.video-loader__progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #3d9eff;
  transition: width 0.32s ease;
}

.video-loader--error {
  min-height: 160px;
}

.editor-toolbar button[data-cmd="insertVideo"] svg {
  height: 17px !important;
  width: 17px !important;
}

.table-wrapper .table-resizer {
  opacity: 0;
}

.editor-wrapper .table-wrapper:hover .table-resizer {
  opacity: 1 !important;
}

.table-cell-selected {
  position: relative;
  background: #F4F8FF !important;
  border-color: #3D9EFF !important;
  box-shadow: inset 0 0 0 1px #3D9EFF;
}

.table-cell-action-menu {
  position: absolute;
  display: none;
  max-width: 248px;
  background: #fff;
  border: 1px solid #E9ECEF;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31, 42, 55, 0.12);
  z-index: 9999;
  overflow: hidden;
}

.table-menu-dropdown--portal {
  position: fixed !important;
  z-index: 2147483647 !important;
  box-shadow: 0 8px 24px rgba(31, 42, 55, 0.12);
}

.table-cell-action-menu.open {
  display: block;
}

.table-cell-action-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 12px;
  border: 0;
  background: #fff;
  color: #4B5563;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.table-cell-action-menu__item:hover {
  background: #F8FBFF;
}

.table-cell-action-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.table-cell-action-menu__divider {
  height: 1px;
  background: #E9ECEF;
}

.table-cell-merge-button {
  position: absolute;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #E9ECEF;
  border-radius: 10px;
  background: #FFFFFF;
  color: #4B5563;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  box-shadow: 0 8px 24px rgba(31, 42, 55, 0.12);
  cursor: pointer;
  z-index: 9999;
}

.table-cell-merge-button.open {
  display: inline-flex;
}

.table-cell-merge-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.table-cell-merge-button:hover {
  background: #F8FBFF;
}

.btn-highlight.active {
  background: #e1ecff;
  border-radius: 0 !important;
}

.editor-content .img-container {
  user-select: none;
}
.editor-content .img-container * {
  user-select: none;
}
.editor-content .img-container::before,
.editor-content .img-container::after {
  content: "";
  display: block;
  height: 1px;
}

.editor-content .code-block,
.editor-content .code-block pre,
.editor-content .code-block code {
  color: #2c3541 !important;
  background: #f1f3f5 !important;
  font-family: "Inter", sans-serif !important;
}

.editor-content .code-block {
  font-family: "Inter", sans-serif;
  border-radius: 4px;
  padding: 0;
  margin: 10px 0;
  font-size: 12px;
  color: #4b5563;
  overflow: visible;
}

.editor-content .code-block .code-header {
  border-radius: 4px;
  background: #2c35411a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
}

.editor-content .code-block .code-lang {
  box-shadow: none;
  background: transparent;
  border: none;
  font-size: 12px;
  color: #4b5563;
  cursor: pointer;
}

.editor-content .code-block .copy-code {
  border: none;
  background: transparent;
  outline: none;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
}

.editor-content .code-block pre {
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  outline: none;
  background: none;
  color: #2c3541;
}

.select-wrapper {
  position: relative;
  display: inline-block;
}

.code-lang {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  font-size: 12px;
  color: #2c3541;
  padding: 4px 0;
  border-radius: 6px;
  cursor: pointer;
}

.lang-selected {
  outline: none;
  border: none;
  box-shadow: none;
}

.lang-selected:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.select-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.lang-dropdown {
  position: relative;
  display: inline-block;
  font-family: Inter, sans-serif;
  font-size: 12px;
  z-index: 10;
}

.lang-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: transparent;
  color: #2c3541;
  cursor: pointer;
}

.lang-selected svg {
  transition: transform 0.2s ease;
}

.lang-dropdown.open .lang-selected svg {
  transform: rotate(180deg);
}

.lang-options {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 4px);
  left: 0;
  width: 132px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  display: none;
  flex-direction: column;
  z-index: 1000;
}

.lang-dropdown.open .lang-options {
  display: flex;
}

.lang-options div {
  padding: 6px 8px;
  cursor: pointer;
  color: #2c3541;
}

.lang-options div:hover {
  background: #f1f3f5;
}

.custom-lang-input {
  background-color: transparent;
  outline: none !important;
  border: none !important;
}

.inline-code-text span {
  background: none !important;
  color: inherit !important;
  font-weight: inherit !important;
}

.link-tooltip {
  background: #2c3541cc;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 7px;
  white-space: nowrap;
  z-index: 99999 !important;
}

.link-preview-tooltip button {
  border: none;
  background: transparent;
  color: #cecece;
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
}

.link-preview-tooltip button:hover {
  color: #fff;
}

.link-preview-tooltip .link-url {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-modal.editor-link-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.18);
  backdrop-filter: blur(2px);
  z-index: 2000;
}

.editor-link-modal__dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
}

.editor-link-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.editor-link-modal__dialog .account-modal__title {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

.editor-link-modal__text {
  margin: 4px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 20px;
  max-width: 468px;
  margin-bottom: 16px !important;
}

.editor-link-modal__field {
  display: block;
}

.editor-link-modal__input {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid #dee3e8;
  border-radius: 8px;
  outline: none;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #4b5563;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.editor-link-modal__input::placeholder {
  color: #8e96a3;
}

.editor-link-modal__input:focus {
  border-color: #dee3e8;
  box-shadow: none;
}

.editor-link-modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.editor-link-modal__submit,
.editor-link-modal__cancel {
  min-width: 111px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
}

.editor-link-modal__submit {
  min-width: 165px;
}

.editor-toolbar button.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.editor-toolbar--locked .toolbar-left,
.editor-toolbar--locked .toolbar-divider {
  opacity: 0.72;
}

.editor-content--locked {
  opacity: 0.72;
  cursor: default;
}

 .project-content.project-content--article .editor-body {
    padding-bottom: 160px;
    scroll-padding-bottom: 120px;
  }

  .editor-content::after {
    content: "";
    display: block;
    height: 96px;
  }

@media (max-width: 900px) {
  :root {
    --mobile-header-height: 64px;
    --mobile-editor-toolbar-offset: 56px;
  }

  .table-cell-selected {
    background: #F4F8FF !important;
    box-shadow: inset 0 0 0 1px #3D9EFF, 0 0 8px rgba(61, 158, 255, 0.28);
  }

  .table-cell-selection-top {
    border-top-color: #3D9EFF !important;
  }

  .table-cell-selection-right {
    border-right-color: #3D9EFF !important;
  }

  .table-cell-selection-bottom {
    border-bottom-color: #3D9EFF !important;
  }

  .table-cell-selection-left {
    border-left-color: #3D9EFF !important;
  }

  .table-cell-merge-candidate {
    background: #F8FBFF !important;
    border-color: #B9DDFF !important;
  }

  .table-cell-merge-anchor {
    box-shadow: inset 0 0 0 1px #3D9EFF, 0 0 8px rgba(61, 158, 255, 0.28);
  }

  .table-cell-action-menu__item:disabled {
    cursor: default;
    opacity: 0.45;
  }

  .editor-wrapper .table-wrapper .table-resizer {
    opacity: 1 !important;
  }

  .editor-content.mobile-table-merge-picking .table-wrapper,
  .editor-content.mobile-table-merge-picking .table-wrapper * {
    -webkit-user-select: none;
    user-select: none;
  }

  .project-content.project-content--article .editor-body {
  padding-bottom: 0 !important;
  scroll-padding-bottom: 0 !important;
}

.editor-content::after {
  content: none !important;
  display: none !important;
  height: 0 !important;
}


  
  .editor-toolbar {
    position: sticky;
    top: var(--mobile-header-height);
    transform: none;
    z-index: 10000;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 34px auto;
    grid-template-areas:
      ". action"
      "tools tools";
    align-items: start;
    gap: 8px 10px;
    min-height: 0;
    padding: 8px 0 0px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    overflow: visible;
  }

  .toolbar-left {
    grid-area: tools;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 6px;
    position: relative;
    z-index: 10010;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .toolbar-left::-webkit-scrollbar {
    display: none;
  }

  .toolbar-right {
    grid-area: action;
    align-self: start;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 34px;
    margin-left: 0;
  }

  .toolbar-divider {
    flex: 0 0 1px;
    height: 28px;
    margin: 0 5px;
  }

  .editor-toolbar button {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 6px;
  }

  .editor-toolbar button.btn-open-editor {
    width: clamp(118px, 42vw, 150px);
    max-width: 100%;
    min-height: 34px;
    max-height: 34px;
    height: 34px;
    align-self: start;
    justify-content: center;
    margin-left: 0;
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff;
  }

  .font-size-control,
  .color-picker-wrapper,
  .heading-title-wrapper,
  .justify-wrapper,
  .table-picker-wrapper,
  .media-insert-wrapper {
    flex: 0 0 auto;
    position: relative;
    z-index: 10010;
  }

  .font-size-control:has(.font-size-dropdown.open),
  .color-picker-wrapper:has(.color-dropdown.open),
  .heading-title-wrapper:has(.heading-dropdown.open),
  .justify-wrapper:has(.justify-dropdown.open),
  .table-picker-wrapper:has(.table-picker.open),
  .media-insert-wrapper:has(.media-insert-dropdown.open) {
    z-index: 2147483646;
  }

  .font-size-control {
    height: 34px;
    padding: 0 4px;
    background: #fff;
  }

  .font-size-control .font-size-btn {
    width: 28px;
    height: 34px;
    min-width: 28px;
    min-height: 34px;
    padding: 0;
  }

  .font-size-control .font-size-value {
    width: 28px;
    height: 34px;
    min-width: 28px;
    min-height: 34px;
    padding: 0;
  }

  .editor-title {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0 14px 2px;
    font-size: 22px !important;
    line-height: 30px;
    min-height: 52px;
    height: 52px;
  }

  .editor-content {
    min-height: 280px;
    color: #4b5563;
    font-family: "Inter", sans-serif;
    font-size: 16px !important;
    line-height: 24px;
    overflow-wrap: anywhere;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    -webkit-user-select: text;
    user-select: text;
    touch-action: manipulation;
  }

  .editor-content p,
  .editor-content li,
  .editor-content blockquote,
  .editor-content td,
  .editor-content th {
    color: #4b5563;
    font-family: "Inter", sans-serif;
    font-size: 16px !important;
    line-height: 24px;
  }

  .editor-content p {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
  }

  .editor-content > p {
    display: block;
    min-height: 24px;
    line-height: 24px !important;
    vertical-align: baseline;
  }

  .editor-content p[data-editor-mobile-block-exit="true"] {
    min-height: 28px;
    line-height: 28px !important;
  }

  .editor-content li {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
  }

  body.article-editor-open .editor-wrapper {
    min-height: 0;
  }

  body.article-editor-open .editor-body {
    min-height: 0;
     padding-top: 0;
  }

  body.article-editor-open .editor-content {
    min-height: max(46dvh, 320px);
    padding-bottom: 0;
  }

  body.article-editor-open .editor-content::after {
    content: none;
    display: none;
    height: 0;
  }

  body.article-editor-open .editor-content.editor-content--empty {
    position: relative !important;
  }

  body.article-editor-open .editor-content.editor-content--empty::before {
    content: none;
  }

  body.article-editor-open .editor-content.editor-content--empty > p:first-child {
    margin: 0 0 8px !important;
    min-height: 24px;
    font-size: 14px;
    line-height: 24px !important;
  }

  .editor-content img,
  .editor-content video,
  .editor-content iframe {
    max-width: 100%;
    height: auto;
  }

  .editor-content .table-wrapper,
  .article-preview-content .table-wrapper,
  .page-content .table-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }

  .editor-content .table-wrapper table,
  .article-preview-content .table-wrapper table,
  .page-content .table-wrapper table {
    width: auto !important;
    min-width: 100%;
    max-width: none;
    table-layout: auto !important;
  }

  .article-preview-content .table-wrapper td,
  .article-preview-content .table-wrapper th,
  .page-content .table-wrapper td,
  .page-content .table-wrapper th {
    width: auto !important;
  }

  .editor-content > table,
  .article-preview-content > table,
  .page-content > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .editor-content .code-block {
    max-width: 100%;
    overflow: hidden;
  }

  .editor-content .code-block pre,
  .editor-content .code-block code,
  .editor-content .code-area {
    max-width: 100%;
    overflow-x: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .color-dropdown,
  .heading-dropdown,
  .justify-dropdown,
  .font-size-dropdown,
  .media-insert-dropdown,
  .table-dropdown {
    max-width: min(92vw, 340px);
    max-height: 60dvh;
    overflow-y: auto;
    z-index: 2147483646;
  }

  .color-dropdown,
  .heading-dropdown,
  .justify-dropdown,
  .font-size-dropdown,
  .media-insert-dropdown,
  .table-picker {
    position: absolute;
    z-index: 2147483646 !important;
  }

  .color-dropdown.open {
    flex-wrap: wrap;
    width: max-content;
    max-width: min(220px, calc(100vw - 32px));
    z-index: 2147483646;
  }

  .editor-toolbar .color-dropdown {
    min-width: 156px;
    width: 156px;
    max-width: calc(100vw - 32px);
    padding: 10px;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  }

  .editor-toolbar .color-dropdown.open {
    display: grid;
  }

  .editor-toolbar .color-option {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #dfe4ea;
    box-shadow: inset 0 0 0 2px #fff;
  }

  .editor-toolbar .color-option:hover {
    transform: none;
  }

  .editor-toolbar .color-option:active {
    transform: scale(0.96);
  }

  .heading-dropdown,
  .justify-dropdown,
  .font-size-dropdown,
  .media-insert-dropdown {
    left: auto;
    right: 0;
  }

  .editor-toolbar .justify-dropdown {
    width: auto;
    min-width: 188px;
    max-width: calc(100vw - 32px);
    padding: 8px;
    gap: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  }

  .editor-toolbar .justify-dropdown.open {
    display: grid;
    grid-template-columns: repeat(4, 40px);
  }

  .editor-toolbar .justify-dropdown button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
  }

  .editor-toolbar .justify-dropdown button.active,
  .editor-toolbar .justify-dropdown button:hover {
    border-color: #b9d8ff;
    background: #e9f1ff;
  }

  .heading-dropdown.open,
  .justify-dropdown.open,
  .font-size-dropdown.open,
  .media-insert-dropdown.open {
    z-index: 2147483646;
  }

  .table-picker {
    max-width: calc(100vw - 24px);
    z-index: 2147483646;
  }

  .account-modal.editor-link-modal {
    padding: 16px 14px;
    align-items: center;
  }

  .editor-link-modal__dialog {
    width: 100%;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 22px 18px;
  }

  .editor-link-modal__actions {
    gap: 10px;
  }

  .editor-link-modal__submit,
  .editor-link-modal__cancel {
    flex: 1 1 0;
    min-width: 0;
    font-size: 14px;
    line-height: 20px;
  }

  .knowledge-content-header,
  .content-header,
  .editor-header {
    z-index: 10 !important;
  }

 .editor-toolbar .color-dropdown,
  .editor-toolbar .heading-dropdown,
  .editor-toolbar .justify-dropdown,
  .editor-toolbar .font-size-dropdown,
  .editor-toolbar .media-insert-dropdown,
  .editor-toolbar .table-picker {
    top: calc(100% + 8px) !important;
    bottom: auto !important;
  }

  .editor-toolbar .dropdown-open-up {
    top: auto !important;
    bottom: calc(100% + 8px) !important;
  }

  .editor-dropdown-portal.dropdown-open-up {
    top: auto !important;
    bottom: calc(100dvh - var(--dropdown-anchor-top) + 8px) !important;
  }

    .editor-dropdown-portal.dropdown-open-up {
    transform-origin: bottom left;
  }

  .font-size-control {
    position: relative;
    min-width: 88px;
    height: 34px;
    padding: 0 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
  }

  .font-size-control .font-size-value {
    width: auto;
    min-width: 24px;
    padding: 0 6px;
  }

  .font-size-dropdown {
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(44, 53, 65, 0.12);
    overflow: hidden;
  }

.font-size-dropdown button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 10px;
  background: #fff;
  border: 0;
  box-shadow: none;
  outline: none;
  color: #4b5563;
  appearance: none;
  -webkit-appearance: none;
}

.font-size-dropdown button:hover,
.font-size-dropdown button:focus,
.font-size-dropdown button:active {
  background: #f3f7ff;
  box-shadow: none;
}

html,
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .dashboard-content {
    height: var(--vvh, 100dvh);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  .project-layout {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .project-content {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .project-content.project-content--article {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .project-content.project-content--article .editor-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
  }

  .project-content.project-content--article .editor-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
  }

   .project-content.project-content--article .editor-wrapper {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

    .project-content.project-content--article .editor-body {
    position: relative;
    overflow: visible;
  }

  .editor-toolbar {
    position: sticky;
    top: var(--mobile-header-height);
    z-index: 10000;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    flex: 0 0 auto;
  }

  body.article-editor-open .editor-toolbar {
    position: fixed;
    top: var(--mobile-header-height);
    left: 14px;
    right: 14px;
    width: auto;
    max-width: calc(100vw - 28px);
    box-sizing: border-box;
    z-index: 10003;
    transform: none;
  }

  body.article-editor-open .editor-body {
    padding-top: var(--mobile-editor-toolbar-offset);
  }


  .editor-title,
  .editor-content {
    flex: 0 0 auto;
  }

  .editor-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (hover: none), (pointer: coarse) {
  .tooltip,
  .editor-tooltip {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 420px) {
  :root {
    --mobile-header-height: 58px;
    --mobile-editor-toolbar-offset: 56px;
  }

  body.article-editor-open .editor-toolbar {
    position: sticky;
    top: var(--mobile-header-height);
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
  }

  .editor-toolbar button.btn-open-editor {
    width: clamp(108px, 40vw, 138px);
    padding-inline: 8px;
  }

  .editor-toolbar button {
    min-width: 30px;
    min-height: 30px;
    padding: 5px;
  }

  .editor-toolbar button svg {
    width: 15px;
    height: 15px;
  }

  .editor-title {
    font-size: 22px;
    line-height: 30px;
  }

  .editor-content {
    min-height: 240px;
  }

  body.article-editor-open .editor-content {
    min-height: max(44dvh, 300px);
  }
}

body.article-editor-open .editor-dropdown-portal,
body.article-editor-open .editor-toolbar .color-dropdown.open,
body.article-editor-open .editor-toolbar .heading-dropdown.open,
body.article-editor-open .editor-toolbar .justify-dropdown.open,
body.article-editor-open .editor-toolbar .font-size-dropdown.open,
body.article-editor-open .editor-toolbar .media-insert-dropdown.open,
body.article-editor-open .editor-toolbar .table-picker.open {
  z-index: 2147483647 !important;
}

body.article-editor-open .editor-dropdown-portal {
  position: fixed !important;
}

@media (max-width: 900px) {
 html,
  body {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

   .dashboard-content {
    height: auto;
    min-height: 100dvh;
  }

  body.article-editor-open .editor-wrapper .editor-title {
    font-size: 22px !important;
    line-height: 30px !important;
  }

  body.article-editor-open .editor-dropdown-portal.color-dropdown {
    display: grid !important;
    grid-template-columns: repeat(5, 24px);
    width: auto !important;
    min-width: 0;
    max-width: calc(100vw - 24px) !important;
    padding: 6px;
    gap: 5px;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    overflow: visible !important;
  }

  body.article-editor-open .editor-dropdown-portal.color-dropdown .color-option {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #dfe4ea;
    box-shadow: inset 0 0 0 1px #fff;
  }

  body.article-editor-open .editor-dropdown-portal.color-dropdown .color-option:hover {
    transform: none;
  }

  body.article-editor-open .editor-dropdown-portal.justify-dropdown {
    display: flex !important;
    width: auto !important;
    min-width: 0;
    max-width: calc(100vw - 24px) !important;
    padding: 6px;
    gap: 4px;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    overflow: visible !important;
  }

  body.article-editor-open .editor-dropdown-portal.justify-dropdown button {
    width: 36px;
    height: 32px;
    min-width: 36px;
    min-height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
  }

  body.article-editor-open .editor-dropdown-portal.justify-dropdown button.active,
  body.article-editor-open .editor-dropdown-portal.justify-dropdown button:hover {
    background: #e9f1ff;
  }
}

