.kayco-ai-widget {
	position: fixed;
	z-index: 99999;
	bottom: 24px;
	font-family: "Inter", "Segoe UI", sans-serif;
	--kayco-panel-bg:
		linear-gradient(180deg, #fffefb 0%, #fff7fb 52%, #ffffff 100%);
	--kayco-border: #e6dbe7;
	--kayco-shadow: 0 24px 60px rgba(71, 28, 71, 0.16);
	--kayco-text: #07171d;
	--kayco-muted: #706f70;
	--kayco-surface: #f3f3f3;
}

.kayco-ai-widget--bottom-right {
	right: 0;
}

.kayco-ai-input {
	font-size
}


.kayco-ai-input  ::placeholder {
	font-size: 12px;
}

.kayco-ai-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 0;
	background: #81267b;
	color: #fff;
	box-shadow: var(--kayco-shadow);
	cursor: pointer;
	transform: translateY(0);
	transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
	width: 52px !important;
    height: 110px;
    border-radius: 8px 0px 0px 8px;
}

.kayco-ai-toggle  svg {
	    width: 100%;
    height: 100%;
    object-fit: contain;
}

.kayco-ai-toggle:hover {
	transform: translateY(-2px);
	box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.kayco-ai-toggle__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.kayco-ai-toggle__label {
	font-size: 14px;
	font-weight: 700;
}

.kayco-ai-panel {
	position: absolute;
	bottom: 74px;
	width: min(420px, calc(100vw - 24px));
	height: min(680px, calc(100vh - 120px));
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--kayco-border);
	border-radius: 28px;
	background: var(--kayco-panel-bg);
	box-shadow: var(--kayco-shadow);
	backdrop-filter: blur(18px);
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	pointer-events: none;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.kayco-ai-widget--open .kayco-ai-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.kayco-ai-widget--bottom-right .kayco-ai-panel {
	right: 0;
}



.kayco-ai-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 18px 14px;
	background:
		radial-gradient(circle at top right, rgba(122, 20, 122, 0.12), transparent 35%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82));
	border-bottom: 1px solid var(--kayco-border);
}

.kayco-ai-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.kayco-ai-title {
	margin: 0;
	color: var(--kayco-text);
	font-size: 18px;
	font-family: "Spectral", Georgia, serif;
	font-weight: 600;
}

.kayco-ai-subtitle {
	margin: 4px 0 0;
	color: var(--kayco-muted);
	font-size: 13px;
}

