/*
 * 全局样式设置
 */
*,
*:before,
*:after {
  box-sizing: border-box; /* 确保所有元素的宽度和高度计算包括 padding 和 border */
}

body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.15;
  color: #303133;
  background-color: #fff;
}

a {
  color: mix(#fff, $--color-primary, 20%); /* 链接颜色为白色与主色混合后的20% */
  text-decoration: none;

  &:focus,
  &:hover {
    color: $--color-primary; /* 激活或悬停时链接颜色为主色 */
    text-decoration: underline;
  }
}

img {
  vertical-align: middle; /* 图片垂直居中对齐 */
  max-width: 100%; /* 确保图片不会超出其容器 */
}

/* 清除浮动 */
.clearfix:before,
.clearfix:after {
  content: " ";
  display: table;
}
.clearfix:after {
  clear: both;
}

/* 重置 element-ui 样式 */
.site-wrapper .el-pagination {
  display: flex;
  justify-content: flex-end; /* 分页组件右对齐 */
}

/* 布局 */
.site-wrapper {
  position: relative;
  min-width: 1180px; /* 设置最小宽度以确保布局在大屏幕上的稳定性 */
}

/* 侧边栏折叠 */
.site-content--tabs {
  padding: 60px 20px 20px 20px !important; /* 当标签页存在时调整内容区的内边距 */
}
.site-navbar {
  color: #333333;
}
.site-sidebar--fold {
  .site-navbar__header,
  .site-navbar__brand,
  .site-sidebar {
    width: 100px; /* 折叠状态下左侧栏的宽度 */
  }
  .site-navbar__body,
  .site-content__wrapper {
    margin-left: 100px; /* 折叠后内容区向左偏移量 */
    border-bottom: 1px solid #EBEDF0;
  }
  .site-navbar__brand-lg {
    display: none; /* 折叠状态隐藏大尺寸品牌标志 */
  }
  .site-navbar__brand-mini {
    display: inline-block; /* 显示小尺寸品牌标志 */
  }
  .site-sidebar,
  .site-sidebar__inner {
    overflow: initial; /* 解决滚动条显示问题 */
  }
}
.site-sidebar,
.site-sidebar__menu-icon,
.site-content__wrapper,
.site-content--tabs > .el-tabs .el-tabs__header {
  transition: all .3s ease-in-out; /* 添加过渡效果 */
}

/* 导航栏 */
.site-navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  height: 50px;
  background-color: $navbar--background-color;

  &__header {
    float: left;
    height: 50px;
    margin-left: 20px;
    overflow: hidden;
  }
  &__brand {
    display: table-cell;
    vertical-align: middle;
    height: 50px;
    line-height: 50px;
    font-size: 20px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;

    &-lg,
    &-mini {
      margin: 0 5px;
      color: #fff;
      &:focus,
      &:hover {
        color: #fff;
        text-decoration: none;
      }
    }
    &-mini {
      display: none;
    }
  }
  &__switch {
    font-size: 18px;
    border-bottom: none !important;
  }
  &__avatar {
    border-bottom: none !important;
    .el-dropdown-link img {
      width: 36px;
      height: auto;
      margin-right: 5px;
      border-radius: 100%;
      vertical-align: middle;
    }
  }
  &__body {
    background-color: #fff;
  }
  &__menu {
    float: left;
    border-bottom: 0;

    &--right {
      float: right;
    }
    a:focus,
    a:hover {
      text-decoration: none;
    }
  }
}

/* 侧边栏 */
.site-sidebar {
  position: fixed;
  top: 50px;
  left: 0;
  bottom: 0;
  z-index: 1020;
  width: 250px;
  overflow: hidden;

  &--dark,
  &--dark-popper {
    background-color: $sidebar--background-color-dark;
  }
  &__inner {
    position: relative;
    width: 250px;
    height: 100%;
    padding-bottom: 15px;
    overflow-y: scroll;
  }
  &__menu.el-menu {
    border-right: 0;
  }
  &__menu-icon {
    width: 24px;
    margin-right: 5px;
    text-align: center;
    font-size: 16px;
    color: inherit !important;
  }
}

/* 内容区 */
.site-content {
  position: relative;
  padding: 15px;
  background-color: #F5F6F9;

  &__wrapper {
    position: relative;
    padding-top: 50px;
    margin-left: 230px;
    min-height: 100%;
    background: $content--background-color;
  }
  &--tabs {
    padding: 55px 0 0;
  }
}

