/**
 * AI Chatbot — frontend (style.css)
 * Prefix: jata-ai-chatbot
 */

/* Isolate widget from theme globals (Hello Elementor, Elementor, block themes). */
#jata-ai-chatbot-root {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-align: start;
	text-transform: none;
	letter-spacing: normal;
	contain: layout style;
}

#jata-ai-chatbot-root *,
#jata-ai-chatbot-root *::before,
#jata-ai-chatbot-root *::after {
	box-sizing: border-box;
}

#jata-ai-chatbot-root h1,
#jata-ai-chatbot-root h2,
#jata-ai-chatbot-root h3,
#jata-ai-chatbot-root h4,
#jata-ai-chatbot-root h5,
#jata-ai-chatbot-root h6 {
	font-family: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
	margin: 0;
	padding: 0;
	text-transform: none;
	letter-spacing: normal;
}

#jata-ai-chatbot-root p {
	margin: 0;
	padding: 0;
}

#jata-ai-chatbot-root a {
	text-decoration: none;
	background: transparent;
}

#jata-ai-chatbot-root button,
#jata-ai-chatbot-root input[type="button"],
#jata-ai-chatbot-root input[type="submit"],
#jata-ai-chatbot-root input[type="reset"] {
	-webkit-appearance: none;
	appearance: none;
	text-transform: none;
	letter-spacing: normal;
	width: auto;
	min-height: 0;
	line-height: normal;
	box-shadow: none;
	text-shadow: none;
}

#jata-ai-chatbot-root button::before,
#jata-ai-chatbot-root button::after,
#jata-ai-chatbot-root input[type="submit"]::before,
#jata-ai-chatbot-root input[type="submit"]::after {
	display: none !important;
	content: none !important;
}

#jata-ai-chatbot-root input[type="text"],
#jata-ai-chatbot-root input[type="search"],
#jata-ai-chatbot-root textarea {
	width: auto;
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	transition: none;
}

#jata-ai-chatbot-root form {
	margin: 0;
	padding: 0;
	width: auto;
}

#jata-ai-chatbot-root img {
	max-width: none;
	height: auto;
	border: 0;
	vertical-align: middle;
}

#jata-ai-chatbot-root .fa-solid,
#jata-ai-chatbot-root .fa-regular,
#jata-ai-chatbot-root .fa-brands,
#jata-ai-chatbot-root .fas,
#jata-ai-chatbot-root .far,
#jata-ai-chatbot-root .fab {
	font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
}

#jata-ai-chatbot-root .fa-solid,
#jata-ai-chatbot-root .fas {
	font-weight: 900 !important;
}

#jata-ai-chatbot-root .fa-regular,
#jata-ai-chatbot-root .far {
	font-weight: 400 !important;
}

#jata-ai-chatbot-root .fa-brands,
#jata-ai-chatbot-root .fab {
	font-family: "Font Awesome 6 Brands" !important;
	font-weight: 400 !important;
}

.jata-ai-chatbot {
	--jata-primary: #2563eb;
	--jata-accent: #2563eb;
	--jata-surface: #f9f9f9;
	--jata-white: #ffffff;
	--jata-body-bg: var(--jata-white);
	--jata-bot-bubble: #ffffff;
	--jata-text: #1f2937;
	--jata-text-on-dark: #ffffff;
	--jata-text-on-input: #1f2937;
	--jata-text-muted: #9ca3af;
	--jata-border: #e5e7eb;
	--jata-widget-border: #e5e7eb;
	--jata-online: #22c55e;
	--jata-shadow: 0 16px 48px rgba(37, 99, 235, 0.16);
	--jata-radius: 16px;
	--jata-offset-bottom: 24px;
	--jata-offset-side: 24px;
	--jata-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	position: fixed;
	bottom: var(--jata-offset-bottom);
	z-index: 999999;
	font-family: var(--jata-font);
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}

.jata-ai-chatbot--right {
	left: auto;
	right: var(--jata-offset-side);
}

.jata-ai-chatbot--left {
	right: auto;
	left: var(--jata-offset-side);
}

