/* ITB Chatbot widget */
.itb-chatbot,
.itb-chatbot * {
	box-sizing: border-box;
}

.itb-chatbot {
	--itb-color: #2b6cb0;
	--itb-bg: #ffffff;
	--itb-text: #1f2733;
	--itb-muted: #6b7280;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--itb-text);
}

/* Floating wrapper */
.itb-chatbot--floating {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

/* Launcher button */
.itb-chatbot__launcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	cursor: pointer;
	background: var(--itb-color);
	color: #fff;
	padding: 12px 18px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.itb-chatbot__launcher svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Panel */
.itb-chatbot__panel {
	display: flex;
	flex-direction: column;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 120px);
	background: var(--itb-bg);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.24);
	border: 1px solid rgba(0, 0, 0, 0.08);
}
.itb-chatbot--floating .itb-chatbot__panel {
	margin-bottom: 12px;
	display: none;
}
.itb-chatbot--floating.is-open .itb-chatbot__panel {
	display: flex;
}
.itb-chatbot--floating.is-open .itb-chatbot__launcher {
	display: none;
}
.itb-chatbot--inline .itb-chatbot__panel {
	height: 480px;
	width: 100%;
	max-width: 100%;
}

/* Header */
.itb-chatbot__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--itb-color);
	color: #fff;
}
.itb-chatbot__titlewrap {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}
.itb-chatbot__title {
	font-weight: 700;
	font-size: 16px;
	margin: 0;
}
.itb-chatbot__ai-label {
	font-size: 11px;
	font-weight: 500;
	opacity: 0.8;
	line-height: 1.2;
}
.itb-chatbot__close {
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 6px;
}
.itb-chatbot__close:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* Messages */
.itb-chatbot__messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f7f8fa;
}
.itb-chatbot__msg {
	max-width: 85%;
	padding: 10px 13px;
	border-radius: 14px;
	white-space: normal;
	word-wrap: break-word;
}
.itb-chatbot__msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom-left-radius: 4px;
}
.itb-chatbot__msg--user {
	align-self: flex-end;
	background: var(--itb-color);
	color: #fff;
	border-bottom-right-radius: 4px;
}

/* Typing indicator */
.itb-chatbot__typing {
	align-self: flex-start;
	display: inline-flex;
	gap: 4px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
}
.itb-chatbot__typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--itb-muted);
	opacity: 0.5;
	animation: itb-bounce 1.2s infinite ease-in-out;
}
.itb-chatbot__typing span:nth-child(2) {
	animation-delay: 0.2s;
}
.itb-chatbot__typing span:nth-child(3) {
	animation-delay: 0.4s;
}
@keyframes itb-bounce {
	0%, 80%, 100% {
		transform: translateY(0);
		opacity: 0.4;
	}
	40% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

/* Contact bar */
.itb-chatbot__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 16px;
	border-top: 1px solid rgba(0, 0, 0, 0.07);
	background: #fff;
}
.itb-chatbot__contact a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: var(--itb-color);
	border: 1px solid var(--itb-color);
	padding: 5px 10px;
	border-radius: 999px;
}
.itb-chatbot__contact a:hover {
	background: var(--itb-color);
	color: #fff;
}

/* Input */
.itb-chatbot__form {
	display: flex;
	gap: 8px;
	padding: 12px 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.07);
	background: #fff;
}
.itb-chatbot__input {
	flex: 1 1 auto;
	resize: none;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 15px;
	font-family: inherit;
	max-height: 96px;
	min-height: 42px;
}
.itb-chatbot__input:focus {
	outline: 2px solid var(--itb-color);
	outline-offset: -1px;
	border-color: var(--itb-color);
}
.itb-chatbot__submit {
	flex: 0 0 auto;
	border: 0;
	cursor: pointer;
	background: var(--itb-color);
	color: #fff;
	border-radius: 10px;
	padding: 0 16px;
	font-weight: 600;
	font-size: 14px;
}
.itb-chatbot__submit:disabled {
	opacity: 0.55;
	cursor: default;
}

.itb-chatbot__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 480px) {
	.itb-chatbot--floating {
		right: 12px;
		bottom: 12px;
	}
	.itb-chatbot__panel {
		width: calc(100vw - 24px);
		height: calc(100vh - 90px);
	}
}

