@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
  // 整体背景设置为浅色渐变
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 30%, #f0f7ff 100%);
  background-attachment: fixed; // 固定背景，滚动时不变
}

label {
  font-weight: 700;
}

html {
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

.no-padding {
  padding: 0px !important;
}

.padding-content {
  padding: 4px 0;
}

a:focus,
a:active {
  outline: none;
}

// 默认链接样式会被后面的全局链接样式覆盖
a,
a:focus,
a:hover {
  cursor: pointer;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.fr {
  float: right;
}

.fl {
  float: left;
}

.pr-5 {
  padding-right: 5px;
}

.pl-5 {
  padding-left: 5px;
}

.block {
  display: block;
}

.pointer {
  cursor: pointer;
}

.inlineBlock {
  display: block;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

aside {
  background: #f0f7ff; // 浅蓝色背景
  padding: 8px 24px;
  margin-bottom: 20px;
  border-radius: 4px;
  display: block;
  line-height: 32px;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  color: #2c3e50;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  border-left: 3px solid #409EFF; // 蓝色左边框

  a {
    color: #409EFF; // 蓝色链接
    cursor: pointer;

    &:hover {
      color: #66B1FF; // 浅蓝色悬停
    }
  }
}

//main-container全局样式 - 浅色渐变背景
.app-container {
  padding: 20px;
  // 白色到浅蓝色的渐变背景，与登录页保持一致
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 50%, #f0f7ff 100%);
  min-height: calc(100vh - 84px);
  position: relative;
  
  // 添加微妙的几何装饰
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
      linear-gradient(135deg, rgba(64, 158, 255, 0.03) 0%, transparent 50%),
      linear-gradient(45deg, rgba(255, 255, 255, 0.6) 0%, transparent 40%),
      linear-gradient(-45deg, rgba(64, 158, 255, 0.02) 0%, transparent 50%);
    background-size: 
      800px 600px,
      600px 400px,
      500px 500px;
    background-position: 
      -100px -100px,
      500px 200px,
      800px 500px;
    pointer-events: none;
    opacity: 1;
    z-index: 0;
  }
  
  // 确保内容在装饰层之上
  > * {
    position: relative;
    z-index: 1;
  }
}

.components-container {
  margin: 30px 50px;
  position: relative;
}

.pagination-container {
  margin-top: 30px;
}

.text-center {
  text-align: center
}

// 全局卡片样式增强 - 适配浅色背景
.el-card {
  border-radius: 8px; // 增加圆角
  border: 1px solid #e4e7ed;
  background: #ffffff; // 白色背景
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); // 轻微阴影
  
  &:hover {
    box-shadow: 0 6px 20px rgba(64, 158, 255, 0.12); // 蓝色阴影，更明显
    border-color: #c0d9f5; // 悬停时边框变浅蓝色
    transform: translateY(-2px); // 轻微上浮效果
  }
}

// 调整蒙版z-index，使其低于抽屉 - 使用最高优先级选择器
body .el-overlay {
  .v-modal {
    z-index: 1000 !important;
    position: fixed !important;
  }
}

// 确保抽屉z-index高于蒙版 - 使用最高优先级选择器
body .el-drawer {
  z-index: 3000 !important;
  position: fixed !important;
}

// 直接针对Element UI抽屉的蒙版样式
body .el-drawer__wrapper {
  .v-modal {
    z-index: 1000 !important;
    position: fixed !important;
  }
}

// 确保所有模态框的z-index都低于抽屉
body .v-modal {
  z-index: 1000 !important;
  position: fixed !important;
}

// 针对选择模板抽屉的特定样式
body .el-drawer[data-v-f6374af2] {
  z-index: 3000 !important;
}

body .el-drawer[data-v-4f121312] {
  z-index: 3000 !important;
}

// 确保所有类型的蒙版都低于抽屉
body .v-modal,
body .el-overlay .v-modal,
body .el-dialog__wrapper .v-modal {
  z-index: 1000 !important;
  position: fixed !important;
}

// 全局按钮样式增强
.el-button--primary {
  background-color: #409EFF;
  border-color: #409EFF;
  
  &:hover,
  &:focus {
    background-color: #66B1FF;
    border-color: #66B1FF;
  }
  
  &:active {
    background-color: #337AB7;
    border-color: #337AB7;
  }
}

// 全局链接样式
a {
  color: #409EFF;
  transition: color 0.3s;
  
  &:hover {
    color: #66B1FF;
  }
  
  &:active,
  &:visited {
    color: #409EFF;
  }
}

.sub-navbar {
  height: 50px;
  line-height: 50px;
  position: relative;
  width: 100%;
  text-align: right;
  padding-right: 20px;
  transition: 600ms ease position;
  // 蓝色主题渐变背景
  background: linear-gradient(90deg, #409EFF 0%, #66B1FF 50%, #409EFF 100%);
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3); // 蓝色阴影

  .subtitle {
    font-size: 20px;
    color: #fff;
    font-weight: 500;
  }

  &.draft {
    background: #d0d0d0;
  }

  &.deleted {
    background: #d0d0d0;
  }
}

.link-type,
.link-type:focus {
  color: #409EFF; // 蓝色链接
  cursor: pointer;
  transition: color 0.3s;

  &:hover {
    color: #66B1FF; // 浅蓝色悬停
  }
}

.filter-container {
  padding-bottom: 10px;

  .filter-item {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 10px;
  }
}

//refine vue-multiselect plugin
.multiselect {
  line-height: 16px;
}

.multiselect--active {
  z-index: 1000 !important;
}


.el-drawer {
  z-index: 3000 !important;
  position: fixed !important;
}