/* Screen reader */
#jata-ai-chatbot-root .jata-ai-chatbot-sr-only {
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	width: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	word-wrap: normal !important;
	border: 0 !important;
}

/* Floating action button — perfect circle */
#jata-ai-chatbot-root .jata-ai-chatbot-fab {
	position: relative;
	width: 60px !important;
	height: 60px !important;
	min-width: 60px !important;
	min-height: 60px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid var(--jata-widget-border, #e5e7eb) !important;
	border-radius: 50% !important;
	background: var(--jata-fab-bg, var(--jata-primary)) !important;
	background-color: var(--jata-fab-bg, var(--jata-primary)) !important;
	color: var(--jata-fab-icon, var(--jata-accent)) !important;
	cursor: pointer;
	box-shadow: var(--jata-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px !important;
	line-height: 1 !important;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, outline 0.2s ease;
}

.jata-ai-chatbot-fab {
	position: relative;
	width: 60px;
	height: 60px;
	min-width: 60px;
	min-height: 60px;
	padding: 0;
	margin: 0;
	border: 1px solid var(--jata-widget-border, #e5e7eb);
	border-radius: 50%;
	background: var(--jata-fab-bg, var(--jata-primary));
	color: var(--jata-fab-icon, var(--jata-accent));
	cursor: pointer;
	box-shadow: var(--jata-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	line-height: 1;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, outline 0.2s ease;
}

.jata-ai-chatbot.is-open .jata-ai-chatbot-fab {
	box-shadow: var(--jata-shadow);
	border-color: var(--jata-widget-border, #e5e7eb) !important;
}

.jata-ai-chatbot button.jata-ai-chatbot-fab:hover,
.jata-ai-chatbot button.jata-ai-chatbot-fab:focus,
.jata-ai-chatbot button.jata-ai-chatbot-fab:active {
	background: var(--jata-fab-bg, var(--jata-primary)) !important;
	background-color: var(--jata-fab-bg, var(--jata-primary)) !important;
	color: var(--jata-fab-icon, var(--jata-accent)) !important;
	border-color: var(--jata-widget-border, #e5e7eb) !important;
}

.jata-ai-chatbot-fab:hover {
	transform: scale(1.05);
	box-shadow: var(--jata-shadow);
	border-color: var(--jata-widget-border, #e5e7eb);
}

.jata-ai-chatbot.is-open .jata-ai-chatbot-fab:hover {
	box-shadow: var(--jata-shadow);
	border-color: var(--jata-widget-border, #e5e7eb) !important;
}

.jata-ai-chatbot-fab:focus-visible {
	outline: 2px solid var(--jata-accent);
	outline-offset: 3px;
	background: var(--jata-fab-bg, var(--jata-primary));
	background-color: var(--jata-fab-bg, var(--jata-primary));
}

/* Block theme button pseudo-elements that break the circle */
.jata-ai-chatbot-fab::before,
.jata-ai-chatbot-fab::after {
	display: none !important;
	content: none !important;
}

.jata-ai-chatbot-fab-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	line-height: 1;
	pointer-events: none;
}

.jata-ai-chatbot-fab-icon i {
	display: block;
	line-height: 1;
}

.jata-ai-chatbot-fab-icon--close {
	display: none;
}

.jata-ai-chatbot.is-open .jata-ai-chatbot-fab-icon--open {
	display: none;
}

.jata-ai-chatbot.is-open .jata-ai-chatbot-fab-icon--close {
	display: flex;
}

/* Panel */
.jata-ai-chatbot-panel {
	position: absolute;
	bottom: 76px;
	width: 380px;
	max-width: calc(100vw - (var(--jata-offset-side) * 2) - 16px);
	height: 560px;
	max-height: calc(100vh - var(--jata-offset-bottom) - 100px);
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: var(--jata-radius);
	box-shadow: var(--jata-shadow);
	border: 1px solid transparent;
	overflow: hidden;
	isolation: isolate;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, border-color 0.25s ease, box-shadow 0.25s ease;
}

.jata-ai-chatbot--right .jata-ai-chatbot-panel {
	right: 0;
	left: auto;
}

.jata-ai-chatbot--left .jata-ai-chatbot-panel {
	left: 0;
	right: auto;
}

#jata-ai-chatbot-root .jata-ai-chatbot.is-open .jata-ai-chatbot-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	border: 1px solid var(--jata-widget-border, #e5e7eb) !important;
	box-shadow: var(--jata-shadow);
}

.jata-ai-chatbot.is-open .jata-ai-chatbot-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	border: 1px solid var(--jata-widget-border, #e5e7eb);
	box-shadow: var(--jata-shadow);
}

.jata-ai-chatbot.is-open .jata-ai-chatbot-panel[hidden] {
	display: flex;
}

/* Header */
.jata-ai-chatbot-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--jata-header-bg, var(--jata-primary));
	color: #fff;
	flex-shrink: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.jata-ai-chatbot-header__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.jata-ai-chatbot-header__logo-wrap {
	flex-shrink: 0;
}

.jata-ai-chatbot-header__logo {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(255, 255, 255, 0.85);
}

.jata-ai-chatbot-header__logo-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	border: 2px solid rgba(255, 255, 255, 0.85);
	color: #ffffff;
	font-size: 20px;
}

.jata-ai-chatbot-header__logo-fallback .dashicons,
.jata-ai-chatbot-assistant-fallback .dashicons,
.jata-ai-chatbot-msg-avatar .dashicons {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.jata-ai-chatbot-header__logo-fallback .dashicons {
	width: 22px;
	height: 22px;
	font-size: 22px;
}

.jata-ai-chatbot-assistant-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--jata-primary);
	color: #ffffff;
}

.jata-ai-chatbot-assistant-fallback .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.jata-ai-chatbot-msg-avatar .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.jata-ai-chatbot-header__text {
	min-width: 0;
}

#jata-ai-chatbot-root .jata-ai-chatbot-header__title {
	margin: 0 !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	line-height: 1.2 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#jata-ai-chatbot-root .jata-ai-chatbot-header__subtitle {
	margin: 2px 0 0 !important;
	font-size: 12px !important;
	color: rgba(255, 255, 255, 0.85) !important;
	display: flex;
	align-items: center;
	gap: 6px;
}

.jata-ai-chatbot-header__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jata-ai-chatbot-header__subtitle {
	margin: 2px 0 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.85);
	display: flex;
	align-items: center;
	gap: 6px;
}

