@use "@/assets/css/lottery.scss" as *;

// 全局样式
:root {
	font-family: Roboto, Roboto, Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	font-weight: 400;
	color-scheme: light dark;
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	color: #98a7b5;
	--standalone-footer-padding: 25px; // 适配添加到主屏幕FooterBar的padding
	// 覆盖vant ui样式
	&:root {
		--van-calendar-background: var(--calendar-background);

		.van-calendar__header-title,
		.van-calendar__header-subtitle,
		.van-calendar__month-title {
			color: var(--calendar-title-text);
		}

		.van-toast {
			background: var(--toast-bg) !important;
			color: var(--toast-text) !important;
		}

		.van-popup {
			max-width: $fake-pc-width;
			position: absolute;
		}

		.van-popup--right,
		.van-popup--left {
			padding-top: var(--tg-content-safe-area-inset-top, 0px);
			background: transparent;
		}

		.van-number-keyboard {
			position: fixed !important;
			max-width: 500px;
			transform: translateX(-50%);
			left: 50%;
			transition: 0s;
			animation: none;
		}

		.custom-back-to-top {
			border-radius: 0.3125rem;
			background: var(--back-top-bg);
			width: 3.25rem;
			height: 3.25rem;
			display: flex;
			flex-direction: column;

			i {
				color: rgba(59, 193, 23, 1);
			}

			p {
				color: $primaryColor1;
				text-align: center;
				font-size: 0.875rem;
				font-weight: 600;
				line-height: 1.25rem;
			}
		}
	}
	.vue-puzzle-vcode {
		z-index: 2002;
	}
}

// 基础样式重置
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	user-select: none;
	font-family: Roboto, "font-family", Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
}

// 文本样式
p,
h1,
h2,
h3,
h4,
h5,
h6 {
	// color: $primaryColor1;
}

span {
	//color: $primaryColor3;
}

// 链接样式
a {
	font-weight: 500;
	color: #646cff;
	text-decoration: inherit;

	&:hover {
		color: #535bf2;
	}
}

// 输入框样式
input {
	border: 0;
	outline: none;
	height: 40px;
	width: 100%;
	border-radius: 4px;
	padding: 0 12px;
	color: #2f3244;
	font-size: 14px;
	font-weight: 500;
	background: var(--input-bg);

	&::placeholder {
		color: #acadb4;
		font-weight: 400;
	}
}
/* 隐藏数字输入框中的箭头按钮 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Firefox 隐藏数字输入框中的箭头 */
input[type="number"] {
	-moz-appearance: textfield;
}
// 按钮样式
button {
	background-size: 100% 100%;
	color: var(--button-text-color);
	border: none;
	border-radius: 15px 6px 15px 6px;
	padding: 10px 20px;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.3s ease;
	width: 100%;

	&:active {
		opacity: 0.8;
	}
}

// 禁用按钮样式
.button-disabled {
	filter: var(--button-disabled-filter);
	opacity: 0.4;
	pointer-events: none;

	&:active {
		filter: var(--button-disabled-filter);
		opacity: 0.4;
	}
}

// 滚动条样式
::-webkit-scrollbar {
	display: none;
}

// HTML和Body样式
html,
body {
	overflow: hidden;
	height: calc(100% - var(--tg-safe-area-inset-top));
	overscroll-behavior: none;
}

// 弹出层样式
.precondition-header-popover {
	--van-popover-arrow-size: 8px;
	--van-popover-action-width: 200px;
	--van-popover-action-height: 90px;
	--van-popover-action-font-size: 12px;
}

// 其他全局样式
body,
.only-body {
	background: $appFooterBg;
	background-size: 100% 100%;
	min-width: 320px;
	max-width: $fake-pc-width;
	margin: auto;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 200;
	margin-bottom: 0 !important;
}

html {
	touch-action: manipulation;
	background: $appFooterBg;
}

.back-icon {
	fill: $primaryColor1;
	width: 9.6px;
	height: 16px;
}

.service-icon {
	fill: $primaryColor1;
	width: 18px;
	height: 18px;
}

.icon-theme {
	fill: $primaryColor1;
}

#app {
	height: 100%;
}

// 文本省略样式
.ellipsis {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ellipsis-col {
	display: -webkit-box;
	overflow: hidden;
	text-align: justify;
	text-overflow: ellipsis;
	word-break: break-all;
	-webkit-box-orient: vertical;
}

.ellipsis-col2 {
	-webkit-line-clamp: 2;
}

// 底部导航栏样式
.van-tabbar {
	// z-index: 100 !important;
	position: absolute !important;
	width: 100%;
}

// 字体定义
@font-face {
	font-family: "DS-Digital";
	src: url("../font/DS-DIGIB-2.ttf");
}

@font-face {
	font-family: "DIN-BoldItalic";
	src: url("../font/DIN-BoldItalic.otf");
}

@font-face {
	font-family: "Akrobat";
	src: url("../font/Akrobat-Bold.otf");
}

@font-face {
	font-family: "Akrobat Semi";
	src: url("../font/Akrobat-SemiBold.otf");
}

@font-face {
	font-family: "YouSheBiaoTiHei";
	src: url("../font/YouSheBiaoTiHei-2.ttf");
}

// 背景尺寸
.bg-size {
	background-size: 100% 100% !important;
}

// Toast 样式
.van-popup--center.van-toast {
	top: 20%;
}

.van-popup {
	button {
		color: var(--button-text-color);
	}
}

.van-popup {
	&.horizal {
		display: flex;
		flex-direction: row;
		min-height: 10px;
		height: auto;
		padding: 8px 18px;
		align-items: center;
		gap: 5px;

		.van-icon {
			font-size: 16px;
		}

		.van-toast__text {
			margin-top: 0px;
			white-space: nowrap;
		}
	}
}
.flex-center {
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.flex-vertical {
	display: flex;
	flex-direction: column;
}
