/* Scoped reset — overrides theme global button/input styles (e.g. Salepush). */
#virasat-chatbot-root,
#virasat-chatbot-root *,
#virasat-chatbot-root *::before,
#virasat-chatbot-root *::after {
	box-sizing: border-box;
}

#virasat-chatbot-root {
	--vc-primary: #2356a8;
	--vc-primary-dark: #1a4485;
	--vc-bg: #ffffff;
	--vc-text: #1f2937;
	--vc-muted: #6b7280;
	--vc-border: #e5e7eb;
	--vc-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
	position: fixed;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--vc-text);
	-webkit-font-smoothing: antialiased;
}

#virasat-chatbot-root.virasat-chatbot--bottom-right {
	right: 24px;
	bottom: 24px;
}

#virasat-chatbot-root.virasat-chatbot--bottom-left {
	left: 24px;
	bottom: 24px;
}

/* Theme-proof button reset */
#virasat-chatbot-root button {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 500;
	letter-spacing: normal;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	vertical-align: middle;
	cursor: pointer;
	overflow: visible;
	box-shadow: none;
	outline: none;
	transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

#virasat-chatbot-root button:hover,
#virasat-chatbot-root button:focus,
#virasat-chatbot-root button:active {
	background: none;
	color: inherit;
	box-shadow: none;
	outline: none;
}

#virasat-chatbot-root input {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	font: inherit;
	line-height: 1.5;
	letter-spacing: normal;
	text-transform: none;
	border-radius: 0;
	box-shadow: none;
}

#virasat-chatbot-root form {
	margin: 0;
	padding: 0;
}

/* Floating toggle */
#virasat-chatbot-root .virasat-chatbot__toggle {
	width: 58px;
	height: 58px;
	min-width: 58px;
	min-height: 58px;
	border-radius: 50%;
	background: var(--vc-primary);
	color: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

#virasat-chatbot-root .virasat-chatbot__toggle:hover,
#virasat-chatbot-root .virasat-chatbot__toggle:focus,
#virasat-chatbot-root .virasat-chatbot__toggle:active {
	background: var(--vc-primary-dark);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

#virasat-chatbot-root.is-open .virasat-chatbot__toggle {
	display: none;
}

#virasat-chatbot-root .virasat-chatbot__toggle-icon {
	display: block;
	width: 24px;
	height: 24px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Chat panel */
#virasat-chatbot-root .virasat-chatbot__panel {
	position: absolute;
	bottom: 0;
	width: 380px;
	max-width: calc(100vw - 32px);
	background: var(--vc-bg);
	border-radius: 16px;
	box-shadow: var(--vc-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	max-height: min(560px, calc(100vh - 48px));
	border: 1px solid var(--vc-border);
	overscroll-behavior: contain;
	touch-action: manipulation;
}

#virasat-chatbot-root .virasat-chatbot__panel[hidden] {
	display: none !important;
}

#virasat-chatbot-root.virasat-chatbot--bottom-right .virasat-chatbot__panel {
	right: 0;
}

#virasat-chatbot-root.virasat-chatbot--bottom-left .virasat-chatbot__panel {
	left: 0;
}

/* Header */
#virasat-chatbot-root .virasat-chatbot__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--vc-primary);
	color: #fff;
	flex-shrink: 0;
}

#virasat-chatbot-root .virasat-chatbot__header-info {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

#virasat-chatbot-root .virasat-chatbot__avatar {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

#virasat-chatbot-root .virasat-chatbot__title-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

#virasat-chatbot-root .virasat-chatbot__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#virasat-chatbot-root .virasat-chatbot__status {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	opacity: 0.92;
}

#virasat-chatbot-root .virasat-chatbot__status::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #4ade80;
	flex-shrink: 0;
}

#virasat-chatbot-root .virasat-chatbot__header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

#virasat-chatbot-root .virasat-chatbot__delete {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

#virasat-chatbot-root .virasat-chatbot__delete:hover,
#virasat-chatbot-root .virasat-chatbot__delete:focus,
#virasat-chatbot-root .virasat-chatbot__delete:active {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
}

#virasat-chatbot-root .virasat-chatbot__delete-icon {
	display: block;
	width: 16px;
	height: 16px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#virasat-chatbot-root .virasat-chatbot__close {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 20px;
	line-height: 1;
}

#virasat-chatbot-root .virasat-chatbot__close:hover,
#virasat-chatbot-root .virasat-chatbot__close:focus,
#virasat-chatbot-root .virasat-chatbot__close:active {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
}

/* Messages area */
#virasat-chatbot-root .virasat-chatbot__body {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	background: #f8fafc;
	overscroll-behavior: contain;
}

#virasat-chatbot-root .virasat-chatbot__messages {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 0;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
}

#virasat-chatbot-root .virasat-chatbot__message-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 88%;
}

#virasat-chatbot-root .virasat-chatbot__message-wrap--user {
	align-self: flex-end;
	align-items: flex-end;
}

#virasat-chatbot-root .virasat-chatbot__message-wrap--bot {
	align-self: flex-start;
	align-items: flex-start;
}

#virasat-chatbot-root .virasat-chatbot__message {
	max-width: 100%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.5;
	word-break: break-word;
}

#virasat-chatbot-root .virasat-chatbot__time {
	font-size: 11px;
	color: var(--vc-muted);
	line-height: 1.2;
	padding: 0 4px;
}

#virasat-chatbot-root .virasat-chatbot__date-divider {
	align-self: center;
	font-size: 11px;
	color: var(--vc-muted);
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--vc-border);
	border-radius: 999px;
	padding: 4px 12px;
	margin: 4px 0;
}