.jata-ai-chatbot-status-dot {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--jata-online);
	flex-shrink: 0;
	z-index: 1;
}

.jata-ai-chatbot-status-dot::before,
.jata-ai-chatbot-status-dot::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: rgba(34, 197, 94, 0.45);
	pointer-events: none;
	animation: jata-ai-chatbot-status-glow 2.4s ease-out infinite;
}

.jata-ai-chatbot-status-dot::after {
	animation-delay: 1.2s;
}

@keyframes jata-ai-chatbot-status-glow {
	0% {
		transform: scale(1);
		opacity: 0.75;
	}

	100% {
		transform: scale(3.2);
		opacity: 0;
	}
}

#jata-ai-chatbot-root .jata-ai-chatbot-header__close {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	color: rgba(255, 255, 255, 0.9) !important;
	font-size: 20px !important;
	cursor: pointer;
	padding: 6px !important;
	line-height: 1 !important;
	border-radius: 6px !important;
	min-height: 0 !important;
	width: auto !important;
	transition: background 0.15s ease, color 0.15s ease;
}

#jata-ai-chatbot-root .jata-ai-chatbot-header__close:hover,
#jata-ai-chatbot-root .jata-ai-chatbot-header__close:focus {
	background: rgba(255, 255, 255, 0.1) !important;
	background-color: rgba(255, 255, 255, 0.1) !important;
	color: #fff !important;
}

.jata-ai-chatbot-header__close {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.9);
	font-size: 20px;
	cursor: pointer;
	padding: 6px;
	line-height: 1;
	border-radius: 6px;
	transition: background 0.15s ease, color 0.15s ease;
}

.jata-ai-chatbot-header__close:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.jata-ai-chatbot-header__close:focus-visible {
	outline: 2px solid var(--jata-accent);
	outline-offset: 2px;
}

