/*! Stackers Web Smart Chatbot 1.0.0 | https://stackersweb.com/ */
#swsc-root {
	--swsc-primary: #4388D0;
	--swsc-navy: #0B1733;
	--swsc-bubble: #EAF3FC;
	--swsc-width: 380px;
	--swsc-radius: 18px;
	--swsc-gap: 24px;
	position: fixed;
	bottom: var(--swsc-gap);
	right: var(--swsc-gap);
	z-index: 2147483000;
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--swsc-navy);
	-webkit-font-smoothing: antialiased;
}
#swsc-root.swsc-pos-left { right: auto; left: var(--swsc-gap); }
#swsc-root *, #swsc-root *::before, #swsc-root *::after { box-sizing: border-box; }
#swsc-root button, #swsc-root input { font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; text-transform: none; letter-spacing: normal; }
#swsc-root .swsc-icon { display: inline-flex; width: 24px; height: 24px; }
#swsc-root .swsc-icon svg { width: 100%; height: 100%; display: block; }

/* Launcher */
#swsc-root .swsc-launcher {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--swsc-primary);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(11, 23, 51, 0.22), 0 2px 6px rgba(11, 23, 51, 0.12);
	margin-left: auto;
}
#swsc-root.swsc-pos-left .swsc-launcher { margin-left: 0; }
#swsc-root .swsc-launcher:hover { filter: brightness(1.06); }
#swsc-root .swsc-launcher:focus-visible, #swsc-root button:focus-visible, #swsc-root .swsc-input:focus-visible { outline: 3px solid rgba(67, 136, 208, 0.45); outline-offset: 2px; }
#swsc-root .swsc-launcher .swsc-icon { width: 28px; height: 28px; }
#swsc-root .swsc-launcher-img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; display: block; }
#swsc-root .swsc-launcher .swsc-launcher-close { position: absolute; opacity: 0; transform: rotate(-90deg) scale(0.6); }
#swsc-root.swsc-open .swsc-launcher > :not(.swsc-launcher-close) { opacity: 0; transform: rotate(90deg) scale(0.6); }
#swsc-root.swsc-open .swsc-launcher .swsc-launcher-close { opacity: 1; transform: none; }
#swsc-root.swsc-open .swsc-launcher { background: var(--swsc-navy); }

/* Window */
#swsc-root .swsc-window {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: var(--swsc-width);
	max-width: calc(100vw - 2 * var(--swsc-gap));
	height: 600px;
	max-height: calc(100vh - 120px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--swsc-radius);
	box-shadow: 0 18px 48px rgba(11, 23, 51, 0.18), 0 4px 12px rgba(11, 23, 51, 0.08);
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transform-origin: bottom right;
	pointer-events: none;
}
#swsc-root.swsc-pos-left .swsc-window { right: auto; left: 0; transform-origin: bottom left; }
#swsc-root.swsc-open .swsc-window { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }

/* Header */
#swsc-root .swsc-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: var(--swsc-navy); color: #fff; flex-shrink: 0; }
#swsc-root .swsc-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--swsc-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; color: #fff; }
#swsc-root .swsc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
#swsc-root .swsc-titles { flex: 1; min-width: 0; }
#swsc-root .swsc-title { font-weight: 700; font-size: 16px; line-height: 1.25; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#swsc-root .swsc-subtitle { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255, 255, 255, 0.72); margin-top: 2px; }
#swsc-root .swsc-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ccf8e; flex-shrink: 0; }
#swsc-root .swsc-close { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer; flex-shrink: 0; }
#swsc-root .swsc-close:hover { background: rgba(255, 255, 255, 0.2); }
#swsc-root .swsc-close .swsc-icon { width: 18px; height: 18px; }

/* Log */
#swsc-root .swsc-log { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 18px 16px 8px; background: #fff; overscroll-behavior: contain; scroll-behavior: smooth; }
#swsc-root .swsc-msg { display: flex; flex-direction: column; max-width: 86%; margin-bottom: 12px; }
#swsc-root .swsc-bot { align-items: flex-start; margin-right: auto; }
#swsc-root .swsc-user { align-items: flex-end; margin-left: auto; }
#swsc-root .swsc-bubble { padding: 10px 14px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; max-width: 100%; }
#swsc-root .swsc-bot .swsc-bubble { background: var(--swsc-bubble); color: var(--swsc-navy); border-bottom-left-radius: 6px; }
#swsc-root .swsc-user .swsc-bubble { background: var(--swsc-primary); color: #fff; border-bottom-right-radius: 6px; white-space: pre-wrap; }
#swsc-root .swsc-bubble p { margin: 0 0 8px; padding: 0; }
#swsc-root .swsc-bubble p:last-child { margin-bottom: 0; }
#swsc-root .swsc-bubble ul { margin: 4px 0 8px; padding: 0 0 0 18px; list-style: disc; }
#swsc-root .swsc-bubble ul:last-child { margin-bottom: 0; }
#swsc-root .swsc-bubble li { margin: 2px 0; padding: 0; }
#swsc-root .swsc-bubble strong { font-weight: 700; }
#swsc-root .swsc-bubble a { color: var(--swsc-primary); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
#swsc-root .swsc-user .swsc-bubble a { color: #fff; }
#swsc-root .swsc-time { font-size: 11px; color: #8a93a6; margin-top: 4px; padding: 0 4px; }

