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

.wjai-widget {
	position: fixed;
	inset: 0;
	z-index: 2147482000;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #15202b;
	pointer-events: none;
}

.wjai-widget.is-open {
	pointer-events: auto;
}

body.wjai-chat-open {
	overflow: hidden;
}

.wjai-launcher {
	position: relative;
	z-index: 1202;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	isolation: isolate;
	overflow: visible;
	border: 0;
	border-radius: 999px;
	background:
		radial-gradient(circle at 50% 50%, rgba(7, 13, 18, 0.86) 0%, rgba(8, 17, 22, 0.74) 48%, rgba(7, 13, 18, 0.2) 62%, transparent 72%);
	color: #fff;
	box-shadow: none;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	cursor: pointer;
	font: inherit;
	transition: color 0.16s ease, transform 0.16s ease;
	transform: translateZ(0);
}

.wjai-launcher::before,
.wjai-launcher::after {
	position: absolute;
	border-radius: 999px;
	content: "";
	pointer-events: none;
}

.wjai-launcher::before {
	inset: -4px;
	z-index: -1;
	background:
		conic-gradient(from 18deg, #fff7eb 0deg, #ffb56f 35deg, #ff68dc 78deg, #8a4fff 132deg, #2d86ff 178deg, #f7fbff 214deg, #ffe7a8 270deg, #ff76d6 318deg, #fff7eb 360deg);
	filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.72)) drop-shadow(0 0 18px rgba(150, 82, 255, 0.58));
	-webkit-mask: radial-gradient(circle, transparent 59%, #000 61%, #000 68%, transparent 71%);
	mask: radial-gradient(circle, transparent 59%, #000 61%, #000 68%, transparent 71%);
	animation: wjai-launcher-ring 5.8s linear infinite;
}

.wjai-launcher::after {
	inset: -11px;
	z-index: -2;
	background:
		conic-gradient(from 156deg, transparent 0deg, transparent 70deg, rgba(85, 142, 255, 0.44) 108deg, rgba(198, 72, 255, 0.72) 154deg, rgba(255, 120, 218, 0.36) 205deg, transparent 256deg, transparent 360deg);
	filter: blur(2px);
	opacity: 0.78;
	-webkit-mask: radial-gradient(circle, transparent 48%, #000 52%, #000 70%, transparent 74%);
	mask: radial-gradient(circle, transparent 48%, #000 52%, #000 70%, transparent 74%);
	animation: wjai-launcher-wave 4.4s ease-in-out infinite;
}

.wjai-launcher:hover,
.wjai-launcher:focus-visible,
.wjai-launcher[aria-expanded="true"] {
	color: #fff;
	transform: translateY(-1px) scale(1.03);
}

.wjai-launcher:hover::before,
.wjai-launcher:focus-visible::before,
.wjai-launcher[aria-expanded="true"]::before {
	filter: drop-shadow(0 0 11px rgba(255, 255, 255, 0.86)) drop-shadow(0 0 26px rgba(177, 88, 255, 0.72));
}

.wjai-launcher:hover::after,
.wjai-launcher:focus-visible::after,
.wjai-launcher[aria-expanded="true"]::after {
	opacity: 0.92;
}

.wjai-launcher:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.72);
	outline-offset: 7px;
}

.wjai-launcher svg {
	position: relative;
	z-index: 1;
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.72));
}