/* Messages area */
#jata-ai-chatbot-root .jata-ai-chatbot-messages {
	flex: 1;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 16px 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
	background: var(--jata-messages-bg, var(--jata-surface, #f9f9f9)) !important;
	min-width: 0;
}

.jata-ai-chatbot-messages {
	flex: 1;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 16px 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
	background: var(--jata-messages-bg, var(--jata-surface, #f9f9f9));
	min-width: 0;
}

.jata-ai-chatbot-messages::-webkit-scrollbar {
	width: 6px;
}

.jata-ai-chatbot-messages::-webkit-scrollbar-track {
	background: transparent;
}

.jata-ai-chatbot-messages::-webkit-scrollbar-thumb {
	background: rgba(37, 99, 235, 0.28);
	border-radius: 3px;
}

/* Message rows */
.jata-ai-chatbot-msg-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.jata-ai-chatbot-msg-row--user {
	flex-direction: row-reverse;
	align-self: flex-end;
	width: 100%;
	max-width: 100%;
}

.jata-ai-chatbot-msg-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	flex-shrink: 0;
	object-fit: cover;
	background: var(--jata-primary);
	color: var(--jata-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	overflow: hidden;
}

.jata-ai-chatbot-msg-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jata-ai-chatbot-msg-wrap {
	max-width: calc(100% - 40px);
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.jata-ai-chatbot-msg-row--user .jata-ai-chatbot-msg-wrap {
	align-items: flex-end;
	max-width: 88%;
}

/* Bubbles */
.jata-ai-chatbot-bubble {
	padding: 10px 14px;
	border-radius: 12px;
	max-width: 100%;
	font-size: 14px;
	line-height: 1.5;
	overflow-wrap: anywhere;
	word-break: break-word;
	white-space: pre-wrap;
	overflow-x: hidden;
}

.jata-ai-chatbot-bubble--bot {
	background: var(--jata-bot-bubble);
	color: var(--jata-text);
	border: 1px solid var(--jata-border);
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.jata-ai-chatbot-bubble--bot a {
	color: var(--jata-primary);
	font-weight: 600;
}

.jata-ai-chatbot-bubble--notification {
	border-left: 3px solid var(--jata-accent);
	background: rgba(255, 255, 255, 0.97);
}

.jata-ai-chatbot-bubble--user {
	background: #C0C0C0;
	color: #000000;
	border-bottom-right-radius: 4px;
	font-weight: 500;
}

.jata-ai-chatbot-bubble--user a {
	color: #ffffff;
	font-weight: 600;
}

#jata-ai-chatbot-root .jata-ai-chatbot-bubble p {
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	overflow-wrap: anywhere;
	word-break: break-word;
}

#jata-ai-chatbot-root .jata-ai-chatbot-bubble p:last-child {
	margin-bottom: 0 !important;
}

#jata-ai-chatbot-root .jata-ai-chatbot-bubble a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	overflow-wrap: anywhere;
	word-break: break-all;
}

#jata-ai-chatbot-root .jata-ai-chatbot-bubble--bot a {
	color: var(--jata-primary) !important;
}

#jata-ai-chatbot-root .jata-ai-chatbot-bubble--user a {
	color: #ffffff !important;
}

.jata-ai-chatbot-bubble p {
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 1.5;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.jata-ai-chatbot-bubble p:last-child {
	margin-bottom: 0;
}

.jata-ai-chatbot-bubble a {
	overflow-wrap: anywhere;
	word-break: break-all;
}

.jata-ai-chatbot-msg-time {
	font-size: 10px;
	color: #35373b;
	margin-top: 4px;
	text-align: right;
}

.jata-ai-chatbot-msg-row--user .jata-ai-chatbot-msg-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	justify-content: flex-end;
	margin-top: 4px;
}

.jata-ai-chatbot-msg-row--user .jata-ai-chatbot-msg-meta .jata-ai-chatbot-msg-time {
	color: #35373b;
	margin-top: 0;
	font-size: 11px;
}

.jata-ai-chatbot-read-receipt {
	color: rgba(255, 255, 255, 0.9);
	font-size: 11px;
	line-height: 1;
}

