/*
 * Public-widget boundary: every selector is anchored to this unique ID.
 * The BEM classes remain the component API; the ID prevents a theme's
 * generic element or utility selectors from leaking into the widget.
 */
#sediai-ai-chat-widget {
	--sediai-ai-chat-primary-color: #2f5d52;
	--sediai-ai-chat-paper: #fff;
	--sediai-ai-chat-surface: #f5f6f4;
	--sediai-ai-chat-line: #e0e2de;
	--sediai-ai-chat-text: #202522;
	--sediai-ai-chat-muted: #68716c;
	--sediai-ai-chat-bottom-offset: 32px;
	position: fixed;
	right: 28px;
	bottom: var(--sediai-ai-chat-bottom-offset);
	z-index: 99999;
	width: min(368px, calc(100vw - 32px));
	min-height: 52px;
	color: var(--sediai-ai-chat-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	font-variant: normal;
	line-height: 1.5;
	letter-spacing: normal;
	word-spacing: normal;
	text-align: left;
	text-indent: 0;
	text-transform: none;
	text-shadow: none;
	isolation: isolate;
}

#sediai-ai-chat-widget,
#sediai-ai-chat-widget *,
#sediai-ai-chat-widget *::before,
#sediai-ai-chat-widget *::after {
	box-sizing: border-box;
}

#sediai-ai-chat-widget :where(h2, p, time) {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-style: normal;
	font-variant: normal;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
}

#sediai-ai-chat-widget :where(button, textarea) {
	-webkit-appearance: none;
	appearance: none;
	min-width: 0;
	margin: 0;
	box-shadow: none;
	font: inherit;
	letter-spacing: normal;
	text-align: inherit;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
}

#sediai-ai-chat-widget :where(button) {
	border: 0;
	cursor: pointer;
}

#sediai-ai-chat-widget :where(button, a)::before,
#sediai-ai-chat-widget :where(button, a)::after {
	content: none;
}

#sediai-ai-chat-widget a {
	color: inherit;
	font-family: inherit;
	font-style: normal;
	font-variant: normal;
	letter-spacing: normal;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
}

#sediai-ai-chat-widget img {
	display: block;
	max-width: none;
	margin: 0;
	border: 0;
	box-shadow: none;
}

#sediai-ai-chat-widget svg {
	display: block;
	max-width: none;
	overflow: visible;
}

#sediai-ai-chat-widget form {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

#sediai-ai-chat-widget.sediai-ai-chat--bottom-left {
	right: auto;
	left: 28px;
}

#sediai-ai-chat-widget .sediai-ai-chat__launcher {
	display: inline-flex;
	float: right;
	height: 52px;
	align-items: center;
	gap: 8px;
	border: 0;
	border-radius: 999px;
	padding: 0 17px 0 14px;
	background: var(--sediai-ai-chat-primary-color);
	box-shadow: 0 10px 24px rgba(30, 50, 43, .22);
	color: #fff;
	font-size: 13px;
	font-weight: 650;
	line-height: 1;
	transition: box-shadow .16s ease, transform .16s ease;
}

#sediai-ai-chat-widget .sediai-ai-chat__launcher:hover {
	box-shadow: 0 14px 28px rgba(30, 50, 43, .28);
	transform: translateY(-1px);
}

#sediai-ai-chat-widget .sediai-ai-chat__launcher:focus-visible,
#sediai-ai-chat-widget .sediai-ai-chat__close:focus-visible,
#sediai-ai-chat-widget .sediai-ai-chat__send:focus-visible,
#sediai-ai-chat-widget .sediai-ai-chat__interactive-option:focus-visible,
#sediai-ai-chat-widget .sediai-ai-chat__powered-by a:focus-visible {
	outline: 2px solid var(--sediai-ai-chat-primary-color);
	outline-offset: 3px;
}

