:root {
	--zpa-primary: var(--main-color, #5a7bfd);
	--zpa-text: #1f2430;
	--zpa-sub: #8a90a2;
	--zpa-border: #ebedf2;
	--zpa-bg: #f5f6fa;
}

.zpa-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.zpa-modal.is-open {
	display: flex;
}

.zpa-mask {
	position: absolute;
	inset: 0;
	background: rgba(12, 16, 28, 0.55);
	backdrop-filter: blur(2px);
	animation: zpa-fade 0.2s ease;
}

.zpa-dialog {
	position: relative;
	width: 400px;
	max-width: 100%;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 30px 26px 22px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
	animation: zpa-pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
	box-sizing: border-box;
}

.zpa-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--zpa-sub);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
}

.zpa-close:hover {
	background: var(--zpa-bg);
	color: var(--zpa-text);
}

.zpa-title {
	margin: 0 0 18px;
	font-size: 19px;
	font-weight: 600;
	text-align: center;
	color: var(--zpa-text);
}

.zpa-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 18px;
	padding: 4px;
	background: var(--zpa-bg);
	border-radius: 10px;
}

.zpa-tab {
	flex: 1;
	padding: 9px 6px;
	border: 0;
	background: transparent;
	border-radius: 8px;
	color: var(--zpa-sub);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.18s ease;
}

.zpa-tab.active {
	background: #fff;
	color: var(--zpa-primary);
	font-weight: 600;
	box-shadow: 0 2px 6px rgba(30, 41, 59, 0.08);
}

.zpa-pane[hidden] {
	display: none;
}

.zpa-field {
	display: flex;
	align-items: center;
	height: 46px;
	margin-bottom: 14px;
	padding: 0 14px;
	background: var(--zpa-bg);
	border: 1px solid transparent;
	border-radius: 10px;
	transition: border-color 0.18s ease, background 0.18s ease;
}

.zpa-field:focus-within {
	background: #fff;
	border-color: var(--zpa-primary);
}

.zpa-prefix {
	margin-right: 10px;
	padding-right: 10px;
	border-right: 1px solid #e3e6ee;
	color: var(--zpa-text);
	font-size: 14px;
}

.zpa-field input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--zpa-text);
	font-size: 15px;
	letter-spacing: 0.5px;
}

.zpa-field input::placeholder {
	color: #aeb4c5;
	letter-spacing: 0;
}

.zpa-send {
	flex: none;
	margin-left: 8px;
	padding: 0 4px;
	border: 0;
	background: transparent;
	color: var(--zpa-primary);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
}

.zpa-send:disabled {
	color: #b9bfd0;
	cursor: not-allowed;
}

.zpa-captcha-slot {
	margin-bottom: 14px;
}

.zpa-captcha-slot[hidden] {
	display: none;
}

.zpa-submit,
.zpa-oneclick {
	width: 100%;
	height: 46px;
	margin-top: 6px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--zpa-primary), #7f9bff);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.zpa-submit:hover,
.zpa-oneclick:hover {
	opacity: 0.92;
}

.zpa-submit:active,
.zpa-oneclick:active {
	transform: translateY(1px);
}

.zpa-submit:disabled,
.zpa-oneclick:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.zpa-oneclick-hint {
	margin: 14px 0 0;
	color: var(--zpa-sub);
	font-size: 12px;
	text-align: center;
	line-height: 1.6;
}

.zpa-msg {
	min-height: 18px;
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.6;
	text-align: center;
	color: #e5484d;
}

.zpa-msg.is-success {
	color: #1a9d5c;
}

.zpa-tip {
	margin: 14px 0 0;
	padding-top: 14px;
	border-top: 1px dashed var(--zpa-border);
	color: var(--zpa-sub);
	font-size: 12px;
	text-align: center;
	line-height: 1.6;
}

.zpa-float {
	position: fixed;
	right: 20px;
	bottom: 92px;
	z-index: 99998;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--zpa-primary), #7f9bff);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 10px 24px rgba(90, 123, 253, 0.35);
	cursor: pointer;
}

.zpa-float-icon {
	font-size: 16px;
}

.zpa-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 20px;
	border: 0;
	border-radius: 8px;
	background: var(--zpa-primary);
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}

@keyframes zpa-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes zpa-pop {
	from { opacity: 0; transform: translateY(14px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
	.zpa-modal {
		padding: 0;
		align-items: flex-end;
	}

	.zpa-dialog {
		width: 100%;
		max-height: 88vh;
		padding: 26px 20px 20px;
		border-radius: 18px 18px 0 0;
	}

	.zpa-float {
		right: 12px;
		bottom: 76px;
		height: 40px;
		padding: 0 14px;
		font-size: 13px;
	}
}

body.zpa-lock {
	overflow: hidden;
}

[data-theme="dark"] .zpa-dialog,
.dark-theme .zpa-dialog,
body.dark .zpa-dialog {
	background: #1e2230;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .zpa-title,
.dark-theme .zpa-title,
body.dark .zpa-title,
[data-theme="dark"] .zpa-field input,
.dark-theme .zpa-field input,
body.dark .zpa-field input,
[data-theme="dark"] .zpa-prefix,
.dark-theme .zpa-prefix,
body.dark .zpa-prefix {
	color: #eef1f8;
}

[data-theme="dark"] .zpa-field,
.dark-theme .zpa-field,
body.dark .zpa-field {
	background: #262b3b;
}

[data-theme="dark"] .zpa-field:focus-within,
.dark-theme .zpa-field:focus-within,
body.dark .zpa-field:focus-within {
	background: #1e2230;
}

[data-theme="dark"] .zpa-tabs,
.dark-theme .zpa-tabs,
body.dark .zpa-tabs {
	background: #262b3b;
}

[data-theme="dark"] .zpa-tab.active,
.dark-theme .zpa-tab.active,
body.dark .zpa-tab.active {
	background: #323849;
	box-shadow: none;
}
