body.hf-popup-open {
	overflow: hidden;
}

.hf-popup[hidden] {
	display: none;
}

.hf-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.22s ease;
}

.hf-popup.is-visible {
	opacity: 1;
}

.hf-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 8, 11, 0.78);
	backdrop-filter: blur(3px);
}

.hf-popup__dialog {
	position: relative;
	width: min(640px, 100%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: var(--hf-card-background, #151515);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 0;
	box-shadow: 0 20px 52px rgba(0, 0, 0, 0.52);
	z-index: 2;
	transform: translateY(14px);
	opacity: 0;
	transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease;
}

.hf-popup.is-visible .hf-popup__dialog {
	transform: translateY(0);
	opacity: 1;
}

.hf-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	background: rgba(8, 12, 17, 0.68);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	padding: 0 0 2px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	z-index: 3;
}

.hf-popup__close:hover {
	background: rgba(8, 12, 17, 0.9);
	border-color: rgba(255, 255, 255, 0.45);
	transform: translateY(-1px);
}

.hf-popup__close:focus-visible,
.hf-popup__button:focus-visible {
	outline: 2px solid var(--hf-accent-color, #d95f22);
	outline-offset: 2px;
}

.hf-popup__image-wrap {
	margin: 0;
	overflow: hidden;
	border-radius: 16px 16px 0 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hf-popup__image {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 16 / 8.9;
	object-fit: cover;
	border-radius: 0;
}

.hf-popup__text {
	padding: 22px 26px 26px;
}

.hf-popup__title {
	margin: 0 0 12px;
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	line-height: 1.15;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: 0.01em;
	padding-right: 44px;
}

.hf-popup__content {
	margin: 0;
	font-size: 1rem;
	line-height: 1.62;
	color: rgba(255, 255, 255, 0.88);
}

.hf-popup__content p {
	max-width: 50ch;
	margin: 0;
}

.hf-popup__content p:first-child {
	font-size: 1.1rem;
	line-height: 1.5;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.97);
}

.hf-popup__content p:not(:last-child) {
	margin-bottom: 14px;
}

.hf-popup__content a {
	color: #fff;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.hf-popup__actions {
	margin: 22px 0 0;
}

.hf-popup__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--hf-accent-color, #d95f22);
	color: #fff;
	border: 1px solid transparent;
	text-decoration: none;
	padding: 11px 16px;
	border-radius: 8px;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.hf-popup__button:hover {
	opacity: 0.88;
	transform: translateY(-1px);
	filter: saturate(1.05);
}

.hf-popup-noscript {
	margin: 18px;
	padding: 16px;
	border-radius: 8px;
	background: var(--hf-card-background, #151515);
	color: #fff;
	border-left: 4px solid var(--hf-accent-color, #d95f22);
}

@media (max-width: 767px) {
	.hf-popup {
		padding: 12px;
	}

	.hf-popup__dialog {
		padding: 0;
		max-height: calc(100vh - 24px);
		border-radius: 14px;
	}

	.hf-popup__image-wrap {
		border-radius: 14px 14px 0 0;
	}

	.hf-popup__text {
		padding: 16px 16px 20px;
	}

	.hf-popup__close {
		top: 10px;
		right: 10px;
		width: 34px;
		height: 34px;
		font-size: 28px;
	}

	.hf-popup__title {
		font-size: clamp(1.25rem, 5vw, 1.55rem);
		padding-right: 40px;
	}

	.hf-popup__content p:first-child {
		font-size: 1.03rem;
	}

	.hf-popup__content p {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hf-popup,
	.hf-popup__dialog,
	.hf-popup__button,
	.hf-popup__close {
		transition: none;
	}
}
