.hpg-gate {
	position: relative;
	max-width: 900px;
	margin: 0 auto 2rem;
}

/* Full-page mode: minimal top bar shown instead of the theme's header/nav */
.hpg-minimal-topbar {
	display: flex;
	align-items: center;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #e5e7eb;
}

.hpg-minimal-logo {
	display: inline-block;
	text-decoration: none;
	color: inherit;
	font-weight: 600;
	max-height: 40px;
}

.hpg-minimal-logo img {
	display: block;
	max-height: 40px;
	width: auto;
}

.hpg-tile-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.hpg-tile-cat {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b7280;
	background: #f3f4f6;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
}

.hpg-viewer-wrap {
	position: relative;
	background: #f4f4f5;
	border-radius: 8px;
	overflow: hidden;
	min-height: 280px;
}

.hpg-cover {
	display: block;
	width: 100%;
	height: auto;
}

.hpg-loading {
	padding: 3rem 1rem;
	text-align: center;
	color: #6b7280;
	font-style: italic;
}

.hpg-pdf-pages {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 12px;
	transition: filter 0.2s ease;
}

.hpg-pdf-pages.hpg-blurred {
	filter: blur(6px);
	pointer-events: none;
	user-select: none;
}

.hpg-page canvas {
	max-width: 100%;
	height: auto;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	background: #fff;
}

.hpg-locked-teaser {
	width: 100%;
	max-width: 700px;
	padding: 2rem 1.5rem;
	text-align: center;
	background: linear-gradient(to bottom, rgba(244, 244, 245, 0), #f4f4f5 60%);
	border-top: 1px dashed #d1d5db;
}

.hpg-locked-teaser p {
	margin: 0 0 1rem;
	color: #4b5563;
}

.hpg-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.75rem;
}

.hpg-download[hidden],
.hpg-click-trigger[hidden],
.hpg-modal[hidden] {
	display: none !important;
}

/* Modal */
.hpg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hpg-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.6);
}

.hpg-modal-panel {
	position: relative;
	background: #fff;
	border-radius: 10px;
	max-width: 480px;
	width: calc(100% - 2rem);
	max-height: calc(100vh - 4rem);
	overflow-y: auto;
	padding: 2rem;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.hpg-modal-panel h2 {
	margin-top: 0;
	font-size: 1.35rem;
}

.hpg-modal-subheading {
	color: #6b7280;
	margin-top: -0.5rem;
}

.hpg-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
}

.hpg-modal-close:hover {
	color: #111827;
}

.hpg-hsform-target .hs-form label {
	font-weight: 600;
}

.hpg-hsform-target .hs-button.primary {
	cursor: pointer;
}

/* Native form (rendered when a HubSpot Private App token is configured) */
.hpg-native-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hpg-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.hpg-field label {
	font-weight: 600;
	font-size: 0.9rem;
}

.hpg-field input[type="text"],
.hpg-field input[type="email"],
.hpg-field input[type="tel"],
.hpg-field input[type="number"],
.hpg-field input[type="date"],
.hpg-field select,
.hpg-field textarea {
	padding: 0.6rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 1rem;
	font-family: inherit;
	width: 100%;
}

.hpg-field textarea {
	min-height: 6rem;
	resize: vertical;
}

.hpg-radio-option,
.hpg-checkbox-option {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 400;
	font-size: 0.9rem;
}

.hpg-submit-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	background: #111827;
	color: #fff;
	border-radius: 6px;
}

.hpg-submit-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.hpg-form-error {
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	padding: 0.6rem 0.75rem;
	font-size: 0.9rem;
	margin: 0;
}

.hpg-form-error[hidden] {
	display: none;
}

.hpg-consent-text {
	font-size: 0.78rem;
	line-height: 1.5;
	color: #6b7280;
	margin: 0;
}

.hpg-consent-text a {
	text-decoration: underline;
}
