@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459WlhyyTh89Y.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459WlhyyTh89Y.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459WlhyyTh89Y.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459WlhyyTh89Y.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm459WdhyyTh89ZNpQ.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Montserrat';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('https://fonts.gstatic.com/s/montserrat/v31/JTUFjIg1_i6t8kCHKm459Wx7xQYXK0vOoz6jq6R9WXh0ppC6MLk.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--urag-primary: #1e3a5f;
	--urag-primary-hover: #152a45;
	--urag-bg: #ffffff;
	--urag-text: #1a1a1a;
	--urag-muted: #6b7280;
	--urag-border: #e5e7eb;
	--urag-user-bg: #eff6ff;
	--urag-assistant-bg: #f9fafb;
	--urag-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	--urag-radius: 12px;
	--urag-font: "Montserrat", sans-serif;
}

.s2m-ai-chatbot-widget {
	position: fixed;
	z-index: 100001;
	font-family: var(--urag-font) !important;
	font-size: 16px;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

.s2m-ai-chatbot-widget * {
	font-family: inherit !important;
}

.s2m-ai-chatbot-bottom-right {
	bottom: 20px;
	right: 20px;
}

.s2m-ai-chatbot-bottom-left {
	bottom: 20px;
	left: 20px;
}

.s2m-ai-chatbot-toggle {
	width: auto;
	height: auto;
	border-radius: 0;
	border: none;
	background: none;
	box-shadow: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	position: relative;
	z-index: 1;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.s2m-ai-chatbot-toggle img {
	width: 80px;
	height: 80px;
	object-fit: contain;
	display: block;
}

.s2m-ai-chatbot-toggle:hover {
	transform: scale(1.05);
}

.s2m-ai-chatbot-overlay {
	display: none;
}

.s2m-ai-chatbot-panel {
	position: absolute;
	bottom: 100px;
	right: 0;
	width: 380px;
	max-width: calc(100vw - 40px);
	height: 520px;
	max-height: calc(100vh - 120px);
	background: var(--urag-bg);
	border-radius: var(--urag-radius);
	box-shadow: var(--urag-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--urag-border);
	z-index: 2;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(16px) scale(0.96);
	transform-origin: bottom right;
	transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.s2m-ai-chatbot-panel.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.s2m-ai-chatbot-bottom-left .s2m-ai-chatbot-panel {
	right: auto;
	left: 0;
	transform-origin: bottom left;
}

.s2m-ai-chatbot-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--urag-primary);
	color: #fff;
}

.s2m-ai-chatbot-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.s2m-ai-chatbot-new {
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 6px;
	cursor: pointer;
	line-height: 1.4;
}

.s2m-ai-chatbot-new:hover {
	background: rgba(255, 255, 255, 0.25);
}

.s2m-ai-chatbot-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}

.s2m-ai-chatbot-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	position: relative;
	scroll-behavior: smooth;
}

.s2m-ai-chatbot-message {
	padding: 10px 14px;
	border-radius: 10px;
	max-width: 90%;
	word-wrap: break-word;
	white-space: pre-wrap;
}

.s2m-ai-chatbot-message--user {
	align-self: flex-end;
	background: var(--urag-user-bg);
	color: var(--urag-text);
}

.s2m-ai-chatbot-message--assistant {
	align-self: flex-start;
	background: var(--urag-assistant-bg);
	color: var(--urag-text);
	border: 1px solid var(--urag-border);
}

.s2m-ai-chatbot-message--clarification {
	border-left: 3px solid var(--urag-primary);
	background: #f8fafc;
}

.s2m-ai-chatbot-message--followup {
	margin-top: -4px;
	max-width: 85%;
	background: #f4f7fb;
	border-left: 3px solid var(--urag-primary);
	font-size: 0.96em;
}

.s2m-ai-chatbot-typing {
	color: var(--urag-muted);
	font-style: italic;
	display: flex;
	align-items: center;
	gap: 8px;
}

.s2m-ai-chatbot-typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.s2m-ai-chatbot-typing-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--urag-muted);
	animation: s2m-typing-bounce 1.2s infinite ease-in-out;
}

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

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