/* Action buttons */
.jata-ai-chatbot-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-top: 4px;
	padding-left: 36px;
}

#jata-ai-chatbot-root .jata-ai-chatbot-action-btn {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	width: 100%;
	padding: 12px 14px !important;
	background: transparent !important;
	background-color: transparent !important;
	color: var(--jata-accent) !important;
	border: 1px solid var(--jata-accent) !important;
	border-radius: 8px !important;
	font-family: inherit;
	font-size: 13px !important;
	font-weight: 600 !important;
	cursor: pointer;
	text-align: start;
	min-height: 0 !important;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#jata-ai-chatbot-root .jata-ai-chatbot-action-btn:hover,
#jata-ai-chatbot-root .jata-ai-chatbot-action-btn:focus,
#jata-ai-chatbot-root .jata-ai-chatbot-action-btn:focus-visible {
	background: rgba(37, 99, 235, 0.08) !important;
	background-color: rgba(37, 99, 235, 0.08) !important;
	color: var(--jata-accent) !important;
	border-color: var(--jata-accent) !important;
	outline: none;
}

.jata-ai-chatbot-action-btn {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	width: 100%;
	padding: 12px 14px;
	background: transparent;
	color: var(--jata-accent);
	border: 1px solid var(--jata-accent);
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-align: start;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.jata-ai-chatbot-action-btn:hover,
.jata-ai-chatbot-action-btn:focus-visible {
	background: rgba(37, 99, 235, 0.08);
	color: var(--jata-accent);
	border-color: var(--jata-accent);
	outline: none;
}

.jata-ai-chatbot-action-btn__icon {
	width: 20px;
	text-align: center;
	flex-shrink: 0;
	font-size: 15px;
}

.jata-ai-chatbot-action-btn__label {
	flex: 1;
	min-width: 0;
	text-align: start;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.jata-ai-chatbot-action-btn__chevron {
	flex-shrink: 0;
	opacity: 0.85;
	font-size: 12px;
}

/* Redirect card */
.jata-ai-chatbot-card {
	margin: 8px 0;
	padding: 24px 20px;
	background: var(--jata-primary);
	border-radius: 12px;
	text-align: center;
	color: #fff;
	max-width: 100%;
	min-width: 0;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.jata-ai-chatbot-card__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: rgba(37, 99, 235, 0.1);
	border: 2px solid var(--jata-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	color: var(--jata-accent);
}

.jata-ai-chatbot-card__title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
}

.jata-ai-chatbot-card__desc {
	margin: 0 0 16px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.5;
}

#jata-ai-chatbot-root .jata-ai-chatbot-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	color: var(--jata-primary) !important;
	border: 1px solid rgba(255, 255, 255, 0.9) !important;
	border-radius: 8px !important;
	font-family: inherit;
	font-size: 14px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	cursor: pointer;
	min-height: 0 !important;
	width: auto !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#jata-ai-chatbot-root .jata-ai-chatbot-card__cta:hover,
#jata-ai-chatbot-root .jata-ai-chatbot-card__cta:focus {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
	color: #ffffff !important;
	background: var(--jata-accent) !important;
	background-color: var(--jata-accent) !important;
}

.jata-ai-chatbot-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	background: #ffffff;
	color: var(--jata-primary);
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jata-ai-chatbot-card__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
	color: #ffffff;
	background: var(--jata-accent);
}

/* Footer / input */
#jata-ai-chatbot-root .jata-ai-chatbot-footer {
	flex-shrink: 0;
	padding: 14px 16px 16px;
	background: var(--jata-footer-bg, var(--jata-header-bg, var(--jata-primary))) !important;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.jata-ai-chatbot-footer {
	flex-shrink: 0;
	padding: 14px 16px 16px;
	background: var(--jata-footer-bg, var(--jata-header-bg, var(--jata-primary)));
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 0 0 var(--jata-radius) var(--jata-radius);
}

#jata-ai-chatbot-root .jata-ai-chatbot-form {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 48px;
	border: 1px solid #e5e7eb !important;
	border-radius: 24px !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	overflow: hidden;
	margin: 0 !important;
	padding: 0 !important;
}