/* 表格样式 */
.table-header {
  background-color: #f7f8fa !important;
  color: #000;
  height: 60px;
}
.table-row {
  height: 100px;
}
.table-row-low {
  height: 65px;
}
.table-cell {
  padding: 0;
}
.el-table .cell {
  line-height: 20px !important;
  word-break: break-word !important;
}
.el-table tr > td:first-child > .cell,
.el-table th:first-child > .cell {
  padding-left: 20px;
}

/* 按钮样式 */
.default-btn {
  height: 32px;
  line-height: 32px;
  padding: 0 15px;
  font-size: 13px;
  background-color: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 2px;
  cursor: pointer;
  display: inline-block;
}
.default-btn:hover {
  color: #155bd4;
  border-color: #155bd4;
}
.default-btn.primary-btn {
  color: #ffffff;
  background-color: #155bd4;
  border-color: #155bd4;
}
.default-btn.primary-btn:hover {
  background: #447cdd;
  border-color: #447cdd;
}
.default-btn.text-btn {
  font-size: 14px;
  padding: 0;
  margin-right: 0;
  border: none;
  color: #155bd4;
  background-color: unset;
  word-break: keep-all;
}
.default-btn.text-btn:hover {
  color: #447cdd;
}
.default-btn.text-btn.disabled-btn {
  color: #C0C4CC;
  &:hover {
    cursor: not-allowed;
    color: #C0C4CC;
  }
}
.default-btn.primary-btn.disabled-btn {
  color: #ffffff;
  background-color: #8aadea;
  border-color: #8aadea;
  &:hover {
    background-color: #8aadea;
    border-color: #8aadea;
    cursor: not-allowed;
  }
}
.default-btn.disabled-btn {
  color: #999;
  &:hover {
    border-color: #dcdfe6;
    cursor: not-allowed;
  }
}
.default-btn + .default-btn {
  margin-left: 10px;
}
.text-btn + .text-btn {
  margin-left: 20px;
}

/* 状态展示 */
.tag-text {
  font-size: 14px;
}

/* 对话框样式 */
.el-dialog__header {
  border-bottom: 1px solid #f0f0f0;
  margin-right: 0;
}
.el-dialog__footer {
  border-top: 1px solid #f0f0f0;
}

/* 列表布局样式 */
.search-bar {
  padding: 25px 20px 0;
  margin-bottom: 20px;
  background-color: #F7F8FA;
  .input-row {
    .el-form-item .el-form-item__content .el-select,
    .el-form-item .el-form-item__content .el-input {
      width: 200px;
      white-space: nowrap;
      display: -webkit-inline-flex;
    }
  }
  .el-form--inline .el-form-item {
    margin-right: 20px !important;
    margin-bottom: 25px;
    .el-form-item__label-wrap {
      margin-left: unset !important;
    }
  }
}
.main-container {
  .operation-bar {
    position: relative;
    display: flex;
    align-items: center;
    height: 32px;
    line-height: 32px;
    .el-checkbox {
      padding-left: 20px;
      margin-right: 10px;
    }
    .had-selected {
      font-size: 12px;
      margin-right: 10px;
    }
    .tag-text {
      font-size: 12px;
    }
  }
  .table-con {
    margin-top: 20px;
    padding-bottom: 30px;
    .text-btn-con {
      width: 100%;
      display: flex;
      justify-content: center;
    }
    .table-cell-con {
      display: flex;
      align-items: center;
      .table-cell-image {
        width: 60px;
        height: 60px;
        img {
          display: block;
          width: 100%;
          height: 100%;
          object-fit: contain;
        }
      }
      .table-cell-text {
        margin-left: 8px;
        flex: 1;
        text-overflow: ellipsis;
        word-break: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 20px;
      }
    }
    .table-cell-image {
      width: 60px;
      height: 60px;
      img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
      }
    }
    .table-cell-text {
      text-overflow: ellipsis;
      word-break: break-word;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      line-height: 20px;
    }
    .line-clamp-one {
      -webkit-line-clamp: 1;
    }
  }
}

/* 标签样式 */
.el-tabs__nav-wrap::after{
  height: 1px !important;
}
.el-tabs__active-bar {
  width: 0 !important;
}
.el-tabs__item {
  padding: 0 20px !important;
  min-width: 68px;
  width: auto;
  text-align: center;
}
.el-tabs__item.is-active {
  background: none;
  border-bottom: 2px solid #155BD4;
}

/* 新增页面头部标题样式 */
.new-page-title {
  width: 100%;
  height: 62px;
  background: #F7F8FA;
  padding: 19px 20px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  .line {
    width: 4px;
    height: 19px;
    background: #155BD4;
    opacity: 1;
    border-radius: 2px;
    margin-right: 10px;
  }
  .text {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    opacity: 1;
  }
}
.time-select-item {
  text-align: center;
}
