@use "../mixins/config" as *;
@use "../mixins/function" as *;

a.hover-color:hover {
  color: getCssVar("theme-color") !important;
  cursor: pointer !important;
}

/* 自定义页面样式 */
.#{$namespace}-page {
  max-width: getCssVar("page-width");
  margin: 1.5rem auto;
  padding: 20px 30px;
  box-shadow: var(--vp-shadow-3);
  border-radius: 10px;
  background-color: getCssVar("bg-color-1");

  /* 隐藏 md 内容 */
  & ~ div:not(.#{$namespace}-page) {
    display: none;
  }
}

/* 自定义页面一级标题样式 */
.#{$namespace}-page-title-h1 {
  font-size: 2rem;
  line-height: 2rem;
  font-weight: 600;
}

/* 自定义页面二级标题样式 */
.#{$namespace}-page-title-h2 {
  font-size: 1.7rem;
  line-height: 1.7rem;
  font-weight: 600;
}

/* 自定义页面三级标题样式 */
.#{$namespace}-page-title-h3 {
  font-size: 1.4rem;
  line-height: 1.4rem;
  font-weight: 500;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track-piece {
  background-color: rgba(0, 0, 0, 0);
}

::-webkit-scrollbar-thumb:vertical {
  height: 4px;
  border-radius: 4px;
  background-color: var(--vp-c-brand-1);
}

::-webkit-scrollbar-thumb:horizontal {
  width: 4px;
  border-radius: 4px;
  background-color: var(--vp-c-brand-1);
}

/* flex */
.flx {
  display: flex;
}

.flx-column {
  display: flex;
  flex-direction: column;
}

.flx-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flx-column-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.flx-align-center {
  display: flex;
  align-items: center;
}

.flx-justify-center {
  display: flex;
  justify-content: center;
}

.flx-justify-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flx-justify-around {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.flx-start-justify-center {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.flx-wrap-between {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.flx-wrap-justify-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* 文字单行省略号 */
.sle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 文字多行省略号 */
.mle {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  -webkit-line-clamp: 2;
}

/* 文字多了自动换行 */
.break-word {
  word-break: break-all;
  word-wrap: break-word;
}
