/* Sobesoft Popup - Ön yüz stilleri */

.sbp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	box-sizing: border-box;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.sbp-overlay.sbp-active {
	display: flex;
	opacity: 1;
}

.sbp-overlay * {
	box-sizing: border-box;
}

/* Kutu */
.sbp-box {
	position: relative;
	width: auto;
	/* Ekrana göre otomatik sınır: büyük görseller masaüstünü kaplamaz */
	max-width: min(90vw, 600px);
	margin: auto;
	animation: sbp-pop 0.3s ease;
}

/* Görsel her zaman ekrana sığar */
.sbp-image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	/* Yükseklik de ekranı kaplamasın */
	max-height: 85vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.sbp-link {
	display: block;
	line-height: 0;
}

/* Kapatma butonu */
.sbp-close-btn {
	position: absolute;
	top: -16px;
	right: -16px;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	z-index: 3;
	-webkit-appearance: none;
	appearance: none;
	transition: transform 0.15s ease, background 0.15s ease;
}

.sbp-close-btn:hover {
	transform: scale(1.08);
	background: #f3f3f3;
}

/* Çarpı işareti iki çizgiyle çiziliyor — her zaman simetrik */
.sbp-close-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.sbp-close-icon::before,
.sbp-close-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	background: #1d1d1d;
	border-radius: 2px;
}

.sbp-close-icon::before {
	transform: translateY(-50%) rotate(45deg);
}

.sbp-close-icon::after {
	transform: translateY(-50%) rotate(-45deg);
}

/* ----------------------------------------------------------------
 * Konumlar (flex hizalama ile)
 * -------------------------------------------------------------- */
.sbp-pos-center { align-items: center; justify-content: center; }
.sbp-pos-top { align-items: flex-start; justify-content: center; }
.sbp-pos-bottom { align-items: flex-end; justify-content: center; }
.sbp-pos-left { align-items: center; justify-content: flex-start; }
.sbp-pos-right { align-items: center; justify-content: flex-end; }
.sbp-pos-top-left { align-items: flex-start; justify-content: flex-start; }
.sbp-pos-top-right { align-items: flex-start; justify-content: flex-end; }
.sbp-pos-bottom-left { align-items: flex-end; justify-content: flex-start; }
.sbp-pos-bottom-right { align-items: flex-end; justify-content: flex-end; }

/* Köşe/kenar konumlarında "margin:auto" hizalamayı bozmasın */
.sbp-overlay:not(.sbp-pos-center) .sbp-box {
	margin: 0;
}

@keyframes sbp-pop {
	from { transform: scale(0.92); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

/* ----------------------------------------------------------------
 * Responsive
 * -------------------------------------------------------------- */
@media (max-width: 782px) {
	.sbp-overlay {
		padding: 16px;
	}
	.sbp-box {
		/* Mobilde genişlik sınırını yok say, ekrana göre büyüt */
		max-width: 94vw !important;
	}
	.sbp-image {
		max-height: 80vh;
	}
	/* Mobilde kenar/köşe konumlarını ortala (taşmayı önler) */
	.sbp-overlay {
		align-items: center;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.sbp-close-btn {
		top: -12px;
		right: -12px;
		width: 32px;
		height: 32px;
	}
	.sbp-close-icon {
		width: 14px;
		height: 14px;
	}
}

/* Hareket azaltma tercihine saygı */
@media (prefers-reduced-motion: reduce) {
	.sbp-overlay,
	.sbp-box {
		animation: none;
		transition: none;
	}
}
