$wswg-light-grey: #D1D1D1;
$wswg-dark-grey: #C4C4C4;

// Main wysisyg style

.popup-wysiwyg.popup-wysiwyg {
  width: 774px;
}

.pp-wysiwyg__body {
  padding: 10px 20px 40px;
  background-color: $white;
}

.note-codable {
  display: none;
  width: 100%;
  padding: 10px;
  margin-bottom: 0;
  font-family: Menlo,Monaco,monospace,sans-serif;
  font-size: 14px;
  color: #CCC;
  background-color: #222;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  resize: none;
}

.note-editable {
  padding: 10px;
  overflow: auto;
  color: $main-sec-font-color;
}

.note-editable--light {
  background-color: $white;
}

.note-editable--dark {
  background-color: $gray-dark;
}

.wswg-toolbar {
  display: flex;
  flex-wrap: wrap;
  padding-top: 5px;
  padding-bottom: 10px;
  margin-right: -7px;
}

// wysiwyg area

.note-editing-area {
  border: 2px solid rgba($wswg-light-grey, .5);
  overflow: hidden;
}

.wswg-group {
  margin-top: 5px;
  margin-right: 5px;
  margin-left: 0;
}

// Icon contaienr

.wswg-btn__icon__wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 26px;
}

//  Border for subbuton

.wswg-color-picker__wrap,
.wswg-group__btn--bg-color,
.wswg-btn--bullets {

  .wswg-btn__icon__wrap {
    border-right: 1px solid $wswg-dark-grey;
  }
}

// Main button-styles

.wswg-btn {
  display: inline-block;
  text-align: center;
  vertical-align: middle;
  touch-action: manipulation;
  cursor: pointer;
  background-image: none;
  background-color: transparent;
  border: 0;
  white-space: nowrap;
  border-radius: 0;
  user-select: none;
  text-transform: none;
  transition: opacity .2s;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;

  &::-moz-focus-inner {
    border: 0 !important;
  }

  &:hover,
  &:focus {
    text-decoration: none;
    opacity: .8;
  }

  &:focus {
    outline: none;
  }

  &[disabled] {
    opacity: .5;
    user-select: none;
    box-shadow: none;
    cursor: not-allowed;

    &:hover,
    &:focus {
      background-color: #E6E6E6;
    }
  }
}

// Button modifications

.wswg-btn--sm {
  width: 35px;
  height: 35px;
  padding: 5px 0;
}

.wswg-btn--grey {
  background-color: #E6E6E6;
  color: $main-sec-font-color;

  &:hover,
  &:focus,
  &.active {
    background-color: $wswg-dark-grey;
    z-index: 0;
  }
}

// Shadow for btn divider

.wswg-btn--shadow {

  &:not(:first-child) {
    box-shadow: -1px 0 0 0 $wswg-light-grey;
    z-index: 0;
  }
}

// Font Family

.wswg-btn--font-family {
  width: 150px;
  text-align: left;

  .wswg-btn__label {
    display: block;
    width: 120px;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}

// Border around Background icon

.wswg-group__btn--bg-color {

  .wswg-btn__icon {
    border: 1px solid $wswg-dark-grey;
  }
}

// Colorpicker btn styles

.wswg-btn--colorpicker {

  .sp-replacer {
    border: none;
    background-color: #E6E6E6;
    padding-right: 16px;
    position: relative;
    height: 100%;

    &:after {
      content: "";
      position: absolute;
      right: 7px;
      top: 47%;
      border-right: 3px solid rgba(#000, 0);
      border-left: 3px solid rgba(#000, 0);
      border-top: 3px solid #999;
      transition: -webkit-transform .2s;
      transition: transform .2s;
      will-change: transform;
    }

    &.sp-active,
    &:focus,
    &:hover {
      background-color: $wswg-dark-grey;
    }
  }

  .sp-preview,
  .sp-dd {
    display: none;
  }
}

// Line-height-icon

.wswg-group__btn--line-height {
  min-width: 50px;
}

// For btn group

.note-btn-group {
  display: inline-flex;
  position: relative;
}

//  Box shadow

.wswg-group--font,
.wswg-group--colorPicker {

  > .note-btn-group {

    &:not(:first-child) {
      box-shadow: -1px 0 0 0 $wswg-light-grey;
    }
  }
}

// Shadow for buttons

.wswg-btn--case-style,
.wswg-btn--clear-bg,
.wswg-btn--bullets {
  box-shadow: -1px 0 0 0 $wswg-light-grey;
  z-index: 1;
}

.wswg-btn--link {
  padding-left: 10px;
}

.wswg-btn--bullets-dropdown-open {
  padding-left: 4px;
  padding-right: 16px;

  &:after {
    right: 7px;
  }
}

.note-editor {
  position: relative;
}

.wswg-btn--bg-switcher {
  position: absolute;
  right: 0;
}

// Dropdown menu bullet

.wswg-dropdown--bullets-dropdown {
  flex-wrap: wrap;
  width: 100px;
  padding-left: 5px;
  padding-right: 5px;

  li {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
  }

  a {
    padding: 2px 8px;

    &:hover,
    &:focus {
      background-color: #E6E6E6;
    }
  }


  .wswg-btn__icon {
    width: 14px;
    height: 14px;
  }
}

// Font Weight button

.wswg-btn--font-weight {
  width: 57px;
}

// Font size button

.wswg-btn--font-size {
  width: 70px;
}

.note-editor.note-frame .note-statusbar .note-resizebar {
  width: 100%;
  height: 11px;
  padding-top: 1px;
  cursor: ns-resize;
  background: rgba($wswg-light-grey, .5);
}

.note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar {
  width: 20px;
  margin: 1px auto;
  border-top: 1px solid #A9A9A9
}

.wswg-btn--presets-dropdown {
  padding-left: 3px;
}
