/* Chat popup opened by the footer Smart Assistant icon. Colors match the 2026 header: navy #26325d, orange #f08f4f. */
.bal-chat[hidden] { display: none; }
.bal-chat {
	position: fixed;
	right: calc(24px + env(safe-area-inset-right, 0px));
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 100000;
	display: flex;
	flex-direction: column;
	width: 390px;
	height: min(640px, calc(100vh - 48px));
	height: min(640px, calc(100dvh - 48px));
	overflow: hidden;
	border: 1px solid #d6d7e3;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 16px 48px rgba(38, 31, 89, .28);
	color: #2d2d2d;
	font: 400 16px/1.5 "Open Sans", Arial, sans-serif;
	opacity: 0;
	transform: translateY(16px) scale(.98);
	transform-origin: bottom right;
	transition: opacity .2s ease, transform .2s ease;
}
.bal-chat.is-open { opacity: 1; transform: none; }
.bal-chat:focus { outline: none; }

.bal-chat__head {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
	padding: 14px 14px 14px 16px;
	border-bottom: 5px solid #f08f4f;
	background: #26325d;
	color: #fff;
}
.bal-chat__avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; object-fit: contain; }
.bal-chat__titles { flex: 1; min-width: 0; }
.bal-chat .bal-chat__title { margin: 0; padding: 0; color: #fff; font: 700 18px/1.25 "Open Sans", Arial, sans-serif; letter-spacing: 0; text-transform: none; }
.bal-chat .bal-chat__sub { margin: 2px 0 0; padding: 0; color: #dfe2f3; font-size: 13px; line-height: 1.35; }
.bal-chat__close {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	transition: background-color .15s ease;
}
.bal-chat__close:hover { background: rgba(255, 255, 255, .24); }
.bal-chat__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.bal-chat__body { position: relative; flex: 1; min-height: 0; background: #f6f7fb; }
.bal-chat__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.bal-chat__loading { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 8px; }
.bal-chat.is-loading .bal-chat__loading { display: flex; }
.bal-chat__loading span { width: 10px; height: 10px; border-radius: 50%; background: #7f87d9; animation: bal-chat-dot 1s ease-in-out infinite; }
.bal-chat__loading span:nth-child(2) { animation-delay: .15s; }
.bal-chat__loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bal-chat-dot { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.bal-chat .bal-chat__note { flex: none; margin: 0; padding: 8px 16px; border-top: 1px solid #e3e4ee; background: #fff; color: #5a5d73; font-size: 12px; line-height: 1.4; }

/* The panel covers the corner where the icon sits, so the icon steps aside while the chat is open. */
.bal-chat-open .et_pb_image_2_tb_footer { opacity: 0; pointer-events: none; }
/* The translate plugin's floating tab sits above the panel (z-index 200002) and would cover its corner. */
.bal-chat-open #glt-translate-trigger { display: none; }
.et_pb_image_2_tb_footer a:focus-visible { outline: 3px solid #26325d; outline-offset: 3px; border-radius: 50%; }

/* Phones: the chat fills the screen and the page behind it stops scrolling. */
@media (max-width: 600px) {
	.bal-chat {
		inset: 0;
		width: auto;
		height: 100vh;
		height: 100dvh;
		border: 0;
		border-radius: 0;
		padding-top: env(safe-area-inset-top, 0px);
		transform: translateY(24px);
		transform-origin: bottom center;
	}
	.bal-chat__head { padding-left: calc(16px + env(safe-area-inset-left, 0px)); padding-right: calc(14px + env(safe-area-inset-right, 0px)); }
	.bal-chat__note { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
	html.bal-chat-open, html.bal-chat-open body { overflow: hidden; }
}

/* Short landscape screens (phones turned sideways, small tablets). */
@media (max-height: 480px) and (min-width: 601px) {
	.bal-chat { height: calc(100vh - 24px); height: calc(100dvh - 24px); bottom: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.bal-chat { transition: none; transform: none; }
	.bal-chat__loading span { animation: none; opacity: .7; }
}
