@import 'renderSass/theme';
@import 'renderSass/button';
@import 'renderSass/dialog';
@import 'renderSass/input';
@import 'renderSass/table';
@import 'renderSass/label';
@import 'renderSass/radio';
@import 'renderSass/drawer';
@import 'renderSass/steps';
@import 'renderSass/message';
@import 'renderSass/upload';
@import 'renderSass/slider';
@import 'renderSass/drop';

html,
body,
#app,
.app-main {
  background: rgba(240, 244, 250, 1);
}
.cursor-pointer {
  cursor: pointer;
}

.danger {
  color: #f56c6c !important;
  & :disabled {
    color: rgba(0, 0, 0, 0.25);
  }
  & :hover {
    color: #dd6161;
  }
  & :focus {
    color: #dd6161;
  }
  & :active {
    color: #dd6161;
  }
}
.default {
  color: #000 !important;
  background: #f1f3f5 !important;
  border-color: #f1f3f5 !important;
  &.is-disabled {
    &.is-plain {
      background-color: #fff !important;
      border-color: #ebeef5 !important;
      color: #c0c4cc !important;
    }
  }
  & :hover {
    color: #000;
  }
  & :focus {
    color: #000;
  }
  & :active {
    color: #000;
  }
}

.container {
  padding: 20px 10px;
  //background-image: url('../images/backimage.png');
}

.view-body {
  text-align: left;
  font-size: 14px;
  padding: 0 10px;
  margin: 10px 0;

  div {
    outline: unset;
  }

  /* 添加一些基本的样式以美化 Markdown 内容 */

  p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-top: 24px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #cecece;
    padding: 5px;
  }

  ul,
  ol {
    margin: 16px 0;
    padding-left: 32px;
  }

  li {
    margin-bottom: 8px;
  }

  a {
    color: #007bff;
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }

  code {
    background-color: #f1f1f1;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
  }

  img {
    max-width: 100%;
  }

  pre {
    background-color: #f1f1f1;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
  }

  pre code {
    background-color: transparent;
    padding: 0;
  }

  table {
    border: 1px solid #f9f9f9;
    position: relative;
    width: 100%;
    margin: 5px;
    border-collapse: collapse;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
  }

  th,
  td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
  }

  th {
    background-color: #f2f2f2;
  }

  // 添加斑马条纹效果
  tr:nth-child(even) {
    background-color: #f9fafc;
  }
}

.m-view {
  position: relative;
  padding: 10px;
  // 离开后还原
  &:after {
    content: '';
    position: absolute;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    top: -5px;
    left: -5px;
    background: rgba(201, 203, 255, 0.3);
    transition: all 0.3s ease-in-out;
    opacity: 0; // 初始状态下透明
    border: 2px solid rgb(201, 203, 255);
    border-radius: 5px;
    overflow: hidden;
  }

  &:hover:after {
    opacity: 1; // 悬停时显示
  }
}

.editor-button {
  position: relative;
}

.public-icon {
  font-size: 14px;
  cursor: pointer;
}

.public-icon + .public-icon {
  margin-left: 10px;
}

//去除滚动条
.view-body::-webkit-scrollbar {
  width: 0px;
  height: 0px;
}

.render-container {
  height: calc(100vh - 20px);
  background: #fff;
  border-radius: 7px;
  margin: 10px 10px 10px 10px;
  padding: 20px;
  overflow-y: auto;
  &::-webkit-scrollbar {
    width: 0px;
  }
}

.header-icon {
  width: 50px;
  height: 50px;
}

#nprogress {
  & .bar {
    background: $--color-primary-button-gradient;
  }
  & .peg {
    box-shadow: 0 0 10px $--color-primary-button-gradient,
      0 0 5px $--color-primary-button-gradient;
  }
}

.resetHtml {
  outline: none;
  border: none;
}
