/* Launcher + panel for the ThaiMICE Assistant iframe (the chat UI itself is
   styled inside the app). Header blue matches the app's banner. */

.mgw-chatbot-toggle {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(180deg, #2b84f5, #1554bd);
	border: none;
	box-shadow: 0 6px 18px rgba(21, 84, 189, 0.4);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	color: #fff;
	transition: transform 0.15s;
}
.mgw-chatbot-toggle:hover { transform: scale(1.05); }
.mgw-chatbot-toggle:focus-visible { outline: 3px solid #9cc2ff; outline-offset: 3px; }
.mgw-chatbot-toggle svg { width: 26px; height: 26px; }
/* Robot avatar fills the round button (the image has its own blue ring). */
.mgw-chatbot-toggle:has(img) { background: #fff; padding: 0; overflow: hidden; }
.mgw-chatbot-toggle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.mgw-chatbot-panel {
	position: fixed;
	right: 24px;
	bottom: 96px;
	width: 390px;
	height: min(680px, calc(100vh - 120px));
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 12px 36px rgba(15, 35, 80, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 9999;
}
.mgw-chatbot-panel[hidden] { display: none; }
/* The login prompt doesn't need the full chat height. */
.mgw-chatbot-panel:not(.is-app) { height: auto; }

.mgw-chatbot-frame {
	flex: 1;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #fff;
}

/* Login gate - logged-out visitors (no iframe). */
.mgw-chatbot-header {
	background: linear-gradient(180deg, #2b84f5, #1f6fe5);
	color: #fff;
	padding: 14px 16px;
	font-size: 15px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.mgw-chatbot-close {
	background: rgba(255, 255, 255, 0.18);
	border: none;
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}
.mgw-chatbot-gate-body { padding: 16px; }
.mgw-chatbot-gate-text {
	font-size: 14px;
	color: #475569;
	line-height: 1.6;
	margin: 0 0 12px;
}
.mgw-chatbot-gate-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.mgw-chatbot-gate-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid #1f6fe5;
	color: #1f6fe5;
	background: #fff;
}
.mgw-chatbot-gate-btn-primary {
	background: #1f6fe5;
	color: #fff;
}

/* Phones: the chat takes the whole screen; the app's own x closes it. */
@media (max-width: 520px) {
	.mgw-chatbot-panel.is-app {
		inset: 0;
		z-index: 100000; /* above the WP admin bar (99999) staff see when logged in */
		width: 100%;
		height: 100%;
		border-radius: 0;
	}
	.mgw-chatbot-panel:not(.is-app) { width: calc(100vw - 32px); right: 16px; }
	.mgw-chatbot-toggle { right: 16px; bottom: 16px; }
	html.mgw-chatbot-open .mgw-chatbot-toggle { display: none; }
	html.mgw-chatbot-open, html.mgw-chatbot-open body { overflow: hidden; }
}