@keyframes s2m-typing-bounce {

	0%,
	80%,
	100% {
		transform: translateY(0);
		opacity: 0.5;
	}

	40% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

.s2m-ai-chatbot-message--not-found {
	border-left: 3px solid #d97706;
	background: #fffbeb;
}

.s2m-ai-chatbot-message--error {
	border-left: 3px solid #dc2626;
	background: #fef2f2;
}

.s2m-ai-chatbot-inline {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
}

.s2m-ai-chatbot-inline.s2m-ai-chatbot-widget {
	position: relative;
	bottom: auto;
	right: auto;
	left: auto;
}

.s2m-ai-chatbot-inline .s2m-ai-chatbot-panel {
	position: relative;
	bottom: auto;
	right: auto;
	left: auto;
	width: 100%;
	max-width: none;
	height: 520px;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition: none;
}

.s2m-ai-chatbot-send:disabled,
.s2m-ai-chatbot-input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.s2m-ai-chatbot-sources {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--urag-border);
}

.s2m-ai-chatbot-sources small {
	display: block;
	color: var(--urag-muted);
	margin-bottom: 4px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.s2m-ai-chatbot-sources ul {
	margin: 0;
	padding: 0 0 0 16px;
	list-style: disc;
}

.s2m-ai-chatbot-sources a {
	color: var(--urag-primary);
	text-decoration: none;
	font-size: 12px;
}

.s2m-ai-chatbot-sources a:hover {
	text-decoration: underline;
}

.s2m-ai-chatbot-form {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--urag-border);
	background: var(--urag-bg);
}

.s2m-ai-chatbot-input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--urag-border);
	border-radius: 8px;
	font-size: 16px;
	outline: none;
}

.s2m-ai-chatbot-input:focus {
	border-color: var(--urag-primary);
}

.s2m-ai-chatbot-send {
	padding: 10px 16px;
	background: var(--urag-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 16px;
	white-space: nowrap;
}

.s2m-ai-chatbot-send:hover {
	background: var(--urag-primary-hover);
}

.s2m-ai-chatbot-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.s2m-ai-chatbot-starters,
.s2m-ai-chatbot-quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.s2m-ai-chatbot-starter,
.s2m-ai-chatbot-quick-reply {
	border: 1px solid var(--urag-border);
	background: #fff;
	color: var(--urag-primary);
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 12px;
	cursor: pointer;
}

.s2m-ai-chatbot-starter:hover,
.s2m-ai-chatbot-quick-reply:hover {
	background: #f3f4f6;
}

.s2m-ai-chatbot-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--urag-primary);
	color: #fff !important;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	transition: background 0.2s;
}

.s2m-ai-chatbot-action:hover {
	background: var(--urag-primary-hover);
	color: #fff !important;
}

@media (max-width: 480px) {
	.s2m-ai-chatbot-actions {
		flex-direction: column;
	}

	.s2m-ai-chatbot-action {
		width: 100%;
		text-align: center;
	}

	.s2m-ai-chatbot-bottom-left {
		left: 0;
		right: auto;
	}

	.s2m-ai-chatbot-overlay {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		min-height: 100%;
		margin: 0;
		background: rgba(15, 23, 42, 0.62);
		box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.62);
		z-index: 99990;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		border: 0;
		padding: 0;
		cursor: pointer;
		transition: opacity 0.28s ease, visibility 0.28s ease;
	}

	.s2m-ai-chatbot-overlay.is-visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.s2m-ai-chatbot-bottom-right .s2m-ai-chatbot-panel,
	.s2m-ai-chatbot-bottom-left .s2m-ai-chatbot-panel {
		position: fixed;
		top: max(12px, env(safe-area-inset-top, 0px));
		bottom: max(12px, env(safe-area-inset-bottom, 0px));
		right: 12px;
		left: 12px;
		width: auto;
		max-width: none;
		height: auto;
		max-height: none;
		border-radius: var(--urag-radius);
		transform: translateY(12px);
		transform-origin: center bottom;
		z-index: 100000;
	}

	.s2m-ai-chatbot-bottom-right .s2m-ai-chatbot-panel.is-open,
	.s2m-ai-chatbot-bottom-left .s2m-ai-chatbot-panel.is-open {
		transform: translateY(0);
	}

	.s2m-ai-chatbot-header {
		padding-top: 14px;
	}

	.s2m-ai-chatbot-form {
		padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
		padding-left: max(12px, env(safe-area-inset-left, 0px));
		padding-right: max(12px, env(safe-area-inset-right, 0px));
		flex-shrink: 0;
	}

	.s2m-ai-chatbot-input {
		font-size: 16px !important;
		line-height: 1.4;
		min-height: 44px;
		-webkit-text-size-adjust: 100%;
	}

	.s2m-ai-chatbot-send {
		font-size: 16px;
		min-height: 44px;
		min-width: 64px;
		flex-shrink: 0;
	}

	html.s2m-ai-chatbot-open,
	body.s2m-ai-chatbot-open {
		overflow: hidden;
		overscroll-behavior: none;
		touch-action: none;
	}
}