/* header头部样式 */
.header {
  display: flex;
  width: 100%;
  min-width: 1400px;
  height: 50px;
  padding: 8px 8px 8px 20vw;
  position: absolute;
  top: 0;
  background-color: #fff;
  z-index: 99;
}

.header .modules-wrapper {
  margin: 0 auto;
  display: flex;
}

.header .module-group {
  display: flex;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}

.header .module-group.left {
  margin-right: 24px;
}

.header .dropdown .dropdown-toggle .icon-arrow {
  display: inline-block;
  width: 0;
  height: 0px;
  border-width: 4px 4px 0 4px;
  border-style: solid;
  vertical-align: middle;
  border-color: currentColor transparent transparent transparent;
  transform: scale(0.8);
  margin-left: 4px;
}

.header .dropdown .dropdown-menu {
  min-width: 120px;
  padding: 6px 0;
  line-height: 1.2;
  border-radius: 4px;
  background-color: #fff;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1)
}

.header .dropdown .menu-item {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 6px 12px;
  cursor: pointer;
}

.header .dropdown .menu-item:hover {
  background-color: #fafafa;
}

.header .module-item {
  padding: 8px 12px;
  cursor: pointer;
}

.header .module-item.disabled {
  cursor: not-allowed;
}

.header .module-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
  transition: all .2s;
}

#image_uploader {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

/* toolbar工具栏样式 */
.toolbar-wrapper {
  display: flex;
  width: 100%;
  min-width: 1400px;
  padding: 8px 8px 8px 20vw;
  position: absolute;
  top: 50px;
  background-color: #fafafa;
  z-index: 9;
}

#toolbar {
  display: flex;
  margin: 0 auto;
}

#toolbar .btn-group {
  display: flex;
  padding: 0 6px;
}

#toolbar .btn-group+.btn-group {
  border-left: 1px solid #ddd;
}

#toolbar .edit-btn {
  height: 24px;
  padding: 0 3px;
  color: #4A4A51;
  font-size: 18px;
  line-height: 1;
  border-radius: 2px;
}

#toolbar .edit-btn:hover {
  background-color: rgba(0, 0, 0, 0.07);
}

#toolbar .edit-btn.active {
  color: #07c160;
}

#toolbar .edit-btn+.edit-btn {
  margin-left: 6px;
}

/* 颜色选择器 */
#toolbar .picker {
  position: relative;
}

#toolbar .picker .colorlump {
  position: absolute;
  display: inline-block;
  height: 2px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  border-radius: 1px;
}

/* 下拉菜单 */
#toolbar .dropdown {
  cursor: default;
}

#toolbar .dropdown .dropdown-toggle {
  padding: 0 2px;
  border: none;
  color: inherit;
  font-size: inherit;
  background-color: unset;
}

#toolbar .dropdown .dropdown-toggle.disabled {
  cursor: not-allowed;
  color: #aaa;
}

#toolbar .dropdown .dropdown-toggle .icon-arrow {
  display: inline-block;
  width: 0;
  height: 0px;
  border-width: 4px 4px 0 4px;
  border-style: solid;
  vertical-align: middle;
  border-color: currentColor transparent transparent transparent;
  transform: scale(0.8);
  margin-left: 4px;
}

#toolbar .dropdown .dropdown-menu {
  min-width: 120px;
  padding: 6px 0;
  line-height: 1.2;
  border-radius: 4px;
  background-color: #fff;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1)
}

#toolbar .dropdown .menu-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 6px 12px;
}

#toolbar .dropdown .menu-item:hover {
  background-color: #fafafa;
}

#toolbar .dropdown .menu-item.active {
  color: #07c160;
}

#toolbar .dropdown .menu-item svg {
  color: inherit;
  margin-right: 10px;
}

/* 表情菜单 start*/
#toolbar .dropdown-emoji .emoji-list {
  display: flex;
  flex-wrap: wrap;
  width: 408px;
  max-height: 440px;
  padding: 6px 12px;
  overflow-y: auto;
}

#toolbar .dropdown-emoji .emoji-item {
  padding: 5px;
  border-radius: 4px;
  cursor: pointer;
}

