*,
::after,
::before {
	box-sizing: border-box;
	// firefox scroll bar
	scrollbar-width: thin;
	scrollbar-color: var(--primary-50, #afb42b) transparent;
}

*::-webkit-selection,
*::-moz-selection,
*::selection {
	color: var(--selection-color);
	background-color: var(--selection-bg-color);
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-thumb {
	border-radius: 2px;
	background-color: var(--primary-50, #afb42b);
}

::-webkit-scrollbar-track {
	border-radius: 2px;
	background-color: var(--body-bg-color);
}

:root {
	.trm-dark-icon {
		display: none;
	}

	&.dark {
		.trm-dark-icon {
			display: unset;
		}

		.trm-light-icon {
			display: none;
		}
	}
}

body {
	font-weight: 500;
	color: var(--body-color, #7b7b7d);
	background-color: var(--body-bg-color);
	letter-spacing: 0.05em;
	overflow-x: hidden;
	margin: 0;
	margin-right: calc(100% - 100vw);
	padding: 10px;
	height: 100vh;
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;

	&::before {
		content: "";
		position: fixed;
		left: 10px;
		top: 10px;
		width: calc(100% - 20px);
		height: calc(100% - 20px);
		z-index: 9999;
		pointer-events: none;
		box-shadow: 0 0 0 20px var(--body-bg-color);
		border-radius: 10px;
		outline: var(--body-bg-color) solid 10px;
	}

	@media (max-width: 992px) {
		background-color: var(--theme-bg2-color, #f4f5f7);
		overflow: hidden auto;
		padding: 0;

		&::before {
			content: unset;
		}
	}
}

a,
a:hover {
	color: inherit;
	text-decoration: none;
}

a:focus {
	outline: inherit;
}

button {
	cursor: pointer;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.2;
	letter-spacing: 0;
	font-weight: 800;
	color: var(--theme-color, #00283a);
	margin-bottom: 0;
	margin-top: 0;
}

.h1,
h1 {
	font-size: 2.5rem;
}

.h2,
h2 {
	font-size: 2rem;
}

.h3,
h3 {
	font-size: 1.75rem;
}

.h4,
h4 {
	font-size: 1.5rem;
}

.h5,
h5 {
	font-size: 1.25rem;
}

.h6,
h6 {
	font-size: 1rem;
}

.trm-label {
	text-transform: uppercase;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 2px;
	color: var(--theme-color, #00283a);
	.transition-mixin();

	&.trm-label-light {
		color: var(--body-color, #7b7b7d);
	}

	&.trm-label-color {
		color: var(--primary, #afb42b);
	}
}

a.trm-label {
	svg,
	i {
		margin-left: 10px;
	}

	.arrow-right {
		margin-left: 5px;
		.transition-mixin();
	}

	&:focus,
	&:hover {
		outline: inherit;
		color: var(--primary, #afb42b);

		.arrow-right,
		.arrow-right {
			transform: translateX(5px);
			color: inherit;
		}
	}
}

html {
	.trm-swup-animation {
		transition: opacity 0.6s;
		opacity: 1;
	}

	// page switching animation
	&.page-animating {
		.trm-preloader {
			opacity: 1;
			transition-delay: 0s;
			pointer-events: all;
		}

		.trm-swup-animation {
			opacity: 0;
			transition-delay: -2s;
		}
	}

	// theme switch animation
	&.theme-animating {
		.trm-mode-swich-animation-frame {
			opacity: 1;
		}

		.trm-swup-animation {
			opacity: 0;
			transition-delay: 0s;
		}
	}
}

.trm-scroll-animation {
	transform: translateY(30px) scale(1.02);
	opacity: 0;
	.transition-mixin(all, 0.6s);

	&.trm-active-el {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

form,
.form {
	position: relative;
	width: 100%;

	input {
		color: var(--theme-color, #00283a);
		width: 100%;
		box-sizing: border-box;
		display: block;
		width: 100%;
		height: 45px;
		border-radius: 10px;
		margin-bottom: 20px;
		border: 0;
		box-shadow: var(--box-shadow2, inset 0 0 4px -1px rgba(0, 0, 0, 0.15));
		background-color: var(--theme-bg2-color, #f4f5f7);
		padding: 0 20px;

		&:focus {
			outline: inherit;
		}
	}

	textarea {
		color: var(--theme-color, #00283a);
		width: 100%;
		box-sizing: border-box;
		display: block;
		width: 100%;
		border-radius: 10px;
		margin-bottom: 40px;
		border: 0;
		box-shadow: var(--box-shadow2, inset 0 0 4px -1px rgba(0, 0, 0, 0.15));
		background-color: var(--theme-bg2-color, #f4f5f7);
		padding: 15px 20px;

		&:focus {
			outline: inherit;
		}
	}
}

.symbol-icon {
	width: 1em;
	height: 1em;
	vertical-align: -0.15em;
	fill: currentColor;
	overflow: hidden;
}

.trm-glow {
	animation-duration: 2s;
	animation-iteration-count: infinite;
	animation-name: glowing;
	animation-direction: alternate;
}

.trm-divider {
	height: 1px;
	border-bottom: var(--border-dotted, dotted 2px rgba(225, 225, 235, 0.9));
	width: 100%;

	&.footer-divider {
		margin-bottom: var(--card-bottom-card);
	}

	+ .trm-divider {
		display: none;
	}
}

@keyframes glowing {
	0% {
		box-shadow: 0 0 0 transparent;
	}

	100% {
		box-shadow: 0 0 20px var(--primary-30, #afb42b);
	}
}

// 定义 margin padding 变量
@marginKey: 10, 15, 20, 25, 30, 35, 40;

each(@marginKey, {
	.trm-p-@{value} {
		padding: unit(@value, px) !important;
	}

	.trm-mb-@{value} {
		margin-bottom: unit(@value, px);
	}

	.trm-mt-@{value} {
		margin-top: unit(@value, px);
	}
});
