@use './fonts';
@use 'variables' as *;

.lite-editor,
.lite-editor-source {
  min-height: 32px;
  border: 1px solid $lite-editor-border-color;
  background-color: #fff;
  border-radius: 5px;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', 'ＭＳ Ｐゴシック', 'MS PGothic', sans-serif;
  font-size: 13px;
  line-height: 1.7;
  padding: 5px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
  overflow-y: scroll;
  &:focus {
    outline: none;
  }
}

.lite-editor img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.lite-editor a {
  text-decoration: underline;
  color: #337ab7;
}

.lite-editor-btn-group {
  border-collapse: separate;
  display: inline-table;
  padding: 7px 10px;
  padding-left: 0;
}

.lite-editor-btn-group-wrap {
  display: inline-block;
  vertical-align: middle;
  padding: 0 10px;
}

.lite-editor-btn-group-wrap-right {
  vertical-align: middle;
  display: block;
  float: right;
  .lite-editor-btn {
    width: 44px;
  }
  .lite-editor-btn-active {
    background: #65b9ff;
    opacity: 1;
    border: 1px solid #a2adb9;
    box-shadow: inset 1px 1px 6px 0 rgba(0, 0, 0, 0.3);
    color: #fff;
    [class^='lite-editor-font'] {
      color: #fff;
    }
  }
  .lite-editor-font-abc {
    &:before {
      font-size: 10px;
    }
  }
}

.lite-editor-btn,
.lite-editor-btn-active {
  background-color: #fff;
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  line-height: 1;
  color: $lite-editor-btn-color;
  display: table-cell;
  border-left: none;
  border: 1px solid $lite-editor-border-color;
  font-size: 12px;
  padding: 3px 5px;
  border-radius: 3px;
  display: table-cell;
  height: 28px;
  margin: 0;
  cursor: pointer;
}

.lite-editor-btn-close {
  padding: 1px 6px;
  line-height: 1;
  vertical-align: middle;
}

.lite-editor-btn-close-wrap {
  float: right;
  text-align: center;
  display: block;
  font-size: 14px;
  color: $lite-editor-btn-color;
  margin-right: 10px;
  margin-top: 10px;
}

.lite-editor-btn-close-label {
  display: inline-block;
  vertical-align: bottom;
  margin-right: 5px;
}

.lite-editor-btn:disabled {
  pointer-events: none;
  opacity: 0.65;
  filter: alpha(opacity=65);
  box-shadow: none;
}

.lite-editor-btn-active {
  border: 1px solid $lite-editor-border-active-color;
  background-color: #e1e1e1;
  box-shadow: inset 0 1px 2px #b2b2b2;
  color: $lite-editor-btn-active-color;
  text-decoration: none;
}

.lite-editor-btn-group {
  .lite-editor-btn {
    border-right: none;
    border-radius: 0;
  }
  .lite-editor-btn:first-child {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
  }

  .lite-editor-btn:last-child {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-right: 1px solid $lite-editor-border-active-color;
  }
}

.lite-editor-select {
  -webkit-appearance: button;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid $lite-editor-border-color;
  border-radius: 3px;
  background-color: $lite-editor-border-color;
  text-decoration: none;
  text-align: center;
  background-repeat: no-repeat;
  color: #333;
  padding-right: 20px\9;
  background-color: #f0f0f0;
  text-align: left;
  min-height: 27px;
  padding: 5px 30px 5px 10px;
  margin-right: 10px;
  font-size: 11px;
  line-height: 1.2;
}

.lite-editor-select-wrap {
  display: inline-block;
  vertical-align: middle;
}

.lite-editor-toolbox {
  background-color: #f0f0f0;
  border: 1px solid $lite-editor-border-color;
  padding-right: 5px;
  padding-left: 5px;
  border-bottom: 0;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.lite-editor + .lite-editor-toolbox {
  border-top: 0;
  border-bottom: 1px solid $lite-editor-border-color;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
}

.lite-editor-tooltip-wrap {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
}

.lite-editor-tooltip-outer {
  display: table;
  width: 100%;
  height: 100%;
}

.lite-editor-tooltip-inner {
  display: table-cell;
  width: 100%;
  height: 100%;
  vertical-align: middle;
}

.lite-editor-tooltip {
  max-width: 500px;
  margin: auto;
  top: 30%;
  border: 1px solid $lite-editor-border-color;
  background-color: #fff;
  border-radius: 5px;
  z-index: 1;
}

.lite-editor-tooltip-title {
  font-weight: normal;
  font-size: 18px;
  margin: 0;
  background-color: #f0f0f0;
  padding: 10px;
  color: $lite-editor-font-color;
}

.lite-editor-tooltip-title [class^='lite-editor-font'] {
  margin-right: 12px;
}

.lite-editor-tooltip-body {
  padding: 10px 10px 5px 10px;
  * {
    box-sizing: border-box;
  }
}

.lite-editor-tooltip-table {
  width: 100%;
  font-size: 14px;
  th {
    width: 80px;
  }
  th,
  td {
    font-weight: normal;
    text-align: left;
    padding: 5px;
    font-size: 13px;
    color: $lite-editor-font-color;
  }
  .lite-editor-btn {
    width: 90px;
    text-align: center;
    font-size: 14px;
    margin-right: 20px;
  }
  input[type='checkbox'] {
    margin-right: 5px;
  }
  [class^='lite-editor-font'] {
    vertical-align: middle;
    margin-right: 5px;
  }
}

.lite-editor-tooltip-input {
  border-radius: 3px;
  padding: 5px;
  border: 1px solid $lite-editor-border-color;
  width: 100%;
  font-size: 16px;
  color: $lite-editor-font-color;
}

.lite-editor-extend-input {
  margin-right: 10px;
  border-radius: 3px;
  padding: 5px;
  border: 1px solid $lite-editor-border-color;
  width: 100px;
  vertical-align: middle;
}

.lite-editor-btn .lite-editor-font-back,
.lite-editor-btn .lite-editor-font-go {
  color: $lite-editor-btn-active-color;
}

.lite-editor-btn[disabled] .lite-editor-font-back,
.lite-editor-btn[disabled] .lite-editor-font-go {
  color: $lite-editor-btn-color;
}