/* Quick replies */
#swsc-root .swsc-replies { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
#swsc-root .swsc-reply { padding: 8px 14px; border: 1.5px solid var(--swsc-primary); border-radius: 999px; background: #fff; color: var(--swsc-primary); font-size: 13.5px; font-weight: 500; cursor: pointer; text-align: left; line-height: 1.3; }
#swsc-root .swsc-reply:hover { background: var(--swsc-primary); color: #fff; }
#swsc-root.swsc-busy .swsc-reply { opacity: 0.6; cursor: wait; }

/* Typing */
#swsc-root .swsc-typing { display: inline-flex; gap: 4px; align-items: center; padding: 14px 16px; }
#swsc-root .swsc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--swsc-primary); opacity: 0.4; }

/* Footer */
#swsc-root .swsc-foot { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid #e6ecf5; background: #fff; flex-shrink: 0; margin: 0; }
#swsc-root .swsc-input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid #dbe4f0; border-radius: 12px; background: #f7f9fc; color: var(--swsc-navy); font-size: 15px; box-shadow: none; outline: none; }
#swsc-root .swsc-input:focus { border-color: var(--swsc-primary); background: #fff; }
#swsc-root .swsc-input::placeholder { color: #8a93a6; opacity: 1; }
#swsc-root .swsc-send, #swsc-root .swsc-clear { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; cursor: pointer; flex-shrink: 0; }
#swsc-root .swsc-send { background: var(--swsc-primary); color: #fff; }
#swsc-root .swsc-send:disabled { opacity: 0.55; cursor: wait; }
#swsc-root .swsc-send .swsc-icon { width: 20px; height: 20px; }
#swsc-root .swsc-clear { width: 36px; background: transparent; color: #8a93a6; }
#swsc-root .swsc-clear:hover { color: var(--swsc-navy); background: #f1f4f9; }
#swsc-root .swsc-clear .swsc-icon { width: 20px; height: 20px; }
#swsc-root .swsc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
#swsc-root .swsc-note { padding: 0 12px 10px; font-size: 11px; color: #8a93a6; text-align: center; background: #fff; flex-shrink: 0; }

/* Animations (optional) */
#swsc-root.swsc-anim .swsc-window { transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.22s; }
#swsc-root.swsc-anim.swsc-open .swsc-window { transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
#swsc-root.swsc-anim .swsc-launcher { transition: transform 0.2s ease, background-color 0.2s ease; }
#swsc-root.swsc-anim .swsc-launcher:hover { transform: translateY(-2px); }
#swsc-root.swsc-anim .swsc-launcher > * { transition: opacity 0.2s ease, transform 0.2s ease; }
#swsc-root.swsc-anim .swsc-msg { animation: swsc-in 0.24s ease both; }
#swsc-root.swsc-anim .swsc-replies { animation: swsc-in 0.3s ease both; }
#swsc-root.swsc-anim .swsc-typing span { animation: swsc-blink 1.2s infinite ease-in-out; }
#swsc-root.swsc-anim .swsc-typing span:nth-child(2) { animation-delay: 0.15s; }
#swsc-root.swsc-anim .swsc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes swsc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes swsc-blink { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
	#swsc-root *, #swsc-root *::before, #swsc-root *::after { animation: none !important; transition: none !important; }
	#swsc-root .swsc-log { scroll-behavior: auto; }
}

/* Mobile */
@media (max-width: 480px) {
	#swsc-root { --swsc-gap: 16px; }
	#swsc-root .swsc-launcher { width: 56px; height: 56px; }
	#swsc-root.swsc-open .swsc-launcher { display: none; }
	#swsc-root .swsc-window {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		max-width: 100%;
		height: 100%;
		max-height: none;
		border-radius: 0;
	}
	#swsc-root .swsc-head { padding-top: max(16px, env(safe-area-inset-top)); }
	#swsc-root .swsc-note { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
	#swsc-root .swsc-input { font-size: 16px; } /* Prevents iOS zoom on focus. */
	#swsc-root .swsc-msg { max-width: 90%; }
}
@media (min-width: 481px) and (max-height: 640px) {
	#swsc-root .swsc-window { height: calc(100vh - 110px); }
}
