/**
 * 鑫三利系统 - CSS重置
 */

/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 移除默认边距和内边距 */
html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
fieldset,
legend,
textarea,
pre,
iframe,
hr {
  margin: 0;
  padding: 0;
}

/* 设置根字体 */
html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Body样式 */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 列表样式 */
ul,
ol {
  list-style: none;
}

/* 链接样式 */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* 图片样式 */
img,
video {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 表格样式 */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* 表单元素继承字体 */
input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* 移除按钮默认样式 */
button {
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}

/* 移除输入框默认样式 */
input,
textarea,
select {
  outline: none;
  border: none;
}

/* 移除文本域调整大小 */
textarea {
  resize: vertical;
}

/* 隐藏滚动条但保持滚动功能 */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* 文字选中样式 */
::selection {
  background-color: var(--color-primary);
  color: #ffffff;
}

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

/* 省略号 */
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 多行省略 */
.ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 禁用状态 */
[disabled] {
  cursor: not-allowed !important;
}
