.npapw-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	width: 100%;
	height: 100%;
	display: none;
}

.npapw-modal.is-open {
	display: block;
}

body.npapw-modal-open {
	overflow: hidden;
}

.npapw-modal__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba( 0, 0, 0, 0.6 );
	animation: npapw-modal-fade 0.25s ease;
}

.npapw-modal__dialog {
	position: absolute;
	inset: 0;
	background-color: #ffffff;
	animation: npapw-modal-pop 0.3s ease;
}

@keyframes npapw-modal-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes npapw-modal-pop {
	from {
		opacity: 0;
		transform: scale( 0.98 );
	}
	to {
		opacity: 1;
		transform: scale( 1 );
	}
}

.npapw-modal__body {
	display: grid;
	grid-template-columns: 50% 50%;
	width: 100%;
	height: 100%;
}

.npapw-modal__media {
	position: relative;
	background-color: #ffffff;
	overflow: hidden;
}

.npapw-modal__loader {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #ffffff;
}

.npapw-modal__spinner {
	width: 54px;
	height: 54px;
	border: 4px solid rgba( 0, 0, 0, 0.12 );
	border-top-color: var( --npapw-color-primary );
	border-radius: 50%;
	animation: npapw-modal-spin 0.7s linear infinite;
}

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

.npapw-modal__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.npapw-modal__back {
	position: absolute;
	top: 20px;
	left: 20px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	background-color: rgba( 255, 255, 255, 0.92 );
	border: 0;
	border-radius: 50%;
	box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.18 );
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.npapw-modal__back:hover {
	background-color: #ffffff;
}

.npapw-modal__content {
	display: flex;
	flex-direction: column;
	gap: 22px;
	box-sizing: border-box;
	padding: 50px;
	overflow-y: auto;
	scrollbar-width: thin;
	background-color: #fafafa;
}

.npapw-modal__content::-webkit-scrollbar {
	width: 6px;
}

.npapw-modal__content::-webkit-scrollbar-thumb {
	background-color: rgba( 0, 0, 0, 0.18 );
	border-radius: 3px;
}

.npapw-modal__title {
	margin: 0;
	font-size: 2rem;
	line-height: 1.3;
	color: var( --npapw-color-heading );
}

.npapw-modal__desc {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var( --npapw-color-text );
}

.npapw-modal__desc > :last-child {
	margin-bottom: 0;
}

.npapw-modal__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding-top: 20px;
	margin-top: auto;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
}

.npapw-modal__badge {
	padding: 8px 18px;
	background-color: var( --npapw-color-secondary );
	color: #ffffff;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 999px;
	transition: background-color 0.2s ease;
}

.npapw-modal__badge:hover {
	background-color: var( --npapw-color-primary );
	color: #ffffff;
}

@media ( max-width: 767px ) {
	.npapw-modal__body {
		grid-template-columns: 1fr;
		overflow-y: auto;
	}

	.npapw-modal__media {
		height: 45vh;
		min-height: 260px;
	}

	.npapw-modal__media img {
		object-fit: cover;
	}

	.npapw-modal__content {
		padding: 26px;
	}

	.npapw-modal__title {
		font-size: 1.5rem;
	}
}