.wjai-launcher.is-fixed-fallback {
	position: fixed;
	right: 20px;
	bottom: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

@keyframes wjai-launcher-ring {
	0% {
		transform: rotate(0deg) scale(1);
	}
	50% {
		transform: rotate(180deg) scale(1.045);
	}
	100% {
		transform: rotate(360deg) scale(1);
	}
}

@keyframes wjai-launcher-wave {
	0% {
		opacity: 0.54;
		transform: rotate(0deg) scaleX(1.06) scaleY(0.96);
	}
	42% {
		opacity: 0.92;
		transform: rotate(168deg) scaleX(1.18) scaleY(0.92);
	}
	100% {
		opacity: 0.54;
		transform: rotate(360deg) scaleX(1.06) scaleY(0.96);
	}
}

.wjai-panel {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background:
		radial-gradient(780px 520px at 12% 8%, rgba(196, 244, 111, 0.24), transparent 68%),
		radial-gradient(700px 520px at 92% 88%, rgba(255, 255, 255, 0.18), transparent 70%),
		linear-gradient(145deg, rgba(6, 23, 15, 0.98) 0%, rgba(24, 64, 45, 0.96) 54%, rgba(54, 91, 67, 0.94) 100%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: scale(1.01);
	transition: opacity 220ms ease, visibility 0s linear 220ms, transform 260ms ease;
}

.admin-bar .wjai-panel {
	top: 32px;
}

.wjai-shell {
	display: flex;
	flex-direction: column;
	width: min(920px, calc(100vw - 40px));
	height: min(760px, calc(100dvh - 56px));
	max-height: calc(100% - 24px);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 22px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 246, 0.88)),
		radial-gradient(420px 260px at 24% 0%, rgba(196, 244, 111, 0.2), transparent 72%);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.wjai-widget.is-open .wjai-panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: scale(1);
	transition-delay: 0s;
}

.wjai-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px;
	border-bottom: 1px solid rgba(23, 37, 29, 0.1);
	background: transparent;
	color: #17251d;
}

.wjai-title {
	display: grid;
	gap: 4px;
}

.wjai-title span {
	color: rgba(23, 37, 29, 0.58);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1;
	text-transform: uppercase;
}

.wjai-header strong {
	display: block;
	font-size: clamp(22px, 3vw, 36px);
	font-weight: 900;
	letter-spacing: 0;
	line-height: 1.04;
}

.wjai-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(23, 37, 29, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.72);
	color: #17251d;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
	cursor: pointer;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	transition: background-color 0.16s ease, transform 0.16s ease;
}

.wjai-close:hover,
.wjai-close:focus-visible {
	background: #fff;
	transform: translateY(-1px);
}

.wjai-messages {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 24px;
	background: transparent;
}

.wjai-intro {
	max-width: 760px;
	margin: 0 0 22px;
	padding: 4px 0 8px;
	color: #17251d;
}

.wjai-widget.has-conversation .wjai-intro {
	display: none;
}

.wjai-intro-label {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	margin: 0 0 10px;
	padding: 7px 10px;
	border: 1px solid rgba(31, 77, 54, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.56);
	color: rgba(31, 77, 54, 0.78);
	font-size: 12px;
	font-weight: 850;
	letter-spacing: 0;
	line-height: 1;
	text-transform: uppercase;
}

.wjai-intro-title {
	max-width: 680px;
	margin: 0;
	color: #17251d;
	font-size: clamp(30px, 4.2vw, 56px);
	font-weight: 950;
	letter-spacing: 0;
	line-height: 0.98;
}

.wjai-intro-text {
	max-width: 660px;
	margin: 14px 0 0;
	color: rgba(23, 37, 29, 0.72);
	font-size: clamp(16px, 1.55vw, 20px);
	font-weight: 650;
	line-height: 1.42;
}

