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

.kpm-post-modal__content[hidden],
.kpm-post-modal__loading[hidden],
.kpm-post-modal__media[hidden],
.kpm-post-modal__meta[hidden] {
	display: none !important;
}

.show-popop-post .e-loop-item,
.show-popup-post .e-loop-item {
	cursor: pointer;
}

html.kpm-post-modal-is-open,
html.kpm-post-modal-is-open body {
	overflow: hidden;
}

.kpm-post-modal {
	align-items: center;
	bottom: 0;
	display: flex;
	justify-content: center;
	left: 0;
	padding: 24px;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 999999;
}

.kpm-post-modal__backdrop {
	background: rgba(16, 24, 40, 0.72);
	bottom: 0;
	cursor: pointer;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.kpm-post-modal__dialog {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 24px 80px rgba(16, 24, 40, 0.32);
	color: #1f2937;
	max-height: min(840px, calc(100vh - 48px));
	max-width: 640px;
	outline: none;
	overflow: auto;
	position: relative;
	width: min(100%, 640px);
}

.kpm-post-modal__close {
	align-items: center;
	aspect-ratio: 1 / 1;
	background: var( --e-global-color-secondary ) !important;
	border: 1px solid var( --e-global-color-secondary ) !important;
	border-radius: 50% !important;
	box-sizing: border-box;
	color: #344054;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 40px;
	font-size: 28px;
	height: 40px !important;
	justify-content: center;
	line-height: 1;
	max-height: 40px;
	max-width: 40px;
	min-height: 40px;
	min-width: 40px;
	padding: 0 !important;
	position: absolute;
	right: 16px;
	top: 16px;
	margin: 0;
	width: 40px !important;
	z-index: 5;
}

.kpm-post-modal__close:hover,
.kpm-post-modal__close:focus-visible {
	background: #f2f4f7;
	border-color: #98a2b3;
	color: #101828;
}

.kpm-post-modal__loading {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: center;
	min-height: 220px;
	padding: 48px 24px;
}

.kpm-post-modal__spinner {
	animation: kpm-post-modal-spin 0.8s linear infinite;
	border: 3px solid #e4e7ec;
	border-top-color: #0f766e;
	border-radius: 999px;
	height: 28px;
	width: 28px;
}

.kpm-post-modal__content {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.kpm-post-modal__media {
	background: #f2f4f7;
	max-height: 420px;
	overflow: hidden;
}

.kpm-post-modal__media img {
	display: block;
	height: auto;
	max-height: 420px;
	object-fit: cover;
	width: 100%;
}

.kpm-post-modal .kpm-post-modal__body {
	padding: 40px clamp(24px, 5vw, 56px) 48px;
}

.kpm-post-modal .kpm-post-modal__meta {
	color: #667085;
	font-family: "Museo Sans", Sans-serif;
	font-size: 0.9em;
	font-weight: 700;
	line-height: 1.3em;
}

.kpm-post-modal h2.kpm-post-modal__title {
	color: var(--e-global-color-secondary);
	font-family: "Museo Sans", Sans-serif;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.kpm-post-modal .kpm-post-modal__entry {
	font-size: 1rem;
	line-height: 1.6;
}

.kpm-post-modal .kpm-post-modal__entry p,
.kpm-post-modal .kpm-post-modal__entry .wp-block-paragraph {
	font-size: 1rem;
	line-height: 1.6;
}

.kpm-post-modal .kpm-post-modal__entry > :first-child {
	margin-top: 0;
}

.kpm-post-modal .kpm-post-modal__entry > :last-child {
	margin-bottom: 0;
}

.kpm-post-modal .kpm-post-modal__entry img,
.kpm-post-modal .kpm-post-modal__entry video,
.kpm-post-modal .kpm-post-modal__entry iframe {
	max-width: 100%;
}

.kpm-post-modal .kpm-post-modal__entry iframe {
	display: block;
}

@keyframes kpm-post-modal-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 767px) {
	.kpm-post-modal {
		align-items: stretch;
		padding: 12px;
	}

	.kpm-post-modal__dialog {
		max-height: calc(100vh - 24px);
		width: 100%;
	}

	.kpm-post-modal__body {
		padding: 28px 20px 36px;
	}

	.kpm-post-modal__title {
		font-size: 28px;
		margin-right: 44px;
	}

	.kpm-post-modal__entry {
		font-size: 16px;
		line-height: 1.65;
	}
}