#sediai-ai-chat-widget .sediai-ai-chat__launcher-icon,
#sediai-ai-chat-widget .sediai-ai-chat__launcher-icon svg,
#sediai-ai-chat-widget .sediai-ai-chat__launcher-close-icon,
#sediai-ai-chat-widget .sediai-ai-chat__launcher-close-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

#sediai-ai-chat-widget .sediai-ai-chat__launcher-icon svg,
#sediai-ai-chat-widget .sediai-ai-chat__launcher-close-icon svg,
#sediai-ai-chat-widget .sediai-ai-chat__send-icon svg {
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.75;
}

#sediai-ai-chat-widget .sediai-ai-chat__launcher-close-icon {
	display: none;
}

#sediai-ai-chat-widget.is-open .sediai-ai-chat__launcher-icon {
	display: none;
}

#sediai-ai-chat-widget.is-open .sediai-ai-chat__launcher-close-icon {
	display: block;
}

#sediai-ai-chat-widget .sediai-ai-chat__launcher-label {
	white-space: nowrap;
}

#sediai-ai-chat-widget .sediai-ai-chat__panel {
	position: absolute;
	right: 0;
	bottom: 64px;
	display: flex;
	visibility: hidden;
	flex-direction: column;
	width: 100%;
	height: min(520px, calc(100vh - 132px));
	min-height: 320px;
	overflow: hidden;
	border: 1px solid var(--sediai-ai-chat-line);
	border-radius: 14px;
	background: var(--sediai-ai-chat-paper);
	box-shadow: 0 14px 34px rgba(30, 38, 34, .14);
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px) scale(.99);
	transform-origin: bottom right;
	transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

#sediai-ai-chat-widget .sediai-ai-chat__panel[hidden] {
	display: none;
}

#sediai-ai-chat-widget.is-open .sediai-ai-chat__panel {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
	transition-delay: 0s;
}

#sediai-ai-chat-widget .sediai-ai-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	padding: 14px 16px;
	border-bottom: 1px solid var(--sediai-ai-chat-line);
	background: var(--sediai-ai-chat-paper);
	color: var(--sediai-ai-chat-text);
}

#sediai-ai-chat-widget .sediai-ai-chat__identity {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

#sediai-ai-chat-widget .sediai-ai-chat__brand-mark {
	position: relative;
	display: grid;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	place-items: center;
	border-radius: 12px;
	background: var(--sediai-ai-chat-primary-color);
	box-shadow: 0 4px 10px rgba(47, 93, 82, .2);
	color: #fff;
	transform-origin: center;
	will-change: transform, box-shadow;
}

#sediai-ai-chat-widget .sediai-ai-chat__brand-mark::after {
	position: absolute;
	inset: -4px;
	border: 1px solid var(--sediai-ai-chat-primary-color);
	border-radius: 15px;
	opacity: 0;
	pointer-events: none;
	content: '';
}

#sediai-ai-chat-widget.is-open .sediai-ai-chat__brand-mark {
	animation: sediai-ai-chat-brand-pulse 3.8s ease-in-out infinite;
}

#sediai-ai-chat-widget.is-open .sediai-ai-chat__brand-mark::after {
	animation: sediai-ai-chat-brand-ring 3.8s ease-out infinite;
}

#sediai-ai-chat-widget .sediai-ai-chat__brand-mark svg {
	position: relative;
	z-index: 1;
	display: block;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

#sediai-ai-chat-widget .sediai-ai-chat__header h2 {
	margin: 0;
	color: var(--sediai-ai-chat-text);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.015em;
}

#sediai-ai-chat-widget .sediai-ai-chat__availability {
	margin: 3px 0 0;
	color: var(--sediai-ai-chat-muted);
	font-size: 12px;
	line-height: 1.35;
}

#sediai-ai-chat-widget .sediai-ai-chat__presence {
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 5px;
	border-radius: 50%;
	background: var(--sediai-ai-chat-primary-color);
	vertical-align: 1px;
}