.jata-ai-chatbot-form {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 48px;
	border: 1px solid #e5e7eb;
	border-radius: 24px;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	overflow: hidden;
}

.jata-ai-chatbot-form:focus-within {
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 1px 2px rgba(15, 23, 42, 0.05);
	border-color: #2563eb !important;
}

#jata-ai-chatbot-root .jata-ai-chatbot .jata-ai-chatbot-input,
#jata-ai-chatbot-root .jata-ai-chatbot .jata-ai-chatbot-input:hover,
#jata-ai-chatbot-root .jata-ai-chatbot .jata-ai-chatbot-input:focus,
#jata-ai-chatbot-root .jata-ai-chatbot .jata-ai-chatbot-input:active {
	flex: 1;
	width: 100% !important;
	min-width: 0;
	border: none !important;
	border-width: 0 !important;
	border-radius: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	padding: 12px 50px 12px 16px !important;
	margin: 0 !important;
	font-family: inherit;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #111827 !important;
	background: transparent !important;
	background-color: transparent !important;
	-webkit-appearance: none;
	appearance: none;
}

.jata-ai-chatbot .jata-ai-chatbot-input,
.jata-ai-chatbot .jata-ai-chatbot-input:hover,
.jata-ai-chatbot .jata-ai-chatbot-input:focus,
.jata-ai-chatbot .jata-ai-chatbot-input:active {
	flex: 1;
	width: 100%;
	min-width: 0;
	border: none !important;
	border-width: 0 !important;
	border-radius: 0;
	outline: none !important;
	box-shadow: none !important;
	padding: 12px 50px 12px 16px;
	margin: 0;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	color: #111827;
	background: transparent !important;
	background-color: transparent !important;
	-webkit-appearance: none;
	appearance: none;
}

.jata-ai-chatbot-input::placeholder {
	color: #9ca3af;
	opacity: 1;
}

#jata-ai-chatbot-root .jata-ai-chatbot-send {
	position: absolute;
	right: 8px;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	width: 34px !important;
	height: 34px !important;
	flex-shrink: 0;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #2563eb !important;
	background-color: #2563eb !important;
	color: #ffffff !important;
	font-size: 15px !important;
	line-height: 1 !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	overflow: hidden;
	min-height: 0 !important;
	transition: opacity 0.15s ease;
}

.jata-ai-chatbot-send {
	position: absolute;
	right: 8px;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: #2563eb;
	color: #ffffff;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	overflow: hidden;
	transition: opacity 0.15s ease;
}

#jata-ai-chatbot-root .jata-ai-chatbot button.jata-ai-chatbot-send:hover,
#jata-ai-chatbot-root .jata-ai-chatbot button.jata-ai-chatbot-send:focus,
#jata-ai-chatbot-root .jata-ai-chatbot button.jata-ai-chatbot-send:active {
	background: #1d4ed8 !important;
	background-color: #1d4ed8 !important;
	color: #ffffff !important;
	transform: translateY(-50%);
	box-shadow: none;
}

.jata-ai-chatbot button.jata-ai-chatbot-send:hover,
.jata-ai-chatbot button.jata-ai-chatbot-send:focus,
.jata-ai-chatbot button.jata-ai-chatbot-send:active {
	background: #1d4ed8 !important;
	background-color: #1d4ed8 !important;
	color: #ffffff !important;
	transform: translateY(-50%);
	box-shadow: none;
}

.jata-ai-chatbot-send i {
	color: #ffffff;
}

.jata-ai-chatbot-send::before,
.jata-ai-chatbot-send::after {
	display: none !important;
	content: none !important;
}

.jata-ai-chatbot-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: translateY(-50%);
}

.jata-ai-chatbot-send:focus-visible {
	outline: 2px solid var(--jata-accent);
	outline-offset: 2px;
	background: var(--jata-accent);
	background-color: var(--jata-accent);
}

/* Unread badge on FAB */
.jata-ai-chatbot-fab-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: #ef4444;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 0 0 2px #ffffff;
	display: none;
	pointer-events: none;
}

.jata-ai-chatbot-fab-badge.is-visible {
	display: block;
}

