/* You can add global styles to this file, and also import other style files */
@import '../node_modules/ng-zorro-antd/ng-zorro-antd.dark.less';
@import '~photoswipe/dist/photoswipe.css';
@import '~photoswipe/dist/default-skin/default-skin.css';

// @import '~ng-zorro-antd/ng-zorro-antd.less';
// 调大基础字体大小(原为14px)；会影响ng-zorro-antd组件字体和rem单位的字体大小
@font-size-base: 16px;

/* You can add global styles to this file, and also import other style files */
@dark_color: #001529;
@dark_color_hover: lighten(@dark_color, 20);
@light_dark_color: #393d49;
@select_color: #10aeff;

@default_color: white;
@color_disabled: #c5bfbf;
@btn_bg_color: #134197;
@btn_hover_color: lighten(@btn_bg_color, 20%);
@color_select: #4dd2ff;
// 特殊颜色设定
@special_color-1: #d87a16;
@special_color-2: #e89a3c;
@special_color-3: #f3b765;
@special_color-4: #f8cf8d;

html,
header,
body {
  padding: 0px;
  margin: 0px;
  height: 100%;
  width: 100%;
}

.rh-default-color {
  background-color: @default_color;
}

.rh-dark-color {
  background-color: @dark_color;
}
.rh-full {
  padding: 0px;
  margin: 0px;
  height: 100%;
  width: 100%;
}

.rh-border {
  padding: 2px;
  border: 1px solid #f0f0f0;
  border-radius: 2px;
}

.rh-full-width {
  width: 100%;
}

.rh-color-default {
  // margin: 2px 3px;
  color: darkcyan;
}

.rh-color-primary {
  // margin: 2px 3px;
  color: #1890ff !important;
}

.rh-color-danger {
  // margin: 2px 3px;
  color: red !important;
}
.rh-color-hint {
  // margin: 2px 3px;
  color: orange;
}

.rh-color-success {
  // margin: 2px 3px;
  color: green;
}

.rh-default-theme {
  color: black;
  background-color: white;
}

.rh-dark-theme {
  color: whitesmoke;
  background-color: #001529;
}

.rh-margin-small {
  margin-left: 8px;
}

.rh-margin-default {
  margin-left: 16px;
}

.rh-margin-large {
  margin-left: 32px;
}

.rh-margin-top-small {
  margin-top: 8px;
}

.rh-margin-top-default {
  margin-top: 16px;
}

.rh-margin-top-large {
  margin-top: 32px;
}

.rh-margin-bottom-small {
  margin-bottom: 8px;
}

.rh-margin-bottom-default {
  margin-bottom: 16px;
}

.rh-margin-bottom-large {
  margin-bottom: 32px;
}

.rh-margin-right-small {
  margin-right: 8px;
}

.rh-margin-right-default {
  margin-right: 16px;
}

.rh-margin-right-large {
  margin-right: 32px;
}

.rh-margin-left-small {
  margin-left: 8px;
}

.rh-margin-left-default {
  margin-left: 16px;
}

.rh-margin-left-large {
  margin-left: 32px;
}

.rh-text-center {
  text-align: center;
}

.rh-tag-big {
  width: 100px;
  height: 48px;
  line-height: 40px;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
}

// 清除浮动，需要在外层的container附加此样式
.rh-clearfix {
  display: block;
  zoom: 1;

  &:after {
    content: '   ';
    font-size: 0;
    height: 0;
    clear: both;
    visibility: hidden;
  }
}

// ****** tree*************

.rh-tree-node {
  cursor: pointer;
  line-height: 24px;
  margin-left: 4px;
  display: inline-block;
  user-select: none;

  // margin: 0 -800px;
  // padding: 0 800px;
  &.active {
    background: #e7f7ff;
    color: #fff;
  }
}

//***************table样式**********************//

// 奇偶行变色
nz-table.rh-table-striped tbody tr:nth-child(odd) {
  td {
    background: #2b2d3b;
  }
  background: #2b2d3b;
}

.table-text-center {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

// 设置长单词拆分换行
.text-wrap {
  white-space: normal;
  word-break: break-all;
  word-wrap: break-word;
}

/* 表格内容居中，超出部分显示为省略号 */
nz-table.rh-table-ellipsis {
  table-layout: fixed;

  tr {
    th {
      .table-text-center();
    }

    td {
      .table-text-center();
    }
  }
}

nz-table.rh-table-default {
  tr {
    th {
      white-space: normal !important;
      word-break: break-all !important;
      word-wrap: break-word !important;
    }

    td {
      white-space: normal !important;
      word-break: break-all !important;
      word-wrap: break-word !important;
    }
  }
}

//************结束table样式****************

.rh-selector-width-default {
  min-width: 120px;
}

// antd自带的tabset默认不会占满整个区域；
nz-tabset.rh-full {
  display: flex;
  flex-direction: column;
  height: 100%;
  div.ant-tabs-content {
    height: 100%;
  }
}

nz-spin.rh-full {
  .ant-spin-container {
    height: 100%;
  }
}

// 滚动条样式

::-webkit-scrollbar {
  width: 8px;
  height: 12px;
  background-color: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background-color: grey;
  opacity: 0.4;
  filter: alpha(opacity=40);
  /* 针对 IE8 以及更早的版本 */
}

::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  background-color: #f5f5f5;
}

::-webkit-scrollbar-thumb:hover {
  opacity: 1;
  background-color: #1890ff;
}

// 工控端专用：按钮移入，禁用和选中样式
.industrial-button-disabled {
  background-color: @color_disabled !important;
  border-color: @color_disabled !important;
  cursor: not-allowed !important;
}
.industrial-button-hover {
  background-color: @btn_hover_color !important;
}
.industrial-button-select {
  background-color: @color_select !important;
}
.industrial-special-button-select {
  background-color: @special_color-1 !important;
  border-color: @special_color-3 !important;
  cursor: not-allowed !important;
}
.industrial-andon-call-btn-hover {
  color: #165996 !important;
  border-color: #165996 !important;
}
.industrial-andon-call-btn-select {
  background: linear-gradient(145deg, #8acdf5, #8ad0f9) !important;
  box-shadow: -1px -2px 1px #486c82, 3px 0px 3px #7cbce2 !important;
  color: #165996 !important;
  border-color: #165996 !important;
}
