@use './variables.scss' as vars;
@use "sass:color";

html {
    font-size: 16px;

    @media screen and (max-width: vars.$lg) {
        font-size: 15px;
    }

    @media screen and (max-width: vars.$md) {
        font-size: 14px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: vars.$text-regular;
}


a {
    text-decoration: none;
    color: vars.$primary-color;
}

.page-container {
    padding: vars.$content-padding;
}

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

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clearfix:after {
    content: '';
    display: table;
    clear: both;
}

// 全局按钮样式
.el-button--primary {
    background-color: vars.$primary-color;
    border-color: vars.$primary-color;

    &:hover,
    &:focus {
        background-color: color.scale(vars.$primary-color, $lightness: 10%);
        border-color: color.scale(vars.$primary-color, $lightness: 10%);
    }
}

.el-button--accent {
    background-color: vars.$accent-color;
    border-color: vars.$accent-color;
    color: #fff;

    &:hover,
    &:focus {
        background-color: color.scale(vars.$accent-color, $lightness: 10%);
        border-color: color.scale(vars.$accent-color, $lightness: 10%);
    }
}

// 常用边距
.mb-10 {
    margin-bottom: 0.625rem;
}

.mb-20 {
    margin-bottom: 1.25rem;
}

.mt-10 {
    margin-top: 0.625rem;
}

.mt-20 {
    margin-top: 1.25rem;
}

.ml-10 {
    margin-left: 0.625rem;
}

.mr-10 {
    margin-right: 0.625rem;
}

// 常用宽度
.w-100 {
    width: 100%;
}