#toolbar .dropdown-emoji .emoji-item:hover {
  transition: all 0.3s;
  background-color: rgba(0 0 0 / 5%);
}

#toolbar .dropdown-emoji .emoji-item .icon-emoji {
  width: 32px;
  height: 32px;
  background-size: 100% auto;
  background-image: url("@/src/images/sprite/emoji_sprite.png")
}

/* 侧壁栏 */
.sidebar {
  position: absolute;
  width: 24vw;
  min-width: 320px;
  top: 90px;
  bottom: 0;
  left: 0;
  overflow: auto;
  /* display: none; */
  background-color: #fff;
  z-index: 2;
}

.sidebar .tabs {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar .tabs-nav {
  display: flex;
  border-bottom: 1px solid #eee;
}

.sidebar .tabs-nav .tab-item {
  flex: 1;
  padding: 15px;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
}

.sidebar .tabs-nav .tab-item:hover,
.sidebar .tabs-nav .tab-item.active {
  color: #07c160;
  transition: all 0.3s;
}

.sidebar .tabs-nav .tab-item.active {
  font-weight: bold;
}

.sidebar .graphic-list .graphic-item,
.sidebar .template-list .template-item {
  margin: 12px;
  padding: 10px 15px;
  border-radius: 4px;
}

.sidebar .template-list .template-item {
  max-height: 500px;
  overflow-y: auto;
}

.sidebar .graphic-list .graphic-item:hover,
.sidebar .template-list .template-item:hover {
  box-shadow: inset 0 0 10px 0px #ccc;
  transition: all 0.3s;
}

.sidebar .tabs-content {
  overflow: auto;
  color: rgba(0, 0, 0, 0.9);
  font-size: 17px;
  line-height: 1.6;
}

.sidebar .tabs-content * {
  max-width: 100%;
  box-sizing: border-box !important;
}

.sidebar .tabs-content p {
  clear: both;
  min-height: 1em;
}

.sidebar .tabs-content>p {
  margin-top: 0;
  margin-bottom: 24px;
}


/* 编辑器 */
.editor-wrapper {
  height: 100%;
  /* overflow: auto; */
  padding-top: 120px;
  padding-left: 20vw;
}

.editor-container {
  position: relative;
  width: 768px;
  margin: 0 auto;
  z-index: 1;
}

.editor {
  padding: 45px 95px 115px;
  position: relative;
  margin-bottom: -69px;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.05);
}

/* 底部栏 */
.footer {
  position: sticky;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 768px;
  padding: 20px 20px 15px;
  bottom: 0;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 -1px 4px 0 rgba(0, 0, 0, 0.05);
}

.footer .info {
  color: #8d8d8d;
  display: flex;
}

.footer .info .save-time {
  margin-right: 24px;
}

.footer .operation {
  display: flex;
}

.footer .operation .btn {
  width: 96px;
  height: 34px;
  margin-left: 6px;
  line-height: 34px;
  text-align: center;
  border-radius: 4px;
  border: 1px solid #e7e7e8;
  cursor: pointer;
}

.footer .operation .btn:hover {
  background: #e7e7e8;
  transition: all 0.3s;
}

/* 弹窗 */
.modal .modal-dialog {
  width: 560px;
}

.modal .tabs-nav {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.modal .tab-item {
  padding: 4px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.modal .tab-item.active {
  border-bottom-color: #07c160;
}

.modal .tab-item+.tab-item {
  margin-left: 12px;
}

.modal .form-item {
  margin-bottom: 15px;
}

.modal .form-item label {
  display: inline-block;
  min-width: 102px;
  margin-right: 12px;
  text-align: right;
}

.modal input[type="text"] {
  width: 320px;
  height: 32px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #eee;
}

.modal input[type="text"]:focus {
  border-color: #07c160;
}

/* 插入视频弹窗 */
#video_uploader {
  display: none;
}

#video_modal #video_uploader~.filename {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal .btn-upload-video {
  display: inline-block;
  margin-right: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #E3E4E5;
  background-color: #F6F7F8;
  cursor: pointer;
}

.modal .btn-upload-video:hover {
  color: #858585;
  background-color: #EFF0F2;
}

#video_modal .tip {
  margin-top: 12px;
  color: #b1b2b3;
  font-size: 12px;
}