@import '~wix-rich-content-common/dist/statics/styles/palette';
@import '~wix-rich-content-common/dist/statics/styles/mixins';
@import '~wix-rich-content-common/dist/statics/styles/consts';
@import '~wix-rich-content-common/dist/statics/styles/fonts';

.wrapper {
  @extend .fontElementMap;
  position: relative;
  height: 100%;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  * {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }

  :global(::-moz-selection) {
    background-color: rgba(var(--ricos-text-color-tuple), 0.2);
  }
  :global(::selection) {
    background-color: rgba(var(--ricos-text-color-tuple), 0.2);
  }

  [contenteditable]:not(:focus) :global(.ricos-selection) {
    background-color: rgba(var(--ricos-text-color-tuple), 0.2);
    padding: 2px 0;
  }

  .editor {
    box-sizing: border-box;
    tab-size: 40px;

    *,
    *:before,
    *:after {
      box-sizing: inherit;
    }

    input {
      box-sizing: border-box;
    }
  }

  &.desktop {
    .editor {
      :global(.ProseMirror) {
        &::after {
          content: '';
          display: table;
          clear: both;
          line-height: 0;
        }
      }
    }
  }
}

.editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: 100%;
  line-height: 1.5;
  font-size: $paragraphFontSize;
  color: $primary-text-color;
  background-color: $background-color-container;

  &::after {
    content: '';
    display: table;
    clear: both;
    line-height: 0;
  }

  @include container-max-width {
    font-size: $paragraphFontSizeMobile;
  }
}

.fullRicosEditor {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  container-type: inline-size;
}

.custom_editor {
  min-height: var(--ricos-custom-editor-min-height);
  max-height: var(--ricos-custom-editor-max-height);
  overflow-y: auto;
  padding: 0 20px;
}
