/* SEO Prime Chat — scoped styles (site palette: dark + green). */
.spc-root {
	--spc-bg: #151515;
	--spc-bg2: #1f1f1f;
	--spc-line: #3a3a3a;
	--spc-text: #f8f8f8;
	--spc-muted: #a9b0ba;
	--spc-accent: #71ecb6;
	--spc-accent2: #bafe6d;
	position: fixed;
	right: 20px;
	bottom: 96px; /* sits above the WhatsApp float button */
	z-index: 99990;
	font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
}
.spc-root *, .spc-root *::before, .spc-root *::after { box-sizing: border-box; }

/* Robot launcher: floats gently; label appears on hover (desktop). */
.spc-root button.spc-launcher {
	position: relative;
	display: block;
	width: 72px;
	height: 72px;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.spc-root .spc-launcher svg.spc-robot {
	display: block;
	width: 72px;
	height: 72px;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)) drop-shadow(0 0 10px rgba(113, 236, 182, .35));
	animation: spc-float 3.2s ease-in-out infinite;
	transition: transform .2s ease;
}
.spc-root button.spc-launcher:hover svg.spc-robot { animation-play-state: paused; transform: translateY(-4px) scale(1.06); }
.spc-root button.spc-launcher:focus-visible { outline: 2px solid var(--spc-accent); outline-offset: 4px; }
.spc-root .spc-launcher-label {
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%);
	padding: 8px 12px;
	border: 1px solid var(--spc-line);
	border-radius: 999px;
	background: var(--spc-bg);
	color: var(--spc-text);
	font: 600 13px/1 "Inter", Arial, sans-serif;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.spc-root button.spc-launcher:hover .spc-launcher-label,
.spc-root button.spc-launcher:focus-visible .spc-launcher-label { opacity: 1; }
.spc-root .spc-launcher.spc-loading { opacity: .7; }
@keyframes spc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.spc-root.spc-open button.spc-launcher { display: none; }

.spc-root .spc-panel {
	display: none;
	flex-direction: column;
	width: 370px;
	max-width: calc(100vw - 40px);
	height: min(560px, calc(100vh - 140px));
	border: 1px solid var(--spc-line);
	border-radius: 18px;
	background: var(--spc-bg);
	color: var(--spc-text);
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 30px rgba(113, 236, 182, .08);
}
.spc-open .spc-panel { display: flex; }

.spc-root .spc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--spc-line);
	background: linear-gradient(135deg, rgba(186, 254, 109, .1), rgba(113, 236, 182, .04));
}
.spc-root p.spc-title { margin: 0; color: var(--spc-text); font: 700 16px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif; text-transform: none; }
.spc-root p.spc-sub { margin: 2px 0 0; color: var(--spc-accent); font-size: 12px; }
.spc-root button.spc-close {
	width: 32px; height: 32px; padding: 0;
	border: 1px solid var(--spc-line); border-radius: 50%;
	background: transparent; color: var(--spc-text);
	font-size: 20px; line-height: 1; cursor: pointer;
}

.spc-root .spc-log {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.spc-root .spc-msg {
	max-width: 85%;
	padding: 10px 13px;
	border-radius: 14px;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
.spc-root .spc-bot { align-self: flex-start; background: var(--spc-bg2); border: 1px solid var(--spc-line); border-bottom-left-radius: 4px; }
.spc-root .spc-user { align-self: flex-end; background: linear-gradient(135deg, rgba(186, 254, 109, .9), rgba(113, 236, 182, .9)); color: #071009; border-bottom-right-radius: 4px; }
.spc-root .spc-msg a { color: var(--spc-accent); text-decoration: underline; }
.spc-root .spc-user a { color: #071009; }

.spc-root a.spc-wa-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	padding: 9px 14px;
	border-radius: 999px;
	background: #25d366;
	color: #071009;
	font: 600 14px/1.2 "Inter", Arial, sans-serif;
	text-decoration: none;
}
.spc-root a.spc-wa-btn:hover { background: #1ebe5a; color: #071009; }

.spc-root .spc-typing { display: flex; gap: 4px; }
.spc-root .spc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--spc-muted); animation: spc-dot 1.2s infinite ease-in-out; }
.spc-root .spc-typing span:nth-child(2) { animation-delay: .15s; }
.spc-root .spc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes spc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.spc-root .spc-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0;
	padding: 10px;
	border-top: 1px solid var(--spc-line);
}
.spc-root textarea.spc-input {
	flex: 1;
	min-height: 42px;
	max-height: 120px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--spc-line);
	border-radius: 12px;
	background: var(--spc-bg2);
	color: var(--spc-text);
	font: 400 15px/1.4 "Inter", Arial, sans-serif;
	resize: none;
}
.spc-root textarea.spc-input:focus { outline: none; border-color: var(--spc-accent); }
.spc-root button.spc-send {
	width: 42px; height: 42px; padding: 0;
	border: 0; border-radius: 12px;
	background: var(--spc-accent); color: #071009; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.spc-root button.spc-send:disabled { opacity: .5; cursor: default; }
.spc-root .spc-send svg { width: 20px; height: 20px; fill: currentColor; }

.spc-root .spc-foot { padding: 0 12px 10px; color: var(--spc-muted); font: 400 11.5px/1.4 "Inter", Arial, sans-serif; text-align: center; }
.spc-root .spc-foot a { color: var(--spc-accent); font: 600 11.5px/1.4 "Inter", Arial, sans-serif; text-decoration: underline; }

@media (max-width: 480px) {
	.spc-root { right: 12px; bottom: 88px; }
	.spc-root .spc-launcher-label { display: none; }
	.spc-root button.spc-launcher, .spc-root .spc-launcher svg.spc-robot { width: 62px; height: 62px; }
	.spc-open.spc-root { inset: 0; right: 0; bottom: 0; }
	.spc-root.spc-open .spc-panel {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		max-width: 100%;
		height: 100vh;
		height: 100dvh; /* visible viewport, excludes the mobile browser bars */
		border-radius: 0;
		border: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spc-root .spc-launcher svg.spc-robot, .spc-root .spc-typing span { transition: none; animation: none; }
}
