/*
 * RPCN Chatbot: the chat button. Loaded on every page, kept small.
 * Sits 30 pixels in from the corner, in line with the round back to top
 * button, and moves up above it while that button shows. While the cookie
 * notice shows, both sit above it.
 */

.rpcn-cb {
	--rpcn-cb-teal: #007f7b;
	--rpcn-cb-teal-dark: #00605d;
	--rpcn-cb-gap: 30px;
	--rpcn-cb-bottom: calc(var(--rpcn-notice-h, 0px) + 30px);
}

.rpcn-cb.rpcn-cb--lifted {
	--rpcn-cb-bottom: calc(var(--rpcn-notice-h, 0px) + 96px);
}

.rpcn-cb .rpcn-cb__launcher {
	position: fixed;
	right: var(--rpcn-cb-gap);
	bottom: var(--rpcn-cb-bottom);
	z-index: 99980;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	min-height: 52px;
	margin: 0;
	padding: 7px 20px 7px 7px;
	border: 0;
	border-radius: 999px;
	background: var(--rpcn-cb-teal);
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	font: 500 15px/1.2 "Roboto Condensed", "Roboto", "Helvetica Neue", Arial, sans-serif;
	letter-spacing: 0.5px;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: bottom 0.25s ease, background-color 0.15s ease, transform 0.15s ease;
}

.rpcn-cb .rpcn-cb__launcher:hover,
.rpcn-cb .rpcn-cb__launcher:focus {
	background: var(--rpcn-cb-teal-dark);
	color: #fff;
	text-decoration: none;
}

.rpcn-cb .rpcn-cb__launcher:focus-visible {
	outline: 3px solid #e8a400;
	outline-offset: 3px;
}

/* The Nation's emblem in a white circle. */
.rpcn-cb .rpcn-cb__launcher-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #fff;
}

.rpcn-cb .rpcn-cb__launcher-icon img {
	display: block;
	width: 28px;
	height: 30px;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: contain;
}

/* The Beta tag: a soft, faded bubble on the corner of the button. */
.rpcn-cb .rpcn-cb__preview {
	position: absolute;
	top: -10px;
	right: 8px;
	padding: 0 8px;
	border: 1px solid #cddcda;
	border-radius: 999px;
	background: #e8f0ef;
	color: #3d6663;
	font: 600 10px/1.6 "Roboto", Arial, sans-serif;
	letter-spacing: 0.4px;
	text-transform: none;
	white-space: nowrap;
}

.rpcn-cb.is-loading .rpcn-cb__launcher-icon {
	animation: rpcn-cb-pulse 0.9s ease-in-out infinite;
}

@keyframes rpcn-cb-pulse {
	50% {
		opacity: 0.35;
	}
}

/* Open on a computer: the button becomes a round close button under the panel. */
.rpcn-cb.is-open .rpcn-cb__launcher {
	padding: 12px;
	min-width: 52px;
	justify-content: center;
}

.rpcn-cb.is-open .rpcn-cb__launcher-label,
.rpcn-cb.is-open .rpcn-cb__preview {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.rpcn-cb .rpcn-cb__launcher-close {
	display: none;
	flex: none;
	width: 24px;
	height: 24px;
}

.rpcn-cb.is-open .rpcn-cb__launcher-icon {
	display: none;
}

.rpcn-cb.is-open .rpcn-cb__launcher-close {
	display: block;
}

/* Phones: a round button with the words read out but not shown. */
@media (max-width: 600px) {
	.rpcn-cb .rpcn-cb__launcher {
		width: 54px;
		height: 54px;
		min-height: 0;
		padding: 0;
		justify-content: center;
	}

	.rpcn-cb .rpcn-cb__launcher-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.rpcn-cb .rpcn-cb__preview {
		top: -12px;
		right: -6px;
	}

	.rpcn-cb.is-open .rpcn-cb__launcher {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rpcn-cb .rpcn-cb__launcher {
		transition: none;
	}

	.rpcn-cb.is-loading .rpcn-cb__launcher-icon {
		animation: none;
	}
}

@media print {
	.rpcn-cb {
		display: none !important;
	}
}
