/* Put mode switch (left) and toolbar (right) on the same row */
.toastui-editor-defaultUI { position: relative; }

.toastui-editor-toolbar {
  background-color: #f7f9fc;
  border-bottom: 1px solid var(--color-secondary);
}

.toastui-editor-toolbar .toastui-editor-defaultUI-toolbar{
  border-bottom: none;
  padding-right: 0;
}

#toast-editor-container .toastui-editor-mode-switch {
  position: absolute;
  display: flex !important;
  flex-direction: row-reverse;
  border: none;
  top: 6px;         /* tweak to taste */
  left: 10px;       /* tweak to taste */
  z-index: 2;
  margin: 0;
  padding-right: 0;
  flex-shrink: 0;
  margin: 0;
  font-family: var(--fonts-regular);
  font-weight: var(--font-weight-normal);
  background: var(--color-menu);
  border-radius: 0.28571429rem;
  min-height: 2.85714286em;
  font-size: 1rem;
}

#toast-editor-container .tab-item {
  display: flex;
  width: auto;
  height: auto;
  color: #969aa5;
  cursor: pointer;
  border-radius: 0.28571429rem 0.28571429rem 0 0;
  justify-content: center;
  flex-direction: column;
  padding: 0.92857143em 1.14285714em;
  border: none;
  margin: 0;
  font-weight: var(--font-weight-normal);
  border-bottom: 1px solid var(--color-secondary);
}

#toast-editor-container .tab-item.active {
  background-color: #fff;
  color: #555;
  border: 1px solid var(--color-secondary);
  border-bottom: 1px solid #fff;
}

/* Toolbar on the right; leave space for the switch */
.toastui-editor-defaultUI .toastui-editor-toolbar {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .toastui-editor-defaultUI .toastui-editor-mode-switch {
    position: static;
    margin-bottom: 6px;
  }
  .toastui-editor-defaultUI .toastui-editor-toolbar {
    padding-left: 0;
    justify-content: flex-start;
  }
}
