.supernova-chat-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: clamp(16px, 4vw, 40px);
	background: rgba(17, 24, 39, 0.62);
}

.supernova-chat-popup__dialog {
	position: relative;
	width: min(100%, 520px);
	max-height: min(80dvh, 640px);
	overflow: auto;
	padding: clamp(24px, 5vw, 40px);
	border-radius: 16px;
	background: var(--supernova-chat-background-color);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
	color: var(--supernova-chat-font-color);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.supernova-chat-popup__title {
	margin: 0 40px 16px 0;
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	line-height: 1.25;
}

.supernova-chat-popup__text {
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	font-size: 1rem;
	line-height: 1.6;
}

.supernova-chat-popup__close {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--supernova-chat-font-color);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.supernova-chat-popup__close:hover {
	background: #f3f4f6;
}

.supernova-chat-popup__close:focus-visible {
	outline: 3px solid var(--supernova-chat-secondary-color);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
	.supernova-chat-popup {
		animation: supernova-chat-popup-fade-in 160ms ease-out;
	}

	.supernova-chat-popup__dialog {
		animation: supernova-chat-popup-rise-in 180ms ease-out;
	}
}

@keyframes supernova-chat-popup-fade-in {
	from {
		opacity: 0;
	}
}

@keyframes supernova-chat-popup-rise-in {
	from {
		transform: translateY(12px);
		opacity: 0;
	}
}
