/**
 * AGU Copilot Studio floating chatbot
 * Shortcode: [agu_chatbot]
 */

.agu-chatbot {
	--agu-chatbot-offset: 24px;
	--agu-chatbot-z: 99999;
}

.agu-chatbot__toggle {
	position: fixed;
	right: var(--agu-chatbot-offset);
	bottom: var(--agu-chatbot-offset);
	z-index: var(--agu-chatbot-z);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	/* box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); */
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.agu-chatbot__toggle:hover,
.agu-chatbot__toggle:focus-visible {
	transform: scale(1.05);
	/* box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3); */
	outline: none;
}

.agu-chatbot__toggle:focus-visible {
	box-shadow: 0 0 0 3px #fff, 0 0 0 6px #003b4a;
}

.agu-chatbot__toggle-icon {
	width: 50px;
	height: 50px;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

.agu-chatbot__panel {
	position: fixed;
	right: var(--agu-chatbot-offset);
	bottom: calc(var(--agu-chatbot-offset) + 76px);
	z-index: calc(var(--agu-chatbot-z) + 1);
	display: flex;
	flex-direction: column;
	width: min(400px, calc(100vw - 32px));
	height: min(600px, calc(100vh - 140px));
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

.agu-chatbot__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 59, 74, 0.9);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.agu-chatbot__close:hover,
.agu-chatbot__close:focus-visible {
	background: #003b4a;
	outline: none;
}

.agu-chatbot__iframe {
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
}

@media (max-width: 480px) {
	.agu-chatbot {
		--agu-chatbot-offset: 16px;
	}

	.agu-chatbot__toggle {
		width: 56px;
		height: 56px;
	}

	.agu-chatbot__toggle-icon {
		width: 30px;
		height: 30px;
	}

	.agu-chatbot__panel {
		right: 8px;
		left: 8px;
		width: auto;
		bottom: calc(var(--agu-chatbot-offset) + 68px);
		height: min(70vh, calc(100vh - 120px));
	}
}
