/* 基础样式重置 */
.container-popuplayer {
	max-width: 800px;
	margin: 0 auto;
}

/* 触发按钮样式 */
/* 弹出层样式 */
.open-popup {
	background: linear-gradient(135deg, #70b556 0%, #185852 100%);
	color: white;
	border: none;
	padding: 0.3vw;
	border-radius: 15%;
	cursor: pointer;
	font-size: 0.6vw;
	transition: all 0.3s ease;
}

.open-popup-div {
	align-items: center;
	display: flex;
	justify-content: center;
	line-height: 1vw;
	position: relative;
	text-align: center;
}


.open-popup:hover {
	background-color: #005500;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 弹出框遮罩层 */
.popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	/* align-items: center; */
	padding-top: 5vw;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 显示弹出框时的遮罩层状态 */
.popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* 弹出框容器 */
.popup {
	display: flex;
	flex-direction: column;
	/* 垂直方向排列子元素 */
	background-color: white;
	border-radius: 10px;
	width: 60vw;
	height: 30vw;
	overflow-y: auto;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
	transform: translateY(20px) scale(0.95);
	transition: transform 0.3s ease;
}

/* 要固定在底部的子元素 */
.bottom-child {
  margin-top: auto; /* 关键：自动占据上方剩余空间，实现下沉 */
  padding: 10px;
}

/* 显示弹出框时的容器状态 */
.popup-overlay.active .popup {
	transform: translateY(0) scale(1);
}

/* 弹出框头部 */
.popup-header {
	padding: 1.2rem 1.5rem;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 6%;
}

.popup-title {
	font-size: 1vw;
	font-weight: 700;
	/* color: #2c3e50; */
}

/* 关闭按钮 */
.popup-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: #7f8c8d;
	transition: color 0.2s ease;
	line-height: 1;
	padding: 0.2rem;
}

.popup-close:hover {
	color: #e74c3c;
}

/* 弹出框内容区域 */
.popup-body {
	padding: 1.5rem;
	/* height: 72%; */
}

.popup-body p {
	margin-bottom: 1rem;
}

/* 弹出框底部按钮区域 */
.popup-footer {
	padding: 1rem 1.5rem;
	border-top: 1px solid #eee;
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
}

.popup-btn {
	padding: 0.6rem 1.2rem;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.6vw;
	transition: all 0.2s ease;
	border: none;
}

.popup-btn.cancel {
	background-color: #f1f1f1;
	color: #333;
}

.popup-btn.cancel:hover {
	background-color: #e0e0e0;
}

.popup-btn.confirm {
	background-color: #3498db;
	color: white;
}

.popup-btn.confirm:hover {
	background-color: #2980b9;
}

/* 加载状态样式 */
.loading {
	display: none;
	text-align: center;
	padding: 2rem 0;
}

.loading.active {
	display: block;
}

.spinner {
	width: 40px;
	height: 40px;
	margin: 0 auto;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}