:root {
	--alwv3-red: #d50000;
	--alwv3-red-dark: #af0000;
	--alwv3-text: #171717;
	--alwv3-muted: #666;
	--alwv3-border: #e7e7e7;
	--alwv3-bg: #fff;
}

.alwv3-root,
.alwv3-root * {
	box-sizing: border-box;
}

.alwv3-root {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--alwv3-text);
}

.alwv3-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--alwv3-red), var(--alwv3-red-dark));
	color: #fff;
	box-shadow: 0 12px 30px rgba(213, 0, 0, 0.32);
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alwv3-toggle::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 999px;
	border: 2px solid rgba(213, 0, 0, 0.32);
	animation: alwv3-pulse 2.2s infinite;
}

.alwv3-toggle:hover,
.alwv3-toggle:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 16px 34px rgba(213, 0, 0, 0.38);
	outline: none;
}

.alwv3-toggle-icon {
	font-size: 21px;
	line-height: 1;
}

.alwv3-popup {
	position: absolute;
	right: 0;
	bottom: 70px;
	width: 300px;
	max-height: min(760px, calc(100vh - 110px));
	overflow: hidden auto;
	border-radius: 20px;
	background: var(--alwv3-bg);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
	opacity: 0;
	pointer-events: none;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.alwv3-popup.is-open {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.alwv3-header {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-radius: 20px 20px 0 0;
	background: linear-gradient(135deg, var(--alwv3-red), var(--alwv3-red-dark));
	color: #fff;
}

.alwv3-header h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
}

.alwv3-close {
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 30px;
	line-height: 26px;
	cursor: pointer;
}

.alwv3-body {
	padding: 14px 16px 16px;
}

.alwv3-subtitle {
	margin: 0 0 12px;
	color: #202020;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
	text-align: center;
}

.alwv3-form {
	display: grid;
	gap: 9px;
}

.alwv3-field {
	display: flex;
	align-items: center;
	gap: 9px;
	min-height: 38px;
	padding: 0 10px;
	border: 1px solid var(--alwv3-border);
	border-radius: 7px;
	background: #fff;
}

.alwv3-field:focus-within {
	border-color: rgba(213, 0, 0, 0.45);
	box-shadow: 0 0 0 3px rgba(213, 0, 0, 0.08);
}

.alwv3-field span {
	width: 18px;
	font-size: 14px;
	text-align: center;
	filter: grayscale(1);
}

.alwv3-field input,
.alwv3-field textarea {
	width: 100%;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--alwv3-text);
	font: inherit;
	font-size: 13px;
}

.alwv3-field textarea {
	padding: 9px 0;
	resize: vertical;
}

.alwv3-textarea {
	align-items: flex-start;
}

.alwv3-textarea span {
	padding-top: 9px;
}

.alwv3-check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 1px;
	color: #242424;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.35;
}

.alwv3-check input {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin: 0;
	accent-color: var(--alwv3-red);
}

.alwv3-check a {
	color: var(--alwv3-red);
	font-weight: 800;
	text-decoration: none;
}

.alwv3-check a:hover,
.alwv3-check a:focus {
	text-decoration: underline;
}

.alwv3-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 44px;
	margin-top: 5px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--alwv3-red), var(--alwv3-red-dark));
	color: #fff;
	box-shadow: 0 9px 22px rgba(213, 0, 0, 0.23);
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}

.alwv3-submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

.alwv3-secure {
	margin: 2px 0 0;
	color: var(--alwv3-muted);
	font-size: 10.5px;
	font-weight: 700;
	text-align: center;
}

.alwv3-message {
	display: none;
	padding: 9px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
}

.alwv3-message.is-success {
	display: block;
	background: #edf8f0;
	color: #146b2b;
}

.alwv3-message.is-error {
	display: block;
	background: #fff0f0;
	color: #a60000;
}

.alwv3-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

@keyframes alwv3-pulse {
	0% {
		opacity: 0.65;
		transform: scale(0.96);
	}
	70% {
		opacity: 0;
		transform: scale(1.18);
	}
	100% {
		opacity: 0;
		transform: scale(1.18);
	}
}

@media (max-width: 600px) {
	.alwv3-root {
		right: 14px;
		bottom: 14px;
	}

	.alwv3-toggle {
		width: 54px;
		height: 54px;
		min-height: 54px;
		padding: 0;
		justify-content: center;
	}

	.alwv3-toggle-text {
		display: none;
	}

	.alwv3-popup {
		right: 0;
		bottom: 68px;
		width: 90vw;
		max-width: 330px;
		max-height: calc(100vh - 95px);
	}
}
