dialog.hornet-popup {
	width: min(52rem, calc(100vw - 2rem));
	max-width: calc(100vw - 2rem);
	max-height: calc(100vh - 2rem);
	height: fit-content;
	margin: auto;
	padding: 0;
	border: 0;
	overflow: auto;
	color: var(--color-brand-charcoal, #1a1a1a);
	background: var(--hornet-surface, #fff);
	border-radius: var(--hornet-radius-panel, 0.75rem);
	box-shadow: 0 24px 60px rgb(0 0 0 / 0.22);
}

dialog.hornet-popup[open] {
	display: grid;
	grid-template-columns: minmax(12rem, 42%) minmax(0, 1fr);
	position: fixed;
	inset: auto;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

dialog.hornet-popup.hornet-popup--text[open] {
	grid-template-columns: minmax(0, 1fr);
	width: min(32rem, calc(100vw - 2rem));
}

dialog.hornet-popup::backdrop {
	background: rgb(0 0 0 / 0.55);
}

.hornet-popup__close {
	position: sticky;
	top: 0.65rem;
	right: 0.65rem;
	z-index: 2;
	grid-column: 1 / -1;
	justify-self: end;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0 0.65rem -2.25rem 0;
	padding: 0;
	border: 0;
	border-radius: var(--hornet-radius-btn, 0.375rem);
	background: rgb(255 255 255 / 0.92);
	color: var(--color-brand-charcoal, #1a1a1a);
	cursor: pointer;
}

.hornet-popup__close svg,
.hornet-popup__close-icon {
	width: 1.15rem;
	height: 1.15rem;
	stroke: currentColor;
	fill: none;
}

.hornet-popup__close:hover {
	background: #fff;
}

.hornet-popup__close:focus-visible,
.hornet-popup__cta:focus-visible {
	outline: 2px solid var(--color-brand-accent, currentColor);
	outline-offset: 2px;
}

.hornet-popup__media {
	min-height: 16rem;
	background: rgb(0 0 0 / 0.04);
}

.hornet-popup__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hornet-popup__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.85rem;
	min-width: 0;
	padding: 2rem 3.25rem 2rem 1.75rem;
}

.hornet-popup__title {
	margin: 0;
	color: var(--color-brand-charcoal, #1a1a1a);
	font-size: 1.65rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
	overflow-wrap: anywhere;
}

.hornet-popup__text {
	color: var(--color-brand-muted, #6b6b6b);
	font-size: 1rem;
	line-height: 1.55;
}

.hornet-popup__text :is(p, ul, ol) {
	margin: 0;
}

.hornet-popup__text :is(p, ul, ol) + :is(p, ul, ol) {
	margin-top: 0.65rem;
}

.hornet-popup__actions {
	margin: 0.35rem 0 0;
}

body.hornet-theme-dark dialog.hornet-popup {
	color: var(--color-brand-charcoal, #f3f3f3);
	background: var(--hornet-surface, #142f2f);
}

body.hornet-theme-dark .hornet-popup__close {
	background: rgb(0 0 0 / 0.35);
	color: var(--color-brand-charcoal, #f3f3f3);
}

body.hornet-theme-dark .hornet-popup__media {
	background: rgb(255 255 255 / 0.04);
}

@media (max-width: 640px) {
	dialog.hornet-popup[open] {
		grid-template-columns: minmax(0, 1fr);
		max-height: calc(100vh - 1.5rem);
		overflow: auto;
	}

	.hornet-popup__media {
		min-height: 0;
		max-height: 13rem;
	}

	.hornet-popup__img {
		max-height: 13rem;
	}

	.hornet-popup__body {
		padding: 1.35rem 1.25rem 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	dialog.hornet-popup,
	dialog.hornet-popup::backdrop {
		transition: none;
	}
}