#sediai-ai-chat-widget .sediai-ai-chat__close {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: #59625c;
	font-size: 20px;
	line-height: 1;
	transition: background .16s ease, color .16s ease;
}

#sediai-ai-chat-widget .sediai-ai-chat__close:hover {
	background: #f1f3f0;
	color: var(--sediai-ai-chat-text);
}

#sediai-ai-chat-widget .sediai-ai-chat__messages {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 20px 18px;
	background: var(--sediai-ai-chat-surface);
	overscroll-behavior: contain;
}

#sediai-ai-chat-widget .sediai-ai-chat__date-divider {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 16px;
	color: #79817c;
	font-size: 11px;
	line-height: 1;
	text-align: center;
}

#sediai-ai-chat-widget .sediai-ai-chat__date-divider::before,
#sediai-ai-chat-widget .sediai-ai-chat__date-divider::after {
	height: 1px;
	flex: 1;
	background: #e2e5e1;
	content: '';
}

#sediai-ai-chat-widget .sediai-ai-chat__message-group {
	display: block;
	max-width: 82%;
	margin: 0 0 10px;
	padding: 0;
	animation: sediai-ai-chat-message-in .2s ease-out both;
}

#sediai-ai-chat-widget .sediai-ai-chat__message-group--user {
	margin-left: auto;
}

#sediai-ai-chat-widget .sediai-ai-chat__message {
	display: block;
	max-width: 100%;
	margin: 0;
	border-radius: 12px;
	padding: 11px 13px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.48;
	white-space: pre-wrap;
	word-wrap: break-word;
}

#sediai-ai-chat-widget .sediai-ai-chat__message--assistant {
	border: 1px solid #e1e3df;
	background: #fff;
	color: #303632;
}

#sediai-ai-chat-widget .sediai-ai-chat__message--user {
	background: var(--sediai-ai-chat-primary-color);
	color: #fff;
}

#sediai-ai-chat-widget .sediai-ai-chat__message--human {
	border: 1px solid #c8ddd6;
	background: #edf5f1;
	color: #245044;
}

#sediai-ai-chat-widget .sediai-ai-chat__message-time {
	display: block;
	margin-top: 4px;
	padding-left: 8px;
	color: #7b837e;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.2;
}

#sediai-ai-chat-widget .sediai-ai-chat__message-group--user .sediai-ai-chat__message-time {
	padding-right: 8px;
	padding-left: 0;
	text-align: right;
}

#sediai-ai-chat-widget .sediai-ai-chat__interactive-body {
	margin: 7px 2px 0;
	color: #58635d;
	font-size: 13px;
	line-height: 1.45;
}

#sediai-ai-chat-widget .sediai-ai-chat__interactive-options {
	display: grid;
	gap: 7px;
	margin-top: 9px;
}

#sediai-ai-chat-widget .sediai-ai-chat__interactive-option {
	display: block;
	width: 100%;
	border: 1px solid #bdd3cb;
	border-radius: 9px;
	padding: 9px 11px;
	background: #fff;
	color: #245044;
	font-size: 13px;
	font-weight: 650;
	line-height: 1.35;
	text-align: left;
	transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

#sediai-ai-chat-widget .sediai-ai-chat__interactive-option:not(:disabled):hover {
	border-color: var(--sediai-ai-chat-primary-color);
	background: #eef6f2;
	transform: translateY(-1px);
}

#sediai-ai-chat-widget .sediai-ai-chat__interactive-option:disabled {
	border-color: #dce3df;
	background: #f3f5f3;
	color: #88918b;
	cursor: not-allowed;
	opacity: .72;
}

#sediai-ai-chat-widget .sediai-ai-chat__status {
	width: fit-content;
	max-width: calc(100% - 36px);
	margin: 0 auto 10px;
	border: 1px solid #e0e4df;
	border-radius: 8px;
	padding: 7px 10px;
	background: #eef1ee;
	color: #59645e;
	font-size: 12px;
	line-height: 1.45;
	text-align: center;
}

