.nag-widget {
	--nag-ink: #102026;
	--nag-muted: #617179;
	--nag-teal: #0f766e;
	--nag-teal-2: #14b8a6;
	--nag-lime: #c7f36a;
	--nag-line: rgba(16, 32, 38, 0.1);
	align-items: center;
	box-sizing: border-box;
	display: flex;
	font-family: inherit;
	gap: 14px;
	max-width: min(560px, calc(100vw - 28px));
	opacity: 0;
	pointer-events: none;
	position: fixed;
	transition: opacity 220ms ease, transform 320ms cubic-bezier(0.2, 0.85, 0.25, 1);
}

.nag-widget,
.nag-widget * {
	box-sizing: border-box;
}

.nag-widget.nag-visible {
	opacity: 1;
	pointer-events: auto;
}

.nag-position-top-left {
	left: 18px;
	top: 20px;
	transform: translate(-44px, 0) scale(0.98);
}

.nag-position-top-center {
	left: 50%;
	top: 20px;
	transform: translate(-50%, -44px) scale(0.98);
}

.nag-position-top-right {
	right: 18px;
	top: 20px;
	transform: translate(44px, 0) scale(0.98);
}

.nag-position-middle-left {
	left: 18px;
	top: 50%;
	transform: translate(-44px, -50%) scale(0.98);
}

.nag-position-middle-center {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -44%) scale(0.98);
}

.nag-position-middle-right {
	right: 18px;
	top: 50%;
	transform: translate(44px, -50%) scale(0.98);
}

.nag-position-bottom-left {
	bottom: 22px;
	left: 18px;
	transform: translate(-44px, 0) scale(0.98);
}

.nag-position-bottom-center {
	bottom: 22px;
	left: 50%;
	transform: translate(-50%, 44px) scale(0.98);
}

.nag-position-bottom-right {
	bottom: 22px;
	right: 18px;
	transform: translate(44px, 0) scale(0.98);
}

.nag-position-top-left.nag-visible,
.nag-position-top-right.nag-visible,
.nag-position-bottom-left.nag-visible,
.nag-position-bottom-right.nag-visible {
	transform: translate(0, 0) scale(1);
}

.nag-position-top-center.nag-visible {
	transform: translate(-50%, 0) scale(1);
}

.nag-position-middle-left.nag-visible,
.nag-position-middle-right.nag-visible {
	transform: translate(0, -50%) scale(1);
}

.nag-position-middle-center.nag-visible {
	transform: translate(-50%, -50%) scale(1);
}

.nag-position-bottom-center.nag-visible {
	transform: translate(-50%, 0) scale(1);
}

.nag-side-left {
	flex-direction: row;
}

.nag-side-right {
	flex-direction: row-reverse;
}

.nag-side-top,
.nag-side-bottom,
.nag-side-center {
	flex-direction: column;
}

.nag-avatar {
	align-items: center;
	background:
		radial-gradient(circle at 52% 36%, rgba(199, 243, 106, 0.42), transparent 36%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(238, 247, 246, 0.38));
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 999px;
	box-shadow:
		0 22px 44px rgba(16, 32, 38, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.84);
	display: flex;
	flex: 0 0 auto;
	height: var(--nag-avatar-height, 126px);
	justify-content: center;
	position: relative;
	width: var(--nag-avatar-width, 126px);
}

.nag-avatar::after {
	background: linear-gradient(135deg, var(--nag-teal), var(--nag-teal-2));
	border: 4px solid #fff;
	border-radius: 999px;
	bottom: 10px;
	box-shadow: 0 6px 14px rgba(15, 118, 110, 0.28);
	content: "";
	height: 18px;
	position: absolute;
	right: 12px;
	width: 18px;
}

.nag-avatar img {
	display: block;
	filter: drop-shadow(0 14px 18px rgba(16, 32, 38, 0.16));
	height: auto;
	max-height: calc(var(--nag-avatar-height, 126px) - 14px);
	max-width: calc(var(--nag-avatar-width, 126px) - 14px);
	object-fit: contain;
	width: auto;
}

.nag-bubble {
	backdrop-filter: blur(16px);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 253, 0.92)),
		radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.12), transparent 34%);
	border: 1px solid rgba(255, 255, 255, 0.78);
	border-radius: 18px;
	box-shadow:
		0 24px 58px rgba(16, 32, 38, 0.24),
		0 0 0 1px rgba(16, 32, 38, 0.06);
	color: var(--nag-ink);
	min-width: 280px;
	padding: 16px 17px 14px;
	position: relative;
	width: min(var(--nag-bubble-width, 390px), calc(100vw - 160px));
}

.nag-bubble::before {
	background: inherit;
	border-left: 1px solid rgba(255, 255, 255, 0.78);
	border-top: 1px solid rgba(255, 255, 255, 0.78);
	content: "";
	height: 16px;
	position: absolute;
	top: 40px;
	transform: rotate(45deg);
	width: 16px;
}