/* --- Launcher shapes (default icon button) --- */
.itb-chatbot__launcher--circle,
.itb-chatbot__launcher--square {
	padding: 0;
	width: 60px;
	height: 60px;
	justify-content: center;
}
.itb-chatbot__launcher--circle {
	border-radius: 50%;
}
.itb-chatbot__launcher--square {
	border-radius: 16px;
}
.itb-chatbot__launcher--circle svg,
.itb-chatbot__launcher--square svg {
	width: 26px;
	height: 26px;
}

/* Custom image launcher (GIF/PNG) */
.itb-chatbot__launcher--image {
	padding: 6px;
}
.itb-chatbot__launcher-img {
	display: block;
	width: auto;
	height: 100%;
	max-width: 56px;
	max-height: 56px;
	object-fit: contain;
	border-radius: inherit;
}
.itb-chatbot__launcher--circle.itb-chatbot__launcher--image .itb-chatbot__launcher-img,
.itb-chatbot__launcher--square.itb-chatbot__launcher--image .itb-chatbot__launcher-img {
	width: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: cover;
}

/* --- Idle effects --- */
.itb-chatbot__launcher--fx-pulse {
	position: relative;
}
.itb-chatbot__launcher--fx-pulse::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--itb-color);
	z-index: -1;
	animation: itb-pulse-ring 2s ease-out infinite;
}
@keyframes itb-pulse-ring {
	0% {
		transform: scale(1);
		opacity: 0.5;
	}
	100% {
		transform: scale(1.6);
		opacity: 0;
	}
}
.itb-chatbot__launcher--fx-glow {
	animation: itb-glow 1.8s ease-in-out infinite;
}
@keyframes itb-glow {
	0%, 100% {
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	}
	50% {
		box-shadow: 0 6px 26px rgba(0, 0, 0, 0.28), 0 0 18px var(--itb-color);
	}
}
.itb-chatbot__launcher--fx-bounce {
	animation: itb-bounce-btn 1.8s ease-in-out infinite;
}
@keyframes itb-bounce-btn {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-6px);
	}
}
.itb-chatbot__launcher--fx-shine {
	position: relative;
	overflow: hidden;
}
.itb-chatbot__launcher--fx-shine::before {
	content: "";
	position: absolute;
	top: 0;
	left: -120%;
	width: 60%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
	transform: skewX(-20deg);
	animation: itb-shine 2.6s ease-in-out infinite;
}
@keyframes itb-shine {
	0% {
		left: -120%;
	}
	60%, 100% {
		left: 140%;
	}
}

/* --- Hover effects --- */
.itb-chatbot__launcher--hv-lift:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}
.itb-chatbot__launcher--hv-grow:hover {
	transform: scale(1.08);
}
.itb-chatbot__launcher--hv-glow:hover {
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22), 0 0 16px var(--itb-color);
}
.itb-chatbot__launcher--hv-rotate:hover svg,
.itb-chatbot__launcher--hv-rotate:hover .itb-chatbot__launcher-img {
	transform: rotate(12deg) scale(1.06);
	transition: transform 0.2s ease;
}
.itb-chatbot__launcher--hv-shine {
	position: relative;
	overflow: hidden;
}
.itb-chatbot__launcher--hv-shine::after {
	content: "";
	position: absolute;
	top: 0;
	left: -120%;
	width: 60%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
	transform: skewX(-20deg);
}
.itb-chatbot__launcher--hv-shine:hover::after {
	animation: itb-shine 0.8s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
	.itb-chatbot__launcher,
	.itb-chatbot__launcher::before,
	.itb-chatbot__launcher::after {
		animation: none !important;
	}
}

/* --- Rich text (bot messages) --- */
.itb-chatbot__line {
	margin: 0 0 6px;
}
.itb-chatbot__line:last-child {
	margin-bottom: 0;
}
.itb-chatbot__msg--bot strong {
	font-weight: 700;
}
.itb-chatbot__msg--bot em {
	font-style: italic;
}
.itb-chatbot__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.92em;
	background: rgba(0, 0, 0, 0.06);
	padding: 1px 5px;
	border-radius: 5px;
}
.itb-chatbot__list {
	margin: 4px 0 6px;
	padding-left: 18px;
}
.itb-chatbot__list li {
	margin: 2px 0;
}