.wjai-prompt-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.wjai-prompt {
	border: 1px solid rgba(31, 77, 54, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.7);
	color: #1f4d36;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	padding: 10px 13px;
	text-align: left;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.wjai-prompt:hover,
.wjai-prompt:focus-visible {
	border-color: rgba(31, 77, 54, 0.28);
	background: #fff;
	color: #173829;
	transform: translateY(-1px);
}

.wjai-chat-message {
	max-width: min(76%, 680px);
	margin: 0 0 14px;
	padding: 14px 16px;
	border-radius: 16px;
	font-size: 16px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}

.wjai-chat-message.is-assistant {
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(23, 37, 29, 0.08);
	box-shadow: 0 12px 30px rgba(23, 37, 29, 0.06);
	margin-right: auto;
}

.wjai-chat-message.is-thinking {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: rgba(23, 37, 29, 0.72);
	font-weight: 750;
}

.wjai-thinking-dots {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.wjai-thinking-dots i {
	display: block;
	width: 5px;
	height: 5px;
	border-radius: 999px;
	background: currentColor;
	opacity: 0.36;
	animation: wjai-thinking-dot 1.1s ease-in-out infinite;
}

.wjai-thinking-dots i:nth-child(2) {
	animation-delay: 0.16s;
}

.wjai-thinking-dots i:nth-child(3) {
	animation-delay: 0.32s;
}

.wjai-chat-message.is-visitor {
	background: linear-gradient(180deg, #2f7254, #1f4d36);
	color: #fff;
	margin-left: auto;
}

.wjai-consent {
	display: none;
	margin: 0 24px 14px;
	padding: 12px 14px;
	border: 1px solid rgba(23, 37, 29, 0.08);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.64);
	font-size: 12px;
	line-height: 1.35;
}

.wjai-consent.is-visible {
	display: block;
}

.wjai-consent-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.wjai-consent button {
	border: 1px solid rgba(23, 37, 29, 0.18);
	background: #fff;
	border-radius: 999px;
	padding: 7px 10px;
	cursor: pointer;
	font: inherit;
}

.wjai-consent button:first-child {
	background: #1f4d36;
	border-color: #1f4d36;
	color: #fff;
}

.wjai-input-row {
	display: flex;
	gap: 12px;
	padding: 18px 24px 24px;
	border-top: 1px solid rgba(23, 37, 29, 0.1);
	background: rgba(255, 255, 255, 0.34);
}

.wjai-input-row textarea {
	flex: 1;
	min-height: 54px;
	max-height: 130px;
	resize: none;
	border: 1px solid rgba(23, 37, 29, 0.15);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.86);
	padding: 15px 16px;
	color: #17251d;
	font: inherit;
	font-size: 16px;
	line-height: 1.35;
	outline: none;
}

.wjai-input-row textarea:focus {
	border-color: rgba(31, 77, 54, 0.55);
	box-shadow: 0 0 0 3px rgba(31, 77, 54, 0.12);
}

.wjai-send {
	border: 0;
	border-radius: 18px;
	background: linear-gradient(180deg, #2f7254, #1f4d36);
	color: #fff;
	padding: 0 22px;
	cursor: pointer;
	font: inherit;
	font-size: 16px;
	font-weight: 850;
	min-width: 92px;
}

.wjai-send:disabled {
	opacity: 0.55;
	cursor: wait;
}

@media (max-width: 1180px) {
	.wjai-launcher {
		display: none;
	}
}

@media (max-width: 782px) {
	.admin-bar .wjai-panel {
		top: 46px;
	}
}

@media (max-width: 680px) {
	.wjai-panel {
		padding: 0;
	}

	.wjai-shell {
		width: 100%;
		height: 100%;
		max-height: none;
		border: 0;
		border-radius: 0;
	}

	.wjai-header {
		padding: 18px;
	}

	.wjai-messages {
		padding: 18px;
	}

	.wjai-intro {
		margin-bottom: 18px;
	}

	.wjai-intro-title {
		font-size: clamp(28px, 10vw, 42px);
	}

	.wjai-intro-text {
		font-size: 15px;
	}

	.wjai-prompt-list {
		display: grid;
		gap: 8px;
	}

	.wjai-prompt {
		width: 100%;
		font-size: 14px;
	}

	.wjai-chat-message {
		max-width: 88%;
		font-size: 15px;
	}

	.wjai-input-row {
		padding: 14px;
	}

	.wjai-send {
		min-width: 78px;
		padding: 0 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wjai-launcher::before,
	.wjai-launcher::after,
	.wjai-thinking-dots i {
		animation: none;
	}
}

@keyframes wjai-thinking-dot {
	0%,
	80%,
	100% {
		opacity: 0.34;
		transform: translateY(0);
	}
	40% {
		opacity: 1;
		transform: translateY(-3px);
	}
}