.nag-side-left .nag-bubble::before {
	left: -8px;
}

.nag-side-right .nag-bubble::before {
	right: -8px;
}

.nag-side-top .nag-bubble::before,
.nag-side-bottom .nag-bubble::before,
.nag-side-center .nag-bubble::before {
	display: none;
}

.nag-bubble-header {
	align-items: center;
	border-bottom: 1px solid rgba(16, 32, 38, 0.07);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin: 0 30px 13px 0;
	padding-bottom: 11px;
}

.nag-assistant-label {
	align-items: center;
	color: var(--nag-teal);
	display: inline-flex;
	font-size: 12px;
	font-weight: 800;
	gap: 7px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nag-live-dot {
	background: var(--nag-lime);
	border-radius: 999px;
	box-shadow: 0 0 0 5px rgba(199, 243, 106, 0.2);
	display: inline-block;
	height: 8px;
	width: 8px;
}

.nag-progress {
	background: rgba(16, 32, 38, 0.06);
	border-radius: 999px;
	color: var(--nag-muted);
	font-size: 12px;
	font-weight: 800;
	padding: 4px 8px;
}

.nag-message {
	color: var(--nag-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.48;
	margin: 0 28px 16px 0;
	white-space: pre-wrap;
}

.nag-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.nag-button {
	background: #102026;
	border: 0;
	border-radius: 999px;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1;
	min-height: 40px;
	padding: 0 16px;
	transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nag-button:hover,
.nag-button:focus {
	background: #1e333a;
	box-shadow: 0 8px 18px rgba(16, 32, 38, 0.18);
	transform: translateY(-1px);
}

.nag-button-accent {
	background: linear-gradient(135deg, var(--nag-teal), var(--nag-teal-2));
	box-shadow: 0 9px 18px rgba(15, 118, 110, 0.2);
}

.nag-button-accent:hover,
.nag-button-accent:focus {
	background: linear-gradient(135deg, #0d635d, #119f91);
}

.nag-button[hidden] {
	display: none;
}

.nag-close {
	align-items: center;
	background: rgba(16, 32, 38, 0.06);
	border: 0;
	border-radius: 999px;
	color: #52636b;
	cursor: pointer;
	display: flex;
	font-family: Arial, sans-serif;
	font-size: 18px;
	font-weight: 700;
	height: 30px;
	justify-content: center;
	line-height: 1;
	position: absolute;
	right: 12px;
	top: 12px;
	transition: background 160ms ease, color 160ms ease, transform 160ms ease;
	width: 30px;
}

.nag-close:hover,
.nag-close:focus {
	background: rgba(16, 32, 38, 0.12);
	color: var(--nag-ink);
	transform: rotate(90deg);
}

.nag-widget .nag-button {
	align-items: center !important;
	appearance: none !important;
	background: #102026 !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	color: #fff !important;
	display: inline-flex !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 800 !important;
	justify-content: center !important;
	letter-spacing: 0 !important;
	line-height: 1 !important;
	margin: 0 !important;
	min-height: 40px !important;
	padding: 0 16px !important;
	text-decoration: none !important;
	text-transform: none !important;
	white-space: nowrap !important;
	width: auto !important;
}

.nag-widget .nag-button:hover,
.nag-widget .nag-button:focus {
	background: #1e333a !important;
	box-shadow: 0 8px 18px rgba(16, 32, 38, 0.18) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.nag-widget .nag-button-accent {
	background: linear-gradient(135deg, var(--nag-teal), var(--nag-teal-2)) !important;
	box-shadow: 0 9px 18px rgba(15, 118, 110, 0.2) !important;
}

.nag-widget .nag-button-accent:hover,
.nag-widget .nag-button-accent:focus {
	background: linear-gradient(135deg, #0d635d, #119f91) !important;
}

.nag-widget .nag-button[hidden] {
	display: none !important;
}

.nag-widget .nag-close {
	align-items: center !important;
	appearance: none !important;
	background: rgba(16, 32, 38, 0.06) !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	color: transparent !important;
	display: flex !important;
	height: 30px !important;
	justify-content: center !important;
	margin: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	position: absolute !important;
	right: 12px !important;
	top: 12px !important;
	width: 30px !important;
}

.nag-widget .nag-close::before,
.nag-widget .nag-close::after {
	background: #52636b;
	border-radius: 999px;
	content: "";
	height: 2px;
	position: absolute;
	width: 12px;
}

.nag-widget .nag-close::before {
	transform: rotate(45deg);
}

.nag-widget .nag-close::after {
	transform: rotate(-45deg);
}

.nag-widget .nag-close:hover,
.nag-widget .nag-close:focus {
	background: rgba(16, 32, 38, 0.12) !important;
}

.nag-widget .nag-close:hover::before,
.nag-widget .nag-close:hover::after,
.nag-widget .nag-close:focus::before,
.nag-widget .nag-close:focus::after {
	background: var(--nag-ink);
}

.nag-brand {
	color: #8b9aa1;
	display: block;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	margin-top: 12px;
	text-transform: uppercase;
}

.nag-mode-peek {
	gap: 8px;
}

.nag-mode-peek .nag-avatar {
	box-shadow:
		0 18px 36px rgba(16, 32, 38, 0.24),
		inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.nag-mode-peek .nag-bubble {
	width: min(var(--nag-bubble-width, 360px), calc(100vw - 146px));
}

.nag-mode-peek.nag-side-left {
	left: 0;
}

.nag-mode-peek.nag-side-left .nag-avatar {
	border-radius: 0 999px 999px 0;
	margin-left: var(--nag-peek-x, -58px);
}

.nag-mode-peek.nag-side-right {
	right: 0;
}

.nag-mode-peek.nag-side-right .nag-avatar {
	border-radius: 999px 0 0 999px;
	margin-right: var(--nag-peek-x, -58px);
}

.nag-mode-peek.nag-side-top {
	top: 0;
}

.nag-mode-peek.nag-side-top .nag-avatar {
	border-radius: 0 0 999px 999px;
	margin-top: var(--nag-peek-y, -58px);
}

.nag-mode-peek.nag-side-bottom {
	bottom: 0;
	flex-direction: column-reverse;
}

.nag-mode-peek.nag-side-bottom .nag-avatar {
	border-radius: 999px 999px 0 0;
	margin-bottom: var(--nag-peek-y, -58px);
}

.nag-frame-off .nag-avatar {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
	overflow: visible;
}

.nag-frame-off .nag-avatar::after {
	display: none;
}

.nag-frame-off .nag-avatar img {
	filter: drop-shadow(0 16px 22px rgba(16, 32, 38, 0.22));
	max-height: var(--nag-avatar-height, 126px);
	max-width: var(--nag-avatar-width, 126px);
}

.nag-mode-peek.nag-side-center .nag-avatar {
	transform: scale(0.96);
}

.nag-target-highlight {
	border-radius: 8px;
	box-shadow:
		0 0 0 4px rgba(199, 243, 106, 0.72),
		0 12px 26px rgba(16, 32, 38, 0.18) !important;
	outline: 2px solid rgba(15, 118, 110, 0.82) !important;
	outline-offset: 4px !important;
	position: relative;
	z-index: 2;
}

@media (max-width: 767px) {
	.nag-widget {
		gap: 9px;
		max-width: calc(100vw - 18px);
	}

	.nag-avatar {
		height: var(--nag-avatar-height, 86px);
		width: var(--nag-avatar-width, 86px);
	}

	.nag-avatar::after {
		border-width: 3px;
		bottom: 6px;
		height: 14px;
		right: 7px;
		width: 14px;
	}

	.nag-avatar img {
		height: auto;
		max-height: calc(var(--nag-avatar-height, 86px) - 8px);
		max-width: calc(var(--nag-avatar-width, 86px) - 8px);
		width: auto;
	}

	.nag-bubble {
		border-radius: 16px;
		min-width: 0;
		padding: 14px;
		width: min(315px, calc(100vw - 106px));
	}

	.nag-side-top .nag-bubble,
	.nag-side-bottom .nag-bubble,
	.nag-side-center .nag-bubble {
		width: calc(100vw - 24px);
	}

	.nag-bubble-header {
		margin-bottom: 11px;
		padding-bottom: 10px;
	}

	.nag-assistant-label {
		font-size: 11px;
	}

	.nag-message {
		font-size: 14px;
		line-height: 1.45;
		margin-right: 24px;
	}

	.nag-button {
		min-height: 38px;
		padding: 0 14px;
	}

	.nag-mode-peek .nag-bubble {
		width: min(var(--nag-bubble-width, 300px), calc(100vw - 92px));
	}

	.nag-mode-peek.nag-side-left .nag-avatar {
		margin-left: var(--nag-peek-x, -42px);
	}

	.nag-mode-peek.nag-side-right .nag-avatar {
		margin-right: var(--nag-peek-x, -42px);
	}

	.nag-mode-peek.nag-side-top .nag-avatar {
		margin-top: var(--nag-peek-y, -42px);
	}

	.nag-mode-peek.nag-side-bottom .nag-avatar {
		margin-bottom: var(--nag-peek-y, -42px);
	}

	.nag-position-top-left,
	.nag-position-middle-left,
	.nag-position-bottom-left {
		left: 9px;
	}

	.nag-position-top-right,
	.nag-position-middle-right,
	.nag-position-bottom-right {
		right: 9px;
	}

	.nag-position-top-center,
	.nag-position-bottom-center,
	.nag-position-middle-center {
		left: 50%;
	}
}
