/* Popsup Ads - front-end popup */

.popsup-ads-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
}

/* Shared card */
.popsup-ads-box {
	box-sizing: border-box;
	position: relative;
	background: #ffffff;
	border: 2px solid #ff9900;
	border-radius: 12px;
	box-shadow: 0 16px 44px rgba(0, 0, 0, 0.25);
	padding: 16px 16px 13px;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- CENTER MODE (middle of screen, dim background) ---------- */
.popsup-ads-center {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 15, 15, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.popsup-ads-center.is-open {
	opacity: 1;
	visibility: visible;
}

.popsup-ads-center .popsup-ads-box {
	width: 290px;
	max-width: calc(100vw - 32px);
	transform: scale(0.85);
	transition: transform 0.35s ease;
}

.popsup-ads-center.is-open .popsup-ads-box {
	transform: scale(1);
}

/* ---------- CORNER MODE (small card, bottom right) ---------- */
.popsup-ads-corner {
	pointer-events: none;
}

.popsup-ads-corner .popsup-ads-box {
	pointer-events: auto;
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 270px;
	max-width: calc(100vw - 32px);
	transform: translateY(150%);
	opacity: 0;
	transition: transform 0.4s ease, opacity 0.4s ease;
}

.popsup-ads-corner.is-open .popsup-ads-box {
	transform: translateY(0);
	opacity: 1;
}

/* ---------- Shared inner elements ---------- */
.popsup-ads-close {
	position: absolute;
	top: 6px;
	right: 9px;
	width: 26px;
	height: 26px;
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	z-index: 2;
}

.popsup-ads-close:hover {
	color: #222;
}

.popsup-ads-label {
	display: inline-block;
	background: #ff9900;
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 3px 11px;
	border-radius: 20px;
	margin-bottom: 11px;
}

.popsup-ads-img {
	display: block;
	max-width: 120px;
	max-height: 120px;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0 auto 11px;
}

.popsup-ads-name {
	font-size: 13px;
	font-weight: 600;
	color: #111111;
	line-height: 1.35;
	margin-bottom: 12px;
}

.popsup-ads-btn {
	display: block;
	background: #ff9900;
	color: #111111 !important;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	padding: 10px 14px;
	border-radius: 8px;
	transition: background 0.2s ease;
}

.popsup-ads-btn:hover {
	background: #e88a00;
	color: #111111 !important;
}

.popsup-ads-disc {
	font-size: 9px;
	color: #8a8a8a;
	margin-top: 11px;
	line-height: 1.45;
}

/* ---------- Scroll lock (page can't scroll while popup is open) ---------- */
html.popsup-ads-locked,
html.popsup-ads-locked body {
	overflow: hidden !important;
	overscroll-behavior: contain;
	touch-action: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	.popsup-ads-corner .popsup-ads-box {
		right: 12px;
		left: 12px;
		bottom: 12px;
		width: auto;
	}
	.popsup-ads-center .popsup-ads-box {
		width: 100%;
	}
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
	.popsup-ads-center .popsup-ads-box,
	.popsup-ads-corner .popsup-ads-box {
		transition: opacity 0.3s ease;
		transform: none;
	}
}
