/* flex */
.flex {
	display: flex;
}
.flex-row {
	flex-direction: row;
}
.flex-col {
	flex-direction: column;
}
.justify-center {
	justify-content: center;
}
.flx-center {
	display: flex;
	align-items: center;
	justify-content: center;
}
.flx-justify-between {
	display: flex;
	justify-content: space-between;
}
.flx-align-center {
	display: flex;
	align-items: center;
}

/* clearfix */
.clearfix::after {
	display: block;
	height: 0;
	overflow: hidden;
	clear: both;
	content: "";
}

/* 文字单行省略号 */
.sle {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

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

/* 文字多了自動換行 */
.break-word {
	word-break: break-all;
	word-wrap: break-word;
}

/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
	transition: all 0.2s;
}
.fade-transform-enter-from {
	opacity: 0;
	transition: all 0.2s;
	transform: translateX(-30px);
}
.fade-transform-leave-to {
	opacity: 0;
	transition: all 0.2s;
	transform: translateX(30px);
}

/* Breadcrumb */
.breadcrumb-enter-active {
	transition: all 0.2s;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
	opacity: 0;
	transform: translateX(10px);
}

/* scroll bar */
::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}
::-webkit-scrollbar-thumb {
	background-color: #d3d3d3;
	border-radius: 20px;
	box-shadow: inset 0 0 0 white;
}

/* nprogress样式 */
#nprogress .bar {
	background: var(--ant-primary-color) !important;
}
#nprogress .spinner-icon {
	border-top-color: var(--ant-primary-color) !important;
	border-left-color: var(--ant-primary-color) !important;
}
#nprogress .peg {
	box-shadow: 0 0 10px var(--ant-primary-color), 0 0 5px var(--ant-primary-color) !important;
}

/*
    外边距、内边距全局样式
    marked by Y_Lao
*/
.loopStyle(@counter) when (@counter > 0) {
	.mt-@{counter} {
		margin-top: @counter * 1px !important;
	}
	.mr-@{counter} {
		margin-right: @counter * 1px !important;
	}
	.mb-@{counter} {
		margin-bottom: @counter * 1px !important;
	}
	.ml-@{counter} {
		margin-left: @counter * 1px !important;
	}
	.pt-@{counter} {
		padding-top: @counter * 1px !important;
	}
	.pr-@{counter} {
		padding-right: @counter * 1px !important;
	}
	.pb-@{counter} {
		padding-bottom: @counter * 1px !important;
	}
	.pl-@{counter} {
		padding-left: @counter * 1px !important;
	}
	.px-@{counter} {
		padding-right: @counter * 1px;
		padding-left: @counter * 1px;
	}
	.p-@{counter} {
		padding: @counter * 1px !important;
	}
	.w-@{counter} {
		width: @counter * 1% !important;
	}
	.h-@{counter} {
		height: @counter * 1% !important;
	}
	.loopStyle((@counter - 1)); // 递归调用自身
}

.loopStyle(100);

// 去除margin
h1,
dl,
dd,
h4,
h2,
h3,
p {
	margin: 0;
}
