@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

#sks-root {
	--sks-primary: #1F4D3B;
	--sks-accent: #C89B3C;
	--sks-cream: #FAF7F0;
	--sks-ink: #26302B;
	--sks-sage: #7CA982;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
}

/* Launcher */
#sks-launcher {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--sks-primary), #143329);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(31, 77, 59, 0.35);
	position: relative;
	transition: transform .25s ease, box-shadow .25s ease;
}
#sks-launcher:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 28px rgba(31,77,59,.45); }
#sks-launcher::before {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--sks-accent);
	opacity: .55;
	animation: sks-pulse 2.4s ease-out infinite;
}
@keyframes sks-pulse {
	0% { transform: scale(.9); opacity: .55; }
	70% { transform: scale(1.25); opacity: 0; }
	100% { opacity: 0; }
}
.sks-launcher-badge {
	position: absolute;
	top: -4px; right: -4px;
	background: var(--sks-accent);
	color: #26302B;
	font-size: 11px;
	font-weight: 700;
	width: 20px; height: 20px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 0 0 2px #fff;
}

/* Window */
#sks-window {
	position: absolute;
	bottom: 78px;
	right: 0;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 120px);
	background: var(--sks-cream);
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0,0,0,.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform-origin: bottom right;
	transition: opacity .22s ease, transform .22s ease;
}
#sks-window.sks-hidden { opacity: 0; transform: scale(.92) translateY(12px); pointer-events: none; }

.sks-header {
	background: linear-gradient(120deg, var(--sks-primary), #163a2c 70%);
	color: #fff;
	padding: 16px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	position: relative;
}
.sks-avatar {
	width: 42px; height: 42px;
	border-radius: 50%;
	background: var(--sks-accent);
	color: #24301f;
	font-family: 'Fraunces', serif;
	font-weight: 600;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
}
.sks-header-text { line-height: 1.25; overflow: hidden; }
.sks-agent-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 16.5px; letter-spacing: .2px; }
.sks-agent-title { font-size: 11.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sks-status { font-size: 11px; margin-left: auto; display: flex; align-items: center; gap: 5px; opacity: .9; white-space: nowrap; }
.sks-dot { width: 7px; height: 7px; border-radius: 50%; background: #6EE79B; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
#sks-minimize {
	background: rgba(255,255,255,.15);
	border: none; color: #fff; width: 26px; height: 26px; border-radius: 50%;
	font-size: 18px; line-height: 1; cursor: pointer; flex-shrink: 0;
}

.sks-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background:
		radial-gradient(circle at 15% 0%, rgba(124,169,130,.10), transparent 40%),
		var(--sks-cream);
}
.sks-msg {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 16px;
	font-size: 13.6px;
	line-height: 1.5;
	animation: sks-in .18s ease;
}
@keyframes sks-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sks-msg.bot {
	background: #fff;
	color: var(--sks-ink);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.sks-msg.user {
	background: var(--sks-primary);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}
.sks-msg a { color: inherit; text-decoration: underline; }

.sks-typing {
	padding: 0 16px 8px;
	display: flex;
	gap: 4px;
}
.sks-typing span {
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--sks-sage);
	animation: sks-bounce 1.2s infinite ease-in-out;
}
.sks-typing span:nth-child(2) { animation-delay: .15s; }
.sks-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sks-bounce { 0%,60%,100% { transform: translateY(0); opacity:.5; } 30% { transform: translateY(-5px); opacity:1; } }

#sks-form {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid rgba(0,0,0,.06);
	background: #fff;
}
#sks-input {
	flex: 1;
	border: 1px solid #E4DFD3;
	border-radius: 22px;
	padding: 10px 16px;
	font-size: 13.6px;
	font-family: inherit;
	outline: none;
	background: var(--sks-cream);
	color: var(--sks-ink);
}
#sks-input:focus { border-color: var(--sks-sage); }
#sks-send {
	width: 40px; height: 40px;
	border-radius: 50%;
	background: var(--sks-accent);
	color: #2a2410;
	border: none;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: transform .15s ease;
}
#sks-send:hover { transform: scale(1.06); }

.sks-footer-note {
	text-align: center;
	font-size: 10px;
	color: #9a9484;
	padding: 6px 0 10px;
	background: #fff;
}

@media (max-width: 480px) {
	#sks-root { right: 12px; bottom: 12px; }
	#sks-window {
		width: calc(100vw - 24px);
		height: calc(100vh - 100px);
		bottom: 74px;
		right: -8px;
		border-radius: 18px;
	}
}
