.rp-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 180ms ease, visibility 180ms ease;
}

.rp-popup.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.rp-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.68);
}

.rp-popup__dialog {
	position: relative;
	z-index: 1;
	display: inline-block;
	max-width: min(620px, calc(100vw - 32px));
	max-height: 78vh;
	line-height: 0;
	transform: translateY(8px) scale(0.985);
	transition: transform 180ms ease;
}

.rp-popup.is-open .rp-popup__dialog {
	transform: translateY(0) scale(1);
}

.rp-popup__link {
	display: block;
	line-height: 0;
}

.rp-popup__image {
	display: block;
	width: auto;
	height: auto;
	max-width: min(620px, calc(100vw - 32px));
	max-height: 78vh;
	object-fit: contain;
}

/* Tema buton stillerinin kapatma ikonunu değiştirmesini engeller. */
.rp-popup button.rp-popup__close {
	-webkit-appearance: none !important;
	appearance: none !important;
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	z-index: 2 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	width: 46px !important;
	min-width: 46px !important;
	max-width: 46px !important;
	height: 46px !important;
	min-height: 46px !important;
	max-height: 46px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(0, 0, 0, 0.12) !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.9) !important;
	color: #111 !important;
	font-size: 0 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18) !important;
	transform: none !important;
}

.rp-popup__close svg {
	display: block;
	width: 30px;
	height: 30px;
	pointer-events: none;
}

.rp-popup button.rp-popup__close:hover,
.rp-popup button.rp-popup__close:focus-visible {
	background: #fff !important;
	color: #000 !important;
	outline: 2px solid rgba(0, 0, 0, 0.75) !important;
	outline-offset: 2px !important;
}

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

@media (max-width: 640px) {
	.rp-popup {
		padding: 14px;
	}

	.rp-popup__dialog,
	.rp-popup__image {
		max-width: calc(100vw - 28px);
		max-height: calc(100vh - 32px);
	}

	.rp-popup button.rp-popup__close {
		top: 6px !important;
		right: 6px !important;
	}
}

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