.wac-widget {
	position: fixed;
	z-index: 999999;
	right: 25px;
	bottom: 25px;
	font-family: var(--wac-font);
	font-size: 16px;
	line-height: 1.4;
	text-align: left;
}

.wac-widget,
.wac-widget *,
.wac-widget *::before,
.wac-widget *::after {
	box-sizing: border-box;
}

.wac-popup {
	position: relative;
	width: 290px;
	margin: 0 0 20px;
	padding: 24px;
	border: 0;
	border-radius: 20px;
	background: #e4e4e4;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	transform-origin: bottom right;
}

.wac-popup.is-opening {
	animation: wac-fade-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wac-popup[hidden] {
	display: none !important;
}

.wac-close {
	position: absolute;
	top: 10px;
	right: 14px;
	min-width: 30px;
	min-height: 30px;
	margin: 0;
	padding: 4px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: #737373;
	cursor: pointer;
	font: inherit;
	font-size: 21px;
	font-weight: 700;
	line-height: 1;
	transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.wac-close:hover,
.wac-close:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	color: #252525;
	outline: none;
	transform: scale(1.05);
}

.wac-header {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 20px;
}

.wac-avatar {
	display: grid;
	width: 65px;
	height: 65px;
	min-width: 65px;
	margin: 0;
	place-items: center;
	overflow: hidden;
	border: 4px solid #fff;
	border-radius: 50%;
	background: #cbd0d2;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
	color: #687174;
	object-fit: cover;
}

.wac-avatar--default svg {
	width: 38px;
	height: 38px;
}

.wac-greeting {
	min-width: 0;
	color: #2b2b2b;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.wac-button {
	display: block;
	width: 100%;
	margin: 0 0 12px;
	padding: 14px 10px;
	border: 0;
	border-radius: 16px;
	box-shadow: none;
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-decoration: none !important;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.wac-button:last-child {
	margin-bottom: 0;
}

.wac-button:hover,
.wac-button:focus-visible {
	color: #fff !important;
	filter: brightness(0.94);
	outline: 2px solid #fff;
	outline-offset: -4px;
	transform: translateY(-2px);
}

.wac-button[aria-disabled="true"] {
	cursor: not-allowed;
	filter: grayscale(0.4);
	opacity: 0.65;
}

.wac-button--primary {
	background: var(--wac-primary);
}

.wac-button--secondary {
	background: var(--wac-secondary);
}

.wac-toggle {
	display: flex;
	width: 65px;
	height: 65px;
	min-width: 65px;
	min-height: 65px;
	margin: 0 0 0 auto;
	padding: 0;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border: 4px solid #fff;
	border-radius: 50%;
	background: var(--wac-secondary);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
	color: #fff;
	cursor: pointer;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wac-toggle:hover,
.wac-toggle:focus-visible {
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
	outline: 3px solid rgba(37, 167, 90, 0.28);
	outline-offset: 3px;
	transform: scale(1.05);
}

.wac-toggle img,
.wac-toggle svg {
	display: block;
	width: 35px;
	height: 35px;
	margin: 0;
	object-fit: contain;
}

.wac-screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@keyframes wac-fade-in {
	from {
		opacity: 0;
		transform: scale(0.8) translateY(20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@media (max-width: 480px) {
	.wac-widget {
		right: 20px;
		bottom: 20px;
	}

	.wac-popup {
		width: calc(100vw - 40px);
		max-width: 232px;
		padding: 19px;
		border-radius: 16px;
	}

	.wac-close {
		top: 7px;
		right: 8px;
		min-width: 28px;
		min-height: 28px;
		font-size: 18px;
	}

	.wac-header {
		gap: 12px;
		margin-bottom: 16px;
	}

	.wac-avatar {
		width: 52px;
		height: 52px;
		min-width: 52px;
		border-width: 3px;
	}

	.wac-avatar--default svg {
		width: 30px;
		height: 30px;
	}

	.wac-greeting {
		font-size: 14px;
	}

	.wac-button {
		margin-bottom: 10px;
		padding: 11px 10px;
		border-radius: 13px;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wac-popup.is-opening {
		animation: none;
	}

	.wac-widget *,
	.wac-widget *::before,
	.wac-widget *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