.jata-ai-chatbot.is-open .jata-ai-chatbot-fab-badge {
	display: none;
}

/* Offline status dot */
.jata-ai-chatbot-status-dot--offline {
	background: #9ca3af !important;
}

.jata-ai-chatbot-status-dot--offline::before,
.jata-ai-chatbot-status-dot--offline::after {
	display: none;
}

/* Typing indicator */
.jata-ai-chatbot-typing {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 12px 14px;
}

.jata-ai-chatbot-typing-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--jata-text-muted, #9ca3af);
	opacity: 0.4;
	animation: jata-ai-chatbot-typing-bounce 1.1s infinite ease-in-out;
}

.jata-ai-chatbot-typing-dot:nth-child(2) {
	animation-delay: 0.15s;
}

.jata-ai-chatbot-typing-dot:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes jata-ai-chatbot-typing-bounce {
	0%,
	60%,
	100% {
		opacity: 0.4;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

/* Attach button */
.jata-ai-chatbot-attach-btn {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	margin-left: 6px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b7280;
	font-size: 15px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.jata-ai-chatbot-attach-btn:hover,
.jata-ai-chatbot-attach-btn:focus-visible {
	background: rgba(37, 99, 235, 0.1);
	color: var(--jata-primary, #2563eb);
}

.jata-ai-chatbot-attach-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Attachment bubbles */
.jata-ai-chatbot-attachment {
	padding: 6px !important;
	overflow: hidden;
}

.jata-ai-chatbot-attachment__img {
	display: block;
	max-width: 100%;
	max-height: 200px;
	border-radius: 8px;
	object-fit: cover;
}

.jata-ai-chatbot-attachment__file {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 6px;
	color: inherit;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
}

/* Pre-chat contact form */
.jata-ai-chatbot-messages[hidden],
.jata-ai-chatbot-footer[hidden],
.jata-ai-chatbot-precontact[hidden] {
	display: none !important;
}

.jata-ai-chatbot-precontact {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow-y: auto;
	padding: 24px;
	background: var(--jata-messages-bg, #f9fafb);
}

.jata-ai-chatbot-precontact__inner {
	max-width: 320px;
	margin: 0 auto;
	width: 100%;
}

.jata-ai-chatbot-precontact__title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}

.jata-ai-chatbot-precontact__subtitle {
	margin: 0 0 18px;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
}

.jata-ai-chatbot-precontact__label {
	display: block;
	margin-bottom: 12px;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
}

.jata-ai-chatbot-precontact__optional {
	font-weight: 400;
	color: #9ca3af;
	text-transform: none;
}

.jata-ai-chatbot-precontact__input {
	display: block;
	width: 100%;
	margin-top: 5px;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	color: #111827;
	background: #ffffff;
	box-sizing: border-box;
}

.jata-ai-chatbot-precontact__input:focus {
	outline: none;
	border-color: var(--jata-primary, #2563eb);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.jata-ai-chatbot-precontact__error {
	margin: 0 0 12px;
	padding: 8px 10px;
	border-radius: 6px;
	background: #fee2e2;
	color: #b91c1c;
	font-size: 12px;
}

.jata-ai-chatbot-precontact__submit {
	width: 100%;
	padding: 11px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--jata-primary, #2563eb);
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.jata-ai-chatbot-precontact__submit:hover {
	opacity: 0.92;
}

/* Error state */
.jata-ai-chatbot-error {
	padding: 10px 14px;
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
	border-radius: 8px;
	font-size: 13px;
	text-align: center;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* Mobile & small tablets */
@media (max-width: 600px) {
	.jata-ai-chatbot-panel {
		width: calc(100vw - (var(--jata-offset-side) * 2) - 8px);
		height: clamp(360px, 68dvh, 480px);
		max-height: clamp(360px, 68dvh, 480px);
		bottom: 72px;
	}

	.jata-ai-chatbot-messages {
		min-height: 0;
	}

	.jata-ai-chatbot-actions {
		padding-left: 0;
	}
}

@supports not (height: 1dvh) {
	@media (max-width: 600px) {
		.jata-ai-chatbot-panel {
			height: clamp(360px, 68vh, 480px);
			max-height: clamp(360px, 68vh, 480px);
		}
	}
}

/* Screen reader — legacy alias */
#jata-ai-chatbot-root .screen-reader-text,
#jata-ai-chatbot-root .jata-ai-chatbot-sr-only {
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	width: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	word-wrap: normal !important;
	border: 0 !important;
}

/* Premium pre-chat contact form */
.jata-ai-chatbot-precontact__inner {
	padding: 22px;
	background: rgba(255,255,255,.96);
	border: 1px solid rgba(17,24,39,.08);
	border-radius: 18px;
	box-shadow: 0 14px 40px rgba(15,23,42,.08);
}
.jata-ai-chatbot-precontact__title { font-size: 20px; letter-spacing: -.02em; }
.jata-ai-chatbot-precontact__subtitle { margin-bottom: 22px; }
.jata-ai-chatbot-precontact__label { margin-bottom: 14px; }
.jata-ai-chatbot-precontact__input { min-height: 44px; border-radius: 10px; transition: border-color .15s, box-shadow .15s, background .15s; }
.jata-ai-chatbot-precontact__input:hover { border-color: #9ca3af; }
.jata-ai-chatbot-precontact__submit { min-height: 44px; border-radius: 10px; box-shadow: 0 8px 18px rgba(37,99,235,.18); }


/* Professional pre-chat contact card */
#jata-ai-chatbot-root .jata-ai-chatbot-precontact {
	background: linear-gradient(180deg, rgba(248,250,252,.98), #fff);
	padding: 18px;
}
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__inner {
	width: 100%;
	padding: 20px;
	border: 1px solid rgba(15,23,42,.08);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(15,23,42,.10);
}
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__hero {
	display:flex; align-items:center; gap:12px; margin-bottom:10px;
}
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__hero-icon {
	width:42px; height:42px; border-radius:13px; display:flex; align-items:center; justify-content:center;
	background: color-mix(in srgb, var(--jata-primary) 12%, white); color:var(--jata-primary); font-size:17px; flex:0 0 42px;
}
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__eyebrow {
	display:block; font-size:10px; line-height:1; text-transform:uppercase; letter-spacing:.12em; font-weight:700; color:#94a3b8; margin-bottom:5px;
}
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__title { font-size:21px; font-weight:750; color:#0f172a; letter-spacing:-.025em; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__subtitle { color:#64748b; font-size:12.5px; line-height:1.55; margin:0 0 18px; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__label { display:block; margin:0 0 13px; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__label-text { display:flex; align-items:center; gap:7px; color:#334155; font-size:11px; font-weight:700; margin-bottom:7px; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__label-text i { width:15px; text-align:center; color:var(--jata-primary); }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__input { width:100% !important; min-height:46px; border:1px solid #e2e8f0 !important; border-radius:12px !important; background:#f8fafc !important; padding:0 13px !important; color:#0f172a !important; font-size:13px !important; outline:none; transition:border-color .15s, box-shadow .15s, background .15s; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__input:focus { background:#fff !important; border-color:var(--jata-primary) !important; box-shadow:0 0 0 3px color-mix(in srgb, var(--jata-primary) 12%, transparent) !important; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__optional { color:#94a3b8; font-weight:500; margin-left:3px; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__trust { display:flex; align-items:flex-start; gap:7px; color:#94a3b8; font-size:10px; line-height:1.45; margin:4px 0 13px; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__trust i { color:#22c55e; margin-top:2px; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__submit { width:100% !important; min-height:46px; display:flex; align-items:center; justify-content:center; gap:9px; border:0 !important; border-radius:12px !important; background:var(--jata-primary) !important; color:#fff !important; font-size:13px !important; font-weight:750 !important; cursor:pointer; box-shadow:0 9px 20px color-mix(in srgb, var(--jata-primary) 25%, transparent) !important; transition:transform .15s, filter .15s; }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__submit:hover { filter:brightness(.96); transform:translateY(-1px); }
#jata-ai-chatbot-root .jata-ai-chatbot-precontact__submit:disabled { opacity:.65; transform:none; cursor:wait; }