#sediai-ai-chat-widget .sediai-ai-chat__status[hidden] {
	display: none;
}

#sediai-ai-chat-widget .sediai-ai-chat__status--error {
	border-color: #efd5d0;
	background: #fcf4f2;
	color: #9b4c40;
}

#sediai-ai-chat-widget .sediai-ai-chat__status--rate-limit {
	border-color: #ead9a8;
	background: #fff9e9;
	color: #7a5b16;
}

#sediai-ai-chat-widget .sediai-ai-chat__status-action {
	display: inline-block;
	margin-left: 8px;
	border: 0;
	border-bottom: 1px solid currentColor;
	padding: 0;
	background: transparent;
	color: inherit;
	font-size: inherit;
	font-weight: 700;
	line-height: inherit;
}

#sediai-ai-chat-widget .sediai-ai-chat__typing {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

#sediai-ai-chat-widget .sediai-ai-chat__typing i {
	display: inline-block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--sediai-ai-chat-primary-color);
	opacity: .55;
	animation: sediai-ai-chat-typing-dot 1s ease-in-out infinite;
}

#sediai-ai-chat-widget .sediai-ai-chat__typing i:nth-child(2) { animation-delay: .14s; }
#sediai-ai-chat-widget .sediai-ai-chat__typing i:nth-child(3) { animation-delay: .28s; }

#sediai-ai-chat-widget .sediai-ai-chat__typing-indicator {
	display: flex;
	justify-content: flex-start;
	margin: 0 0 12px;
	animation: sediai-ai-chat-message-in .2s ease-out both;
}

#sediai-ai-chat-widget .sediai-ai-chat__typing-bubble {
	display: inline-flex;
	min-width: 42px;
	min-height: 32px;
	align-items: center;
	justify-content: center;
	border: 1px solid #dbe4de;
	border-radius: 14px 14px 14px 4px;
	padding: 0 11px;
	background: #f0f4f1;
}

#sediai-ai-chat-widget .sediai-ai-chat__typing-bubble .sediai-ai-chat__typing {
	gap: 5px;
}

#sediai-ai-chat-widget .sediai-ai-chat__footer {
	flex-shrink: 0;
	padding: 12px 14px;
	border-top: 1px solid var(--sediai-ai-chat-line);
	background: #fff;
}

#sediai-ai-chat-widget .sediai-ai-chat__form {
	margin: 0;
}

#sediai-ai-chat-widget .sediai-ai-chat__composer {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 1px solid #d6dad5;
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
	transition: border-color .16s ease, box-shadow .16s ease;
}

#sediai-ai-chat-widget .sediai-ai-chat__composer:focus-within {
	border-color: var(--sediai-ai-chat-primary-color);
	box-shadow: 0 0 0 3px rgba(47, 93, 82, .12);
}

#sediai-ai-chat-widget .sediai-ai-chat__input {
	display: block;
	width: 100%;
	height: 46px;
	min-height: 46px;
	max-height: 104px;
	margin: 0;
	resize: none;
	border: 0;
	border-radius: 10px;
	padding: 12px 50px 12px 11px;
	background: transparent;
	color: var(--sediai-ai-chat-text);
	font-size: 16px;
	font-weight: 400;
	line-height: 20px;
	text-align: left;
	text-indent: 0;
	overflow-y: auto;
}

#sediai-ai-chat-widget .sediai-ai-chat__input:focus {
	outline: 0;
	box-shadow: none;
}

#sediai-ai-chat-widget .sediai-ai-chat__input:disabled {
	background: #f1f4f2;
	color: #8a918c;
	cursor: not-allowed;
}

#sediai-ai-chat-widget .sediai-ai-chat__composer-hint {
	display: none;
	margin: 6px 0 -2px;
	color: #8c9790;
	font-size: 10px;
	line-height: 1.35;
	text-align: center;
}

