// IMR PRESS 相关色彩
$main_color: var(--main-color, #1e1d40);
$main_color_l: #005acd;

$logo_color: #124a87;
$tab_color: #4c516d;
$default_color: #cddade;

$link_color: #005acd;
$link_color_bg: #005acd33;
$key_color: #d90d32;
$key_color_bg: #d90d3233;
$success_color: #30a4a6;
$success_color_bg: #30a4a633;
$warning_color: #ffb100;
$warning_color_bg: #ffb10033;
$theme_color: var(--theme-color, #526475);
$theme_opcity_color: var(--theme-opcity-color, #52647555);

// 灰色系
$font_color_d: #000;
$font_color: #3a3b43;
$font_color_l: #717384;
$line_color: #d2d1d9;
$disable_color: #e9eef0;
$border_color: #e9eef0;
$bg_color: #f6f9fc;
$content_color: #fff;
$body_color: #f1f6fb;

// 阴影
$shadow_color: #f5f8fa;
$model_wrap_color: #52647533;

// 字体
$h_family: 'Times new roman', 'Garamond', 'Georgia';
// $h_family: 'Playfair Display', 'Times new roman';
$p_family: 'Open Sans', 'HelveticaNeue', 'Helvetica', 'Arial';
$i_family: 'Open Sans Italic', 'HelveticaNeue', 'Helvetica', 'Arial';

// 字号
$font_size_h1: 32px;
$font_size_h2: 24px;
$font_size_h3: 16px;

$font_size_p1: 16px;
$font_size_p2: 14px;

// 行高
$line_height_h1: 46px;
$line_height_h2: 34px;
$line_height_h3: 24px;

$line_height_p1: 24px;
$line_height_p2: 22px;

// 屏幕尺寸分割
$const: 0.75;
$sm_screen: 1200px;
$md_screen: 1600px;
$lg_screen: 1920px;

/*---- variables ----*/
$xl: 'screen and (min-width: ' + $lg_screen + ')';
$lg: 'screen and (max-width: ' + $lg_screen + ') and (min-width: ' + $md_screen +
  ')';
$md: 'screen and (max-width: ' + $md_screen + ') and (min-width: ' + $sm_screen +
  ')';
$sm: 'screen and (max-width: ' + $sm_screen + ')';

/*---- Mixins ----*/
@mixin mq($mqString) {
  @media #{$mqString} {
    @content;
  }
}

// 颜色
.main-color {
  color: $main_color;
}
.main-color-l {
  color: $main_color_l;
}

.logo-color {
  color: $logo_color;
}
.tab-color {
  color: $tab_color;
}
.default-color {
  color: $default_color;
}

.link-color {
  color: $link_color;
}
.key-color {
  color: $key_color;
}
.success-color {
  color: $success_color;
}
.warning-color {
  color: $warning_color;
}
.font-color-d {
  color: $font_color_d;
}
.font-color {
  color: $font_color;
}
.font-color-l {
  color: $font_color_l;
}
.line-color {
  color: $line_color;
}
.disable-color {
  color: $disable_color;
}
.border-color {
  color: $border_color;
}
.bg-color {
  color: $bg_color;
}
.content-color {
  color: $content_color;
}
.shadow-color {
  color: $shadow_color;
}
.theme-color {
  color: $theme_color;
}

.main-bg {
  background-color: $main_color;
}
.main-bg-l {
  background-color: $main_color_l;
}

.logo-bg {
  background-color: $logo_color;
}
.tab-bg {
  background-color: $tab_color;
}
.default-bg {
  background-color: $default_color;
}

.link-bg {
  background-color: $link_color;
}
.key-bg {
  background-color: $key_color;
}
.success-bg {
  background-color: $success_color;
}
.warning-bg {
  background-color: $warning_color;
}
.font-bg-d {
  background-color: $font_color_d;
}
.font-bg {
  background-color: $font_color;
}
.font-bg-l {
  background-color: $font_color_l;
}
.line-bg {
  background-color: $line_color;
}
.disable-bg {
  background-color: $disable_color;
}
.border-bg {
  background-color: $border_color;
}
.bg-bg {
  background-color: $bg_color;
}
.content-bg {
  background-color: $content_color;
}
.shadow-bg {
  background-color: $shadow_color;
}
.theme-bg {
  background-color: $theme_color;
}

// 阴影
@mixin ipub-shadow {
  box-shadow: 3px 3px 6px $shadow_color;
}
.ipub-shadow {
  @include ipub-shadow;
}

// 字体
h1,
.ipub-h1 {
  font-size: $font_size_h1;
  line-height: $line_height_h1;
  font-weight: bold;
  font-family: $h_family;
}
@mixin ipub-h1 {
  font-size: $font_size_h1;
  line-height: $line_height_h1;
  font-weight: bold;
  font-family: $h_family;
}
h2,
.ipub-h2 {
  font-size: $font_size_h2;
  line-height: $line_height_h2;
  font-weight: bold;
  font-family: $h_family;
}
@mixin ipub-h2 {
  font-size: $font_size_h2;
  line-height: $line_height_h2;
  font-weight: bold;
  font-family: $h_family;
}
h3,
.ipub-h3 {
  font-size: $font_size_h3;
  line-height: $line_height_h3;
  font-weight: bold;
  font-family: $h_family;
}
@mixin ipub-h3 {
  font-size: $font_size_h3;
  line-height: $line_height_h3;
  font-weight: bold;
  font-family: $h_family;
}

.ipub-p1 {
  font-size: $font_size_p1;
  line-height: $line_height_p1;
  font-weight: bold;
  font-family: $p_family;
}
@mixin ipub-p1 {
  font-size: $font_size_p1;
  line-height: $line_height_p1;
  font-weight: bold;
  font-family: $p_family;
}
.ipub-p2 {
  font-size: $font_size_p2;
  font-weight: normal;
  line-height: $line_height_p2;
  font-family: $p_family;
}
@mixin ipub-p2 {
  font-size: $font_size_p2;
  font-weight: normal;
  line-height: $line_height_p2;
  font-family: $p_family;
}

// 间距
.mar-b-4 {
  margin-bottom: 4px;
}
.mar-b-6 {
  margin-bottom: 6px;
}
.mar-b-8 {
  margin-bottom: 8px;
}
.mar-b-10 {
  margin-bottom: 10px;
}
.mar-b-12 {
  margin-bottom: 12px;
}
.mar-b-16 {
  margin-bottom: 16px;
}
.mar-b-20 {
  margin-bottom: 20px;
}
.mar-b-24 {
  margin-bottom: 24px;
}
.mar-b-30 {
  margin-bottom: 30px;
}
.mar-b-36 {
  margin-bottom: 36px;
}
.mar-b-40 {
  margin-bottom: 40px;
}
.mar-b-50 {
  margin-bottom: 50px;
}
.mar-b-60 {
  margin-bottom: 60px;
}
.mar-b-80 {
  margin-bottom: 80px;
}
.mar-b-100 {
  margin-bottom: 100px;
}

.mar-l-5 {
  margin-left: 5px;
}
.mar-l-10 {
  margin-left: 10px;
}
.mar-l-12 {
  margin-left: 12px;
}
.mar-l-16 {
  margin-left: 16px;
}
.mar-l-20 {
  margin-left: 20px;
}
.mar-l-30 {
  margin-left: 30px;
}
.mar-l-40 {
  margin-left: 40px;
}

.tr {
  text-align: right;
}
.tl {
  text-align: left;
}
.tc {
  text-align: center;
}

.fw-bd {
  font-weight: bold;
}

.fw-400 {
  font-weight: 400;
}

.inline-block {
  display: inline-block;
}

.line-h-40 {
  line-height: 40px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

// hover

.ipub-link:hover {
  color: $link_color;
  transition: 0.3s all;
  cursor: pointer;
}
.ipub-link-theme:hover {
  color: $theme_color;
  transition: 0.3s all;
  cursor: pointer;
}

.ipub-cursor-pointer {
  cursor: pointer;
}

.ipub-c-p {
  cursor: pointer;
}

.relative {
  position: relative;
}
.right-option {
  position: absolute;
  right: 0;
  top: 0;
}

// rotate
.rotate {
  display: inline-block;
  transition: 0.3s all;
}

.rotate-90 {
  transform: rotate(90deg);
}

.rotate-180 {
  transform: rotate(180deg);
}

.rotate-270 {
  transform: rotate(-90deg);
}

.transition {
  transition: 0.3s all;
}

.ipub--validateStatus {
  border-color: $key_color !important;
}

.disabled-icon {
  color: $line_color;
  cursor: not-allowed !important;
}

.omis {
  width: 100%;
  overflow: hidden; //超出的文本隐藏
  text-overflow: ellipsis; //溢出用省略号显示
  white-space: nowrap; //溢出不换行
}

.nowrap {
  white-space: nowrap;
}

.omission-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.omission {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.ipub-draggable-icon {
  vertical-align: middle;
  display: inline-flex;
  font-size: 24px;
  width: 40px;
  text-align: center;
  justify-content: center;
  align-items: center;
  cursor: move;
}

.border-right {
  border-right: 1px solid $border_color;
}

.border-bottom {
  border-bottom: 1px solid $border_color;
}
