.copilot-chat {
	--copilot-blue: #003594;
	--copilot-gold: #ffb81c;
	position: fixed;
	right: max(24px, env(safe-area-inset-right));
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: 99990;
	font: 16px/1.5 Arial, Helvetica, sans-serif;
	color: #172b4d;
	text-align: left;
}

.copilot-chat[hidden],
.copilot-chat [hidden] {
	display: none !important;
}

.copilot-chat__launcher,
.copilot-chat__close,
.copilot-chat__retry {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 12px 20px;
	min-height: 48px;
	border: 0;
	border-radius: 999px;
	background: var(--copilot-blue);
	color: #fff;
	font: 600 16px/1.3 Arial, Helvetica, sans-serif;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.copilot-chat__launcher {
	float: right;
	max-width: calc(100vw - 32px);
	box-shadow: 0 5px 24px rgb(0 24 70 / 24%);
	border: 2px solid var(--copilot-gold);
}

.copilot-chat__launcher svg,
.copilot-chat__close svg {
	flex-shrink: 0;
}

.copilot-chat__launcher:hover,
.copilot-chat__retry:hover {
	background: #00246a;
	color: #fff;
}

.copilot-chat__launcher:focus-visible,
.copilot-chat__close:focus-visible,
.copilot-chat__retry:focus-visible {
	outline: 3px solid var(--copilot-gold);
	outline-offset: 3px;
}

.copilot-chat__panel {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: min(400px, calc(100vw - 48px));
	height: min(590px, calc(100vh - 140px));
	height: min(590px, calc(100dvh - 140px));
	margin: 0 0 14px;
	padding: 0;
	overflow: hidden;
	border: 1px solid #d8dfeb;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 50px rgb(0 24 70 / 22%);
}

.copilot-chat__header {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 16px 18px 20px;
	background: var(--copilot-blue);
	color: #fff;
	border-bottom: 3px solid var(--copilot-gold);
}

.copilot-chat__eyebrow {
	margin: 0 0 3px;
	color: var(--copilot-gold);
	font: 600 12px/1.4 Arial, Helvetica, sans-serif;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.copilot-chat__title {
	margin: 0;
	padding: 0;
	color: #fff;
	font: 600 19px/1.3 Arial, Helvetica, sans-serif;
	text-transform: none;
	letter-spacing: normal;
}

.copilot-chat__close {
	flex-shrink: 0;
	width: 44px;
	min-height: 44px;
	padding: 10px;
	border-radius: 50%;
	background: transparent;
}

.copilot-chat__close:hover {
	background: rgb(255 255 255 / 15%);
	color: #fff;
}

.copilot-chat__body {
	position: relative;
	flex: 1;
	min-height: 0;
}

.copilot-chat__webchat {
	height: 100%;
	width: 100%;
}

.copilot-chat__status {
	box-sizing: border-box;
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 28px;
	background: #fff;
	text-align: center;
}

.copilot-chat__status-text {
	margin: 0;
	font: 16px/1.6 Arial, Helvetica, sans-serif;
}

.copilot-chat__retry {
	border-radius: 8px;
}

.copilot-chat__note {
	flex-shrink: 0;
	margin: 0;
	padding: 10px 14px;
	border-top: 1px solid #e4e8ef;
	background: #f7f8fb;
	color: #526079;
	font: 12px/1.4 Arial, Helvetica, sans-serif;
	text-align: center;
}

@media (max-width: 480px) {
	.copilot-chat {
		right: max(12px, env(safe-area-inset-right));
		bottom: max(12px, env(safe-area-inset-bottom));
	}

	.copilot-chat__panel {
		width: calc(100vw - 24px - env(safe-area-inset-right) - env(safe-area-inset-left));
		height: min(590px, calc(100vh - 120px));
		height: min(590px, calc(100dvh - 120px - env(safe-area-inset-bottom)));
		margin-bottom: 10px;
	}
}

@media print {
	.copilot-chat { display: none !important; }
}
