/* Popup reklamowy Koła Zadań. Ładowany WYŁĄCZNIE na stronach, na których okno
   ma się pokazać (patrz SW_Popup::assets()) - reszta serwisu nie płaci za ten plik.
   z-index ponad widgetem koła (patrz poziomy w frontend.css, do 2000002). */

.sw-popup {
	position: fixed;
	inset: 0;
	z-index: 2000010;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1.4;
}
.sw-popup[hidden] { display: none; }
.sw-popup *, .sw-popup *::before, .sw-popup *::after { box-sizing: border-box; }

.sw-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 18, 12, .62);
	opacity: 0;
	transition: opacity .25s ease;
}

.sw-popup__box {
	position: relative;
	width: min(380px, 100%);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: linear-gradient(165deg, #12361f 0%, #0a2014 75%);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
	opacity: 0;
	transform: translateY(14px) scale(.97);
	transition: opacity .25s ease, transform .25s ease;
}

.sw-popup.is-open .sw-popup__backdrop { opacity: 1; }
.sw-popup.is-open .sw-popup__box { opacity: 1; transform: none; }

.sw-popup__x {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease;
}
.sw-popup__x:hover { background: rgba(0, 0, 0, .75); }

.sw-popup__media { margin: 0; background: #313c43; }
.sw-popup__media img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
	background: #313c43;
}
.sw-popup__caption {
	margin: 0;
	padding: 6px 14px 8px;
	background: #26302f;
	color: rgba(255, 255, 255, .7);
	font-size: 12px;
	text-align: center;
}

.sw-popup__body { padding: 20px 22px 18px; }
.sw-popup__kicker {
	margin: 0 0 6px;
	color: #8ed3a5;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.sw-popup__title {
	margin: 0 0 8px;
	padding: 0;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
}
.sw-popup__text {
	margin: 0 0 18px;
	color: rgba(255, 255, 255, .85);
	font-size: 15px;
	line-height: 1.5;
}
.sw-popup__cta {
	display: block;
	padding: 14px 18px;
	border-radius: 12px;
	background: linear-gradient(180deg, #ffc247 0%, #f59e0b 100%);
	color: #1c1300 !important;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 6px 16px rgba(245, 158, 11, .35);
	transition: transform .15s ease, box-shadow .15s ease;
}
.sw-popup__cta:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(245, 158, 11, .45); }
.sw-popup__skip {
	display: block;
	margin: 12px auto 0;
	padding: 6px 10px;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, .6);
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
}
.sw-popup__skip:hover { color: #fff; }

.sw-popup a:focus-visible,
.sw-popup button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* Telefon: panel wysuwany od dołu zamiast okna na środku - zajmuje mniej ekranu
   i nie wygląda jak natrętna zasłona (Google traktuje gorzej duże okna na mobile). */
@media (max-width: 640px) {
	.sw-popup { align-items: flex-end; padding: 0; }
	.sw-popup__backdrop { background: rgba(6, 18, 12, .45); }
	.sw-popup__box {
		width: 100%;
		max-height: 88vh;
		border-radius: 18px 18px 0 0;
		transform: translateY(40px);
	}
	.sw-popup__media img { max-height: 30vh; }
	.sw-popup__body { padding: 16px 18px 14px; }
	.sw-popup__title { font-size: 20px; }
	.sw-popup__text { font-size: 14px; margin-bottom: 14px; }
}

/* Podgląd w panelu administracyjnym: to samo okno, tylko wpisane w stronę. */
.sw-popup--static {
	position: static;
	display: block;
	padding: 0;
}
.sw-popup--static .sw-popup__box {
	width: 100%;
	max-width: 380px;
	margin: 0 auto;
	opacity: 1;
	transform: none;
	border-radius: 18px;
}
.sw-popup--static .sw-popup__x { pointer-events: none; }
.sw-popup--static .sw-popup__cta { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
	.sw-popup__backdrop, .sw-popup__box, .sw-popup__cta { transition: none; }
	.sw-popup__box { transform: none; }
}
