/* Hugecoder Popup Builder — frontend styles */

.hspb-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}

.hspb-popup.hspb-open {
	display: flex;
}

.hspb-popup * {
	box-sizing: border-box;
}

.hspb-overlay {
	position: absolute;
	inset: 0;
}

.hspb-popup.hspb-open .hspb-overlay {
	animation: hspbFade 0.25s ease both;
}

.hspb-box {
	position: relative;
	z-index: 1;
	max-height: 90vh;
	overflow: auto;
	outline: none;
}

.hspb-box:focus {
	outline: none;
}

/* Konumlar */

.hspb-pos-top_bar,
.hspb-pos-bottom_bar {
	align-items: flex-start;
}

.hspb-pos-bottom_bar {
	align-items: flex-end;
}

.hspb-pos-top_bar .hspb-box,
.hspb-pos-bottom_bar .hspb-box {
	width: 100%;
	max-width: 100%;
	border-radius: 0 !important;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 24px;
	text-align: center;
}

/* Animasyonlar (süre, PHP tarafından inline animation-duration ile ayarlanır) */

.hspb-anim-fade.hspb-open .hspb-box { animation: hspbFade ease both; }
.hspb-anim-slide_up.hspb-open .hspb-box { animation: hspbSlideUp ease-out both; }
.hspb-anim-slide_down.hspb-open .hspb-box { animation: hspbSlideDown ease-out both; }
.hspb-anim-slide_left.hspb-open .hspb-box { animation: hspbSlideLeft ease-out both; }
.hspb-anim-slide_right.hspb-open .hspb-box { animation: hspbSlideRight ease-out both; }
.hspb-anim-zoom_in.hspb-open .hspb-box { animation: hspbZoomIn ease-out both; }
.hspb-anim-zoom_out.hspb-open .hspb-box { animation: hspbZoomOut ease-out both; }
.hspb-anim-bounce.hspb-open .hspb-box { animation: hspbBounce cubic-bezier(.34,1.56,.64,1) both; }
.hspb-anim-none.hspb-open .hspb-box { animation: none; }

@keyframes hspbFade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes hspbSlideUp {
	from { opacity: 0; transform: translateY(40px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes hspbSlideDown {
	from { opacity: 0; transform: translateY(-40px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes hspbSlideLeft {
	from { opacity: 0; transform: translateX(40px); }
	to { opacity: 1; transform: translateX(0); }
}
@keyframes hspbSlideRight {
	from { opacity: 0; transform: translateX(-40px); }
	to { opacity: 1; transform: translateX(0); }
}
@keyframes hspbZoomIn {
	from { opacity: 0; transform: scale(0.85); }
	to { opacity: 1; transform: scale(1); }
}
@keyframes hspbZoomOut {
	from { opacity: 0; transform: scale(1.15); }
	to { opacity: 1; transform: scale(1); }
}
@keyframes hspbBounce {
	0% { opacity: 0; transform: scale(0.3); }
	50% { opacity: 1; transform: scale(1.05); }
	70% { transform: scale(0.95); }
	100% { transform: scale(1); }
}

/* Kapatma düğmesi */

.hspb-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	cursor: pointer;
	border: none;
	background: none;
	line-height: 1;
}

.hspb-close-circle,
.hspb-close-square {
	width: 32px;
	height: 32px;
	font-size: 20px;
	background: rgba(0, 0, 0, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
}

.hspb-close-circle {
	border-radius: 50%;
}

.hspb-close-square {
	border-radius: 4px;
}

.hspb-close-text {
	top: 14px;
	right: 16px;
	font-size: 14px;
	text-decoration: underline;
}

/* İçerik */

.hspb-popup-image {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto 16px;
	border-radius: inherit;
}

.hspb-popup-content {
	line-height: 1.55;
	font-size: 15px;
}

.hspb-popup-content p:first-child {
	margin-top: 0;
}

.hspb-popup-content p:last-child {
	margin-bottom: 0;
}

.hspb-popup-button {
	display: inline-block;
	margin-top: 18px;
	padding: 11px 26px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	transition: opacity 0.15s ease;
}

.hspb-popup-button:hover {
	opacity: 0.88;
	color: #fff;
}

.hspb-credit-link {
	display: block;
	text-align: center;
	margin-top: 14px;
	font-size: 11px;
	opacity: 0.55;
	text-decoration: none;
	color: inherit;
}

body.hspb-scroll-locked {
	overflow: hidden !important;
}

@media (max-width: 600px) {
	.hspb-box {
		width: 92vw !important;
		max-width: 92vw !important;
	}
}