.kayco-ai-close {
	border: 0;
	background: transparent;
	color: var(--kayco-muted);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.kayco-ai-clear {
	border: 1px solid #ddd6e2;
	border-radius: 999px;
	padding: 8px 12px;
	background: rgba(255, 255, 255, 0.82);
	color: var(--kayco-accent);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.kayco-ai-clear:hover {
	background: #fff;
	border-color: rgba(122, 20, 122, 0.3);
	transform: translateY(-1px);
}

.kayco-ai-toolbar {
	display: grid;
	gap: 12px;
	padding: 14px 18px 0;
}

.kayco-ai-prompts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kayco-ai-prompt,
.kayco-ai-page-button {
	border: 1px solid rgba(122, 20, 122, 0.18);
	background: rgba(255, 255, 255, 0.86);
	color: var(--kayco-text);
	border-radius: 999px;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.kayco-ai-prompt:hover,
.kayco-ai-page-button:hover {
	transform: translateY(-1px);
	border-color: rgba(122, 20, 122, 0.3);
	background: #ffffff;
}

.kayco-ai-messages {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 18px;
	overflow-y: auto;
	scroll-behavior: smooth;
}

.kayco-ai-message {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 88%;
	animation: kayco-ai-slide-up 0.24s ease;
}

.kayco-ai-message--user {
	align-self: flex-end;
}

.kayco-ai-message--assistant {
	align-self: flex-start;
}

.kayco-ai-message__label {
	color: var(--kayco-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.kayco-ai-message__bubble {
	border-radius: 22px;
	padding: 14px 16px;
	font-size: 14px;
	line-height: 1.6;
	box-shadow: 0 12px 30px rgba(71, 28, 71, 0.06);
}

.kayco-ai-message__bubble--streaming {
	min-height: 56px;
}

.kayco-ai-message--assistant .kayco-ai-message__bubble {
	background: #fff;
	color: var(--kayco-text);
	border: 1px solid var(--kayco-border);
}

.kayco-ai-message--user .kayco-ai-message__bubble {
	background: linear-gradient(135deg, var(--kayco-accent) 0%, #5e0f5e 100%);
	color: #fff;
}

.kayco-ai-message__bubble p {
	margin: 0 0 10px;
}

.kayco-ai-message__bubble p:last-child {
	margin-bottom: 0;
}

.kayco-ai-message__bubble ul {
	margin: 0;
	padding-left: 20px;
}

.kayco-ai-message__bubble pre {
	margin: 10px 0 0;
	padding: 14px;
	overflow-x: auto;
	border-radius: 16px;
	background: #0f172a;
	color: #e2e8f0;
	font-size: 13px;
}

.kayco-ai-code-label {
	margin-top: 10px;
	color: var(--kayco-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.kayco-ai-message__bubble code {
	font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
	font-size: 13px;
}

.kayco-ai-message__bubble a {
	color: inherit;
	text-decoration: underline;
}

.kayco-ai-streaming-text {
	white-space: pre-wrap;
	word-break: break-word;
}

.kayco-ai-streaming-cursor {
	display: inline-block;
	width: 0.62ch;
	height: 1.05em;
	margin-left: 2px;
	border-radius: 999px;
	background: rgba(122, 20, 122, 0.8);
	vertical-align: -0.12em;
	animation: kayco-ai-caret 0.9s steps(1) infinite;
}

.kayco-ai-form {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	padding: 14px 18px 18px;
	border-top: 1px solid var(--kayco-border);
	background: rgba(255, 255, 255, 0.84);
}

.kayco-ai-input {
	flex: 1;
	min-height: 52px;
	max-height: 140px;
	resize: none;
	border: 1px solid #d7d1d7;
	border-radius: 18px;
	padding: 14px 16px;
	background: #fff;
	color: var(--kayco-text);
	font: inherit;
}

.kayco-ai-input:focus {
	outline: none;
	border-color: rgba(122, 20, 122, 0.44);
	box-shadow: 0 0 0 4px rgba(122, 20, 122, 0.12);
}

.kayco-ai-send {
	border: 0;
	border-radius: 18px;
	padding: 14px 18px;
	background: var(--kayco-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.kayco-ai-send[disabled] {
	opacity: 0.65;
	cursor: wait;
}

.kayco-ai-typing {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.kayco-ai-typing span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(122, 20, 122, 0.6);
	animation: kayco-ai-pulse 1s infinite ease-in-out;
}

.kayco-ai-typing span:nth-child(2) {
	animation-delay: 0.15s;
}

.kayco-ai-typing span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes kayco-ai-slide-up {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes kayco-ai-pulse {
	0%,
	80%,
	100% {
		transform: scale(0.7);
		opacity: 0.4;
	}

	40% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes kayco-ai-caret {
	0%,
	49% {
		opacity: 1;
	}

	50%,
	100% {
		opacity: 0;
	}
}

@media (max-width: 640px) {
	.kayco-ai-widget {
		left: 12px;
		right: 12px;
		bottom: 12px;
		display: flex;
		flex-direction: column;
		align-items: flex-end;
	}

	.kayco-ai-widget--bottom-left,
	.kayco-ai-widget--bottom-right {
		left: 0px;
		right: 0px;
	}

	.kayco-ai-widget--bottom-left {
		align-items: flex-start;
	}

	.kayco-ai-widget--bottom-right {
		align-items: flex-end;
	}

	.kayco-ai-toggle {
		width: 52px !important;
		justify-content: center;
	}

	.kayco-ai-panel {
		width: auto;
		height: min(78vh, 700px);
		left: 0;
		right: 0;
		bottom: 72px;
	}

	.kayco-ai-message {
		max-width: 94%;
	}
}
