$border-color: #ced0da;
$border-radius: 4px;
$background-color: white;


.i-editor {
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid $border-color;
  text-align: left;
  background-color: $background-color;
  overflow: hidden;
  border-radius: 2px;

  * {
    box-sizing: border-box;
  }

  &.full-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    border-radius: 0;
  }

  & > .toolbar {
    background-color: $background-color;
    position: relative;

    & > ul {
      list-style: none;
      padding: 0;
      margin: 0;
      border-bottom: 1px solid $border-color;

      & > li {
        display: inline-block;
        cursor: pointer;
        width: 50px;
        text-align: center;
        line-height: 36px;
        .icon {
          height: 16px;
          width: 16px;
          display: inline-block;
        }
      }
    }

    .dashboard {
      border-bottom: 1px solid $border-color;
      padding: 10px;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background-color: $background-color;
      overflow: auto;

      input[type='text'], input[type='number'], select {
        padding: 5px 12px;
        color: #555;
        background-color: #fff;
        border: 1px solid #ccc;
        border-radius: 4px;
        transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
        &:focus {
          border-color: #66afe9;
          outline: 0;
          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
        }
        &[disabled], &[readonly] {
          background-color: #eee;
          opacity: 1;
        }
        &[disabled] {
          cursor: not-allowed;
        }
      }

      button {
        padding: 6px 12px;
        white-space: nowrap;
        vertical-align: middle;
        cursor: pointer;
        user-select: none;
        border: 1px solid transparent;
        border-radius: 4px;
        color: #333;
        background-color: #fff;
        border-color: #ccc;
        vertical-align: bottom;

        &.active, &:active, &:focus, &:hover {
          color: #333;
          background-color: #e6e6e6;
        }

        &.active, &:active {
          border-color: #adadad;
          outline: 0;
          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
        }
        &:focus {
          border-color: #8c8c8c;
          text-decoration: none;
        }
        &:hover {
          border-color: #adadad;
          text-decoration: none;
        }
      }

      input, button, select {
        line-height: normal;
      }

      label {
        font-weight: bolder;
      }

    }

  }
  .content {
    overflow: auto;
    padding: 10px;

    &:focus {
      outline: 0;
    }

    img {
      max-width: 100%;
    }
  }
  .loading {
    overflow: hidden;
    text-align: center;
    padding: 20px;
  }

}

@media (max-width: 767px) {
  .i-editor {
    .dashboard {
      label, input[type='text'], input[type='number'], button, select {
        display: block;
        margin-bottom: 5px;
        width: 100% !important;
        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }
}

@media (min-width: 768px) {
  .i-editor {
    .dashboard {
      label, input, button, select {
        display: inline-block;
        margin-right: 4px;
        max-width: 100%;
        &:last-child {
          margin-right: 0;
        }
      }
    }
  }
}

.custom-icon{
  background-size: 100% 100%;
  display: inline-block;
  vertical-align: middle;

  &.text{
    background-image: url('./imgs/editor/text.png');
  }

  &.font{
    background-image: url('./imgs/editor/font.png');
  }

  &.align{
    background-image: url('./imgs/editor/align.png');
  }

  &.list{
    background-image: url('./imgs/editor/list.png');
  }

  &.color{
    background-image: url('./imgs/editor/color.gif');
  }

  &.eraser{
    background-image: url('./imgs/editor/eraser.gif');
  }

  &.full-screen{
    background-image: url('./imgs/editor/full-screen.gif');
  }

  &.hr{
    background-image: url('./imgs/editor/hr.gif');
  }

  &.image{
    background-image: url('./imgs/editor/image.gif');
  }

  &.link{
    background-image: url('./imgs/editor/list.png');
  }

  &.table{
    background-image: url('./imgs/editor/table.gif');
  }

  &.undo{
    background-image: url('./imgs/editor/undo.gif');
  }

  &.link{
    background-image: url('./imgs/editor/link.gif');
  }

  &.unlink{
    background-image: url('./imgs/editor/unlink.gif');
  }

}