#sediai-ai-chat-widget .sediai-ai-chat__send {
	position: absolute;
	right: 5px;
	bottom: 5px;
	display: grid;
	width: 36px;
	min-width: 36px;
	height: 36px;
	min-height: 36px;
	place-items: center;
	margin: 0;
	border: 0;
	border-radius: 50%;
	padding: 0;
	background: var(--sediai-ai-chat-primary-color);
	box-shadow: none;
	color: #fff;
	line-height: 1;
	text-indent: 0;
	text-transform: none;
}

#sediai-ai-chat-widget .sediai-ai-chat__send:disabled {
	background: #e6eae6;
	color: #8a918c;
	cursor: not-allowed;
}

#sediai-ai-chat-widget .sediai-ai-chat__launcher:disabled {
	background: #dce3df;
	box-shadow: none;
	color: #7d8781;
	cursor: not-allowed;
}

#sediai-ai-chat-widget .sediai-ai-chat__message-group.is-pending {
	opacity: .74;
}

#sediai-ai-chat-widget .sediai-ai-chat__send-icon {
	display: grid;
	width: 18px;
	height: 18px;
	place-items: center;
	line-height: 0;
}

#sediai-ai-chat-widget .sediai-ai-chat__send-icon svg {
	display: block;
	width: 18px;
	height: 18px;
	max-width: none;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	transition: transform .16s ease;
}

#sediai-ai-chat-widget .sediai-ai-chat__send:not(:disabled):hover .sediai-ai-chat__send-icon svg {
	transform: translate(1px, -1px);
}

#sediai-ai-chat-widget .sediai-ai-chat__powered-by {
	margin: 10px 0 1px;
	color: #9aa19c;
	font-size: 10px;
	letter-spacing: .01em;
	line-height: 1.2;
	text-align: center;
}

#sediai-ai-chat-widget .sediai-ai-chat__powered-by a {
	border-bottom: 1px solid transparent;
	color: #64736b;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .16s ease, color .16s ease;
}

#sediai-ai-chat-widget .sediai-ai-chat__powered-by a:hover {
	border-color: currentColor;
	color: var(--sediai-ai-chat-primary-color);
}

#sediai-ai-chat-widget .sediai-ai-chat__screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@keyframes sediai-ai-chat-message-in {
	from { opacity: 0; transform: translateY(5px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes sediai-ai-chat-typing-dot {
	0%, 70%, 100% { opacity: .38; transform: translateY(0); }
	35% { opacity: .9; transform: translateY(-3px); }
}

@keyframes sediai-ai-chat-brand-pulse {
	0%, 100% { transform: scale(1); box-shadow: 0 4px 10px rgba(47, 93, 82, .2); }
	50% { transform: scale(1.045); box-shadow: 0 7px 18px rgba(47, 93, 82, .28); }
}

@keyframes sediai-ai-chat-brand-ring {
	0%, 12% { opacity: 0; transform: scale(.9); }
	24% { opacity: .42; }
	58%, 100% { opacity: 0; transform: scale(1.24); }
}

@media (max-width: 600px) {
	#sediai-ai-chat-widget,
	#sediai-ai-chat-widget.sediai-ai-chat--bottom-left {
		right: 16px;
		bottom: max(20px, var(--sediai-ai-chat-bottom-offset));
		left: 16px;
		width: auto;
	}

	#sediai-ai-chat-widget .sediai-ai-chat__launcher {
		width: 52px;
		justify-content: center;
		padding: 0;
	}

	#sediai-ai-chat-widget .sediai-ai-chat__launcher-label {
		display: none;
	}

	#sediai-ai-chat-widget .sediai-ai-chat__panel {
		height: min(520px, calc(100vh - 108px));
	}
}

@media (hover: hover) and (pointer: fine) {
	#sediai-ai-chat-widget .sediai-ai-chat__composer-hint {
		display: block;
	}
}

@media (prefers-reduced-motion: reduce) {
	#sediai-ai-chat-widget *,
	#sediai-ai-chat-widget *::before,
	#sediai-ai-chat-widget *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}
