.oe-popup[hidden] {
	display: none !important;
}

.oe-popup {
	position: fixed;
	inset: 0;
	/* Mümkün olan en yüksek değer: temalar header/arama kutusuna 999999999 gibi değerler verebiliyor (ör. Avada). */
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	animation: oe-popup-fade 0.2s ease-out;
}

.oe-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

/* Dialog kaymaz; kapatma butonu köşede sabit kalır. İçerik popup.js tarafından .oe-popup__body'ye
   sığacak şekilde orantılı küçültülür; en küçük ölçekte de sığmazsa son çare olarak kayar. */
.oe-popup__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: calc(100vh - 48px);
	box-sizing: border-box;
	background: #fff;
	color: #1d2327;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: oe-popup-in 0.25s ease-out;
}

.oe-popup__dialog:focus {
	outline: none;
}

.oe-popup__body {
	min-height: 0;
	overflow-y: auto;
	padding: 32px 28px 24px;
	border-radius: inherit;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

/* Köşeye taşan yuvarlak kapatma butonu. */
.oe-popup__close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 36px;
	height: 36px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	line-height: 1;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #1d2327;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.oe-popup__close:hover {
	background: #d63638;
	transform: rotate(90deg);
}

.oe-popup__close:focus-visible {
	outline: 3px solid #72aee6;
	outline-offset: 2px;
}

.oe-popup__close svg {
	display: block;
}

.oe-popup__title {
	margin: 0 0 12px;
	font-size: 1.5em;
	line-height: 1.3;
}

.oe-popup__content > :first-child {
	margin-top: 0;
}

.oe-popup__content > :last-child {
	margin-bottom: 0;
}

.oe-popup__content img {
	max-width: 100%;
	height: auto;
}

/* Mobil kırılım noktası popup.js içindeki MOBILE_QUERY ile aynı olmalı. */
.oe-popup__content--mobile {
	display: none;
}

@media (max-width: 767px) {
	.oe-popup {
		padding: 28px;
	}

	.oe-popup__dialog {
		max-height: 75vh;
		border-radius: 10px;
	}

	.oe-popup__body {
		padding: 20px 16px 16px;
	}

	.oe-popup__title {
		margin-bottom: 8px;
		font-size: 1.2em;
	}

	.oe-popup__close {
		top: -12px;
		right: -12px;
		width: 34px;
		height: 34px;
	}

	.oe-popup--has-mobile .oe-popup__content--desktop {
		display: none;
	}

	.oe-popup--has-mobile .oe-popup__content--mobile {
		display: block;
	}
}

html.oe-popup-open {
	overflow: hidden;
}

@keyframes oe-popup-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes oe-popup-in {
	from { transform: translateY(12px); opacity: 0; }
	to { transform: none; opacity: 1; }
}

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