.post2pdf-download-wrap {
	text-align: center;
	margin-top: 1.25rem;
	margin-bottom: 0.85rem;
}

li.wp-block-post > .post2pdf-download-wrap:last-child,
div.wp-block-post > .post2pdf-download-wrap:last-child,
.entry-content > .post2pdf-download-wrap:last-child,
.entry-summary > .post2pdf-download-wrap:last-child,
.e-loop-item > .post2pdf-download-wrap:last-child,
.elementor-loop-item > .post2pdf-download-wrap:last-child,
.elementor-widget-container > .post2pdf-download-wrap:last-child {
	margin-top: 1.5rem;
	margin-bottom: 1rem;
}

.post2pdf-download-wrap .post2pdf-open.button:not(.elementor-button),
.post2pdf-download-wrap a.post2pdf-direct.button:not(.elementor-button) {
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	box-sizing: border-box;
	padding: 0.5rem 1.05rem !important;
	font-size: 0.875rem !important;
	line-height: 1.25;
	border-radius: 999px !important;
	background-color: var(--ast-global-color-0, #82004e) !important;
	color: #fff !important;
	border-color: var(--ast-global-color-0, #82004e) !important;
}

.post2pdf-download-icon,
.post2pdf-cart-icon {
	flex-shrink: 0;
	display: block;
}

.post2pdf-download-label {
	display: inline-block;
}

.post2pdf-download-wrap .post2pdf-open.button:not(.elementor-button):hover,
.post2pdf-download-wrap .post2pdf-open.button:not(.elementor-button):focus-visible,
.post2pdf-download-wrap a.post2pdf-direct.button:not(.elementor-button):hover,
.post2pdf-download-wrap a.post2pdf-direct.button:not(.elementor-button):focus-visible {
	color: #fff !important;
	filter: brightness(1.06);
}

.post2pdf-modal[hidden] {
	display: none;
}

.post2pdf-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: min(1.5rem, 4vw);
	box-sizing: border-box;
}

.post2pdf-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.post2pdf-modal__dialog {
	position: relative;
	z-index: 1;
	max-width: min(640px, 100%);
	width: 100%;
	margin: 0;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	max-height: min(90vh, 100%);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.post2pdf-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.65rem 1rem;
	background: var(--ast-global-color-0, #82004e);
	color: #fff;
	border-bottom: none;
}

.post2pdf-modal__header h2 {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	word-wrap: break-word;
}

.post2pdf-modal__close {
	flex-shrink: 0;
	box-sizing: border-box;
	width: 1.875rem;
	height: 1.875rem;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	background: var(--ast-global-color-1, #242424);
	color: #fff;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.post2pdf-modal__close:hover,
.post2pdf-modal__close:focus-visible {
	filter: brightness(1.08);
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

.post2pdf-modal__body {
	padding: 1rem 0;
	overflow: hidden;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

.post2pdf-iframe-wrap {
	flex: 1;
	min-height: 420px;
	display: flex;
	flex-direction: column;
}

.post2pdf-gate-iframe {
	width: 100%;
	flex: 1;
	min-height: 420px;
	border: 0;
	background: #fff;
}

.post2pdf-modal__body > .post2pdf-error,
.post2pdf-modal__body > .post2pdf-loading {
	padding: 1rem;
	margin: 0;
}

html.post2pdf-modal-open {
	overflow: hidden;
}
