/* Ad Popup by Weblink */
.adpw {
	--adpw-bg: #fff;
	--adpw-ink: #1d2327;
	--adpw-muted: #6b7280;
	--adpw-line: rgba(0, 0, 0, .08);
	--adpw-accent: #2563eb;
	position: fixed;
	z-index: 99990;
	font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--adpw-ink);
	box-sizing: border-box;
}
.adpw *,
.adpw *::before,
.adpw *::after { box-sizing: border-box; }

.adpw-box {
	position: relative;
	background: var(--adpw-bg);
	border-radius: 14px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .08);
	overflow: hidden;
	width: min(var(--adpw-w, 336px), calc(100vw - 24px));
}
.adpw-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 34px;
	padding: 4px 6px 4px 12px;
	border-bottom: 1px solid var(--adpw-line);
}
.adpw-label {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--adpw-muted);
}
.adpw-x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--adpw-ink);
	cursor: pointer;
	animation: adpw-in .2s ease-out;
}
.adpw-x[hidden] { display: none; }
.adpw-x:hover { background: rgba(0, 0, 0, .06); }
.adpw-x:focus-visible { outline: 2px solid var(--adpw-accent); outline-offset: 1px; }
.adpw-ad {
	display: block;
	padding: 10px;
	text-align: center;
	min-height: 60px;
}
.adpw-ad ins.adsbygoogle { display: block; margin: 0 auto; }
.adpw-ad img { max-width: 100%; height: auto; }
.adpw-bar {
	height: 3px;
	background: var(--adpw-line);
}
.adpw-bar i {
	display: block;
	height: 100%;
	width: 100%;
	background: var(--adpw-accent);
	transform-origin: left;
}
.adpw-bar.is-running i { animation: adpw-bar var(--adpw-t, 10s) linear forwards; }

/* Slide-in at the bottom right */
.adpw--slide {
	right: 16px;
	bottom: 16px;
	transform: translateY(calc(100% + 24px));
	opacity: 0;
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s;
}
.adpw--slide.is-open { transform: none; opacity: 1; }

/* Window in the middle */
.adpw--center {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	opacity: 0;
	transition: opacity .25s;
	pointer-events: none;
}
.adpw--center .adpw-box { pointer-events: auto; transform: scale(.96); transition: transform .25s; }
.adpw--center.is-open { opacity: 1; }
.adpw--center.is-open .adpw-box { transform: none; }
.adpw--center.adpw--backdrop { background: rgba(15, 23, 42, .55); pointer-events: auto; }

/* Bar at the bottom */
.adpw--anchor {
	left: 0;
	right: 0;
	bottom: 0;
	transform: translateY(100%);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.adpw--anchor.is-open { transform: none; }
.adpw--anchor .adpw-box {
	width: 100%;
	border-radius: 12px 12px 0 0;
	box-shadow: 0 -6px 24px rgba(0, 0, 0, .15);
	display: grid;
	grid-template-columns: 1fr;
}
.adpw--anchor .adpw-head { min-height: 26px; padding: 0 4px 0 12px; border: 0; position: absolute; top: 0; left: 0; right: 0; z-index: 1; pointer-events: none; }
.adpw--anchor .adpw-x { pointer-events: auto; width: 26px; height: 26px; background: var(--adpw-bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.adpw--anchor .adpw-ad { padding: 22px 8px 6px; min-height: 56px; max-height: 140px; overflow: hidden; }

@media (max-width: 782px) {
	.adpw--slide { right: 12px; bottom: 12px; }
	.adpw--anchor .adpw-ad { max-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
	.adpw, .adpw .adpw-box { transition: none !important; }
	.adpw-x { animation: none; }
}

@keyframes adpw-in { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes adpw-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Ads in the quizzes: under the answers (separated from the buttons) and in the result */
.adpw-slot {
	display: block;
	clear: both;
	margin: 28px 0 0;
	padding: 12px 0 0;
	border-top: 1px dashed rgba(0, 0, 0, .14);
	text-align: center;
	min-height: 0;
}
.adpw-slot[hidden] { display: none !important; }
.adpw-slot-label {
	display: block;
	margin: 0 0 6px;
	font: 600 10.5px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #6b7280;
}
.adpw-slot-ad { display: block; width: 100%; overflow: hidden; }
.adpw-slot-ad ins.adsbygoogle { display: block; margin: 0 auto; }
.adpw-slot--quiz-end { margin-top: 20px; }
/* In the result only the ad of the result (the one under the answers comes back with "Try again"). */
.qbw-quiz:has(.adpw-slot--quiz-end:not([hidden])) > .adpw-slot--quiz { display: none; }