#virasat-chatbot-root .virasat-chatbot__message--bot {
	background: #fff;
	border: 1px solid var(--vc-border);
	color: var(--vc-text);
	border-bottom-left-radius: 4px;
}

#virasat-chatbot-root .virasat-chatbot__message--user {
	background: var(--vc-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

#virasat-chatbot-root .virasat-chatbot__typing {
	align-self: flex-start;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid var(--vc-border);
	border-radius: 14px;
}

#virasat-chatbot-root .virasat-chatbot__typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--vc-muted);
	animation: virasat-chatbot-typing 1.2s infinite ease-in-out;
}

#virasat-chatbot-root .virasat-chatbot__typing span:nth-child(2) {
	animation-delay: 0.15s;
}

#virasat-chatbot-root .virasat-chatbot__typing span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes virasat-chatbot-typing {
	0%, 80%, 100% {
		opacity: 0.35;
		transform: scale(0.85);
	}
	40% {
		opacity: 1;
		transform: scale(1);
	}
}

/* Quick reply chips */
#virasat-chatbot-root .virasat-chatbot__suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 16px 12px;
	flex-shrink: 0;
}

#virasat-chatbot-root .virasat-chatbot__suggestions[hidden] {
	display: none !important;
}

#virasat-chatbot-root .virasat-chatbot__suggestion {
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid var(--vc-primary);
	background: #fff;
	color: var(--vc-primary);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
	white-space: normal;
}

#virasat-chatbot-root .virasat-chatbot__suggestion:hover,
#virasat-chatbot-root .virasat-chatbot__suggestion:focus,
#virasat-chatbot-root .virasat-chatbot__suggestion:active {
	background: var(--vc-primary);
	color: #fff;
}

/* Scroll-to-bottom */
#virasat-chatbot-root .virasat-chatbot__scroll-down {
	position: absolute;
	right: 16px;
	bottom: 12px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--vc-primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 2;
}

#virasat-chatbot-root .virasat-chatbot__scroll-down:hover,
#virasat-chatbot-root .virasat-chatbot__scroll-down:focus,
#virasat-chatbot-root .virasat-chatbot__scroll-down:active {
	background: var(--vc-primary-dark);
	color: #fff;
}

#virasat-chatbot-root .virasat-chatbot__scroll-down[hidden] {
	display: none !important;
}

#virasat-chatbot-root .virasat-chatbot__scroll-down-icon {
	display: block;
	width: 14px;
	height: 14px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 16l-6-6h12l-6 6z'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 16l-6-6h12l-6 6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Input form */
#virasat-chatbot-root .virasat-chatbot__form {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--vc-border);
	background: #fff;
	flex-shrink: 0;
}

#virasat-chatbot-root .virasat-chatbot__input {
	flex: 1;
	min-width: 0;
	height: 42px;
	border: 1px solid var(--vc-border);
	border-radius: 999px;
	padding: 0 16px;
	font-size: 14px;
	background: #fff;
	color: var(--vc-text);
	outline: none;
}

#virasat-chatbot-root .virasat-chatbot__input::placeholder {
	color: var(--vc-muted);
	opacity: 1;
}

#virasat-chatbot-root .virasat-chatbot__input:focus {
	border-color: var(--vc-primary);
	box-shadow: 0 0 0 3px rgba(35, 86, 168, 0.15);
}

#virasat-chatbot-root .virasat-chatbot__send {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	min-width: 42px;
	border-radius: 50%;
	background: var(--vc-primary);
	color: #fff;
}

#virasat-chatbot-root .virasat-chatbot__send:hover,
#virasat-chatbot-root .virasat-chatbot__send:focus,
#virasat-chatbot-root .virasat-chatbot__send:active {
	background: var(--vc-primary-dark);
	color: #fff;
}

#virasat-chatbot-root .virasat-chatbot__send:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

#virasat-chatbot-root .virasat-chatbot__send-icon {
	display: block;
	width: 18px;
	height: 18px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3.4 20.4l17.45-7.48a1 1 0 0 0 0-1.84L3.4 3.6a1 1 0 0 0-1.52.86v6.12a1 1 0 0 0 .68.95l6.1 2.03-6.1 2.03a1 1 0 0 0-.68.95v6.12a1 1 0 0 0 1.52.86z'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3.4 20.4l17.45-7.48a1 1 0 0 0 0-1.84L3.4 3.6a1 1 0 0 0-1.52.86v6.12a1 1 0 0 0 .68.95l6.1 2.03-6.1 2.03a1 1 0 0 0-.68.95v6.12a1 1 0 0 0 1.52.86z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 768px) {
	#virasat-chatbot-root.is-open.virasat-chatbot--bottom-right,
	#virasat-chatbot-root.is-open.virasat-chatbot--bottom-left {
		right: 0;
		left: 0;
		bottom: 0;
		top: 0;
	}

	#virasat-chatbot-root.is-open .virasat-chatbot__panel {
		position: fixed;
		inset: 0;
		width: 100%;
		max-width: 100%;
		max-height: 100%;
		border-radius: 0;
		border: 0;
	}
}

@media (max-width: 480px) {
	#virasat-chatbot-root.virasat-chatbot--bottom-right,
	#virasat-chatbot-root.virasat-chatbot--bottom-left {
		right: 12px;
		left: 12px;
		bottom: 12px;
	}

	#virasat-chatbot-root:not(.is-open) .virasat-chatbot__panel {
		width: calc(100vw - 24px);
		max-height: calc(100vh - 24px);
	}
}

html.virasat-chatbot-open,
body.virasat-chatbot-open {
	overflow: hidden;
}

body.virasat-chatbot-open {
	position: fixed;
	left: 0;
	right: 0;
}
