/**
 * Nova Lista — "VIP recommended expert" display template (ad-slot-vip.php).
 *
 * The homepage AI answer card's in-card sponsor. Mobile first: photo beside
 * the name and copy, the tag above, the two buttons side by side under it;
 * from 721px, photo + tag | copy | stacked buttons in one row.
 * Loaded only on pages that render the template. Add .is-play to the ad to
 * run its entrance (rise, chips, one light trace round the border).
 */

.nova-lista-ads--tpl-vip {
	--nova-lista-vip-bg: #ffffff;
	--nova-lista-vip-bg-2: #f3f5f7;
	--nova-lista-vip-bg-3: #e9edf1;
	--nova-lista-vip-ink: #17202b;
	--nova-lista-vip-ink-2: #465262;
	--nova-lista-vip-ink-3: #647080;
	--nova-lista-vip-line: #e3e7ec;
	--nova-lista-vip-line-2: #cfd6de;
	--nova-lista-vip-accent: #0b6e64;
	--nova-lista-vip-accent-hover: #09594f;
	--nova-lista-vip-accent-ink: #ffffff;
	--nova-lista-vip-accent-tint: #e5f3f0;
	--nova-lista-vip-accent-text: #0a6157;
	--nova-lista-vip-glow-a: #3cc2ae;
	--nova-lista-vip-glow-b: #2a79d4;
	--nova-lista-vip-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@property --nova-lista-vip-trace {
	syntax: "<angle>";
	inherits: false;
	initial-value: 0deg;
}

.nova-lista-ads--tpl-vip .nova-lista-ad--vip {
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr);
	gap: 12px 14px;
	align-items: center;
	padding: 16px 18px;
	border: 1px solid color-mix(in oklab, var(--nova-lista-vip-accent) 35%, var(--nova-lista-vip-line));
	border-radius: 20px;
	background: linear-gradient(120deg, color-mix(in oklab, var(--nova-lista-vip-accent-tint) 70%, var(--nova-lista-vip-bg)), var(--nova-lista-vip-bg) 55%);
	box-shadow: 0 10px 30px -18px color-mix(in oklab, var(--nova-lista-vip-accent) 60%, transparent);
	color: var(--nova-lista-vip-ink);
	text-align: left;
}

.nova-lista-ads--tpl-vip .nova-lista-ad--vip[hidden] {
	display: none;
}

.nova-lista-ads--tpl-vip .nova-lista-ad--vip::before {
	content: "";
	position: absolute;
	inset: -1px;
	padding: 1.5px;
	border-radius: inherit;
	background: conic-gradient(from var(--nova-lista-vip-trace), transparent 0deg, transparent 270deg, var(--nova-lista-vip-glow-a) 320deg, var(--nova-lista-vip-glow-b) 350deg, transparent 360deg);
	opacity: 0;
	pointer-events: none;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__ad {
	position: absolute;
	top: 9px;
	right: 14px;
	color: var(--nova-lista-vip-ink-3);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .02em;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__side {
	display: contents;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__tag {
	grid-column: 1 / -1;
	justify-self: start;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 24px;
	padding: 0 9px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--nova-lista-vip-accent), color-mix(in oklab, var(--nova-lista-vip-accent) 70%, var(--nova-lista-vip-glow-b)));
	color: var(--nova-lista-vip-accent-ink);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .02em;
	white-space: nowrap;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__tag svg {
	width: 13px;
	height: 13px;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__photo {
	display: block;
	align-self: start;
	width: 60px;
	height: 60px;
	overflow: hidden;
	border-radius: 16px;
	background: linear-gradient(160deg, #e9eef1, #d7e0e6);
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 0;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__body {
	display: grid;
	gap: 6px;
	min-width: 0;
	padding-top: 2px;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__name {
	margin: 0;
	overflow: hidden;
	color: var(--nova-lista-vip-ink);
	font-size: 19px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.3;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__why {
	margin: 0;
	color: var(--nova-lista-vip-ink);
	font-size: 15.5px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.5;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__chip {
	padding: 4px 10px;
	border: 1px solid var(--nova-lista-vip-line);
	border-radius: 999px;
	background: var(--nova-lista-vip-bg-2);
	color: var(--nova-lista-vip-ink-2);
	font-size: 13px;
	font-weight: 600;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__chip--hit {
	border-color: color-mix(in oklab, var(--nova-lista-vip-accent) 25%, transparent);
	background: var(--nova-lista-vip-accent-tint);
	color: var(--nova-lista-vip-accent-text);
	font-weight: 700;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0;
	color: var(--nova-lista-vip-ink-3);
	font-size: 13px;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__meta span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__meta svg {
	width: 14px;
	height: 14px;
	color: var(--nova-lista-vip-accent-text);
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__cta {
	grid-column: 1 / -1;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 8px;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--nova-lista-vip-line);
	border-radius: 999px;
	background: var(--nova-lista-vip-bg-2);
	color: var(--nova-lista-vip-ink);
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .15s var(--nova-lista-vip-ease-out), background-color .2s ease, border-color .2s ease;
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__btn--primary {
	border-color: var(--nova-lista-vip-accent);
	background: var(--nova-lista-vip-accent);
	color: var(--nova-lista-vip-accent-ink);
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__btn svg {
	width: 16px;
	height: 16px;
	transition: transform .2s var(--nova-lista-vip-ease-out);
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__btn:active {
	transform: scale(.97);
}

.nova-lista-ads--tpl-vip .nova-lista-ad-vip__btn:focus-visible {
	outline: 2px solid var(--nova-lista-vip-accent);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.nova-lista-ads--tpl-vip .nova-lista-ad-vip__btn:hover {
		border-color: var(--nova-lista-vip-line-2);
		background: var(--nova-lista-vip-bg-3);
		color: var(--nova-lista-vip-ink);
	}

	.nova-lista-ads--tpl-vip .nova-lista-ad-vip__btn--primary:hover {
		border-color: var(--nova-lista-vip-accent-hover);
		background: var(--nova-lista-vip-accent-hover);
		color: var(--nova-lista-vip-accent-ink);
	}

	.nova-lista-ads--tpl-vip .nova-lista-ad-vip__btn:hover svg {
		transform: translateX(3px);
	}
}

@media (min-width: 721px) {
	.nova-lista-ads--tpl-vip .nova-lista-ad--vip {
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: 14px 18px;
	}

	.nova-lista-ads--tpl-vip .nova-lista-ad-vip__side {
		display: grid;
		gap: 8px;
		justify-items: center;
		align-self: start;
	}

	.nova-lista-ads--tpl-vip .nova-lista-ad-vip__tag {
		grid-column: auto;
		justify-self: center;
	}

	.nova-lista-ads--tpl-vip .nova-lista-ad-vip__photo {
		width: 76px;
		height: 76px;
		border-radius: 20px;
	}

	.nova-lista-ads--tpl-vip .nova-lista-ad-vip__cta {
		grid-column: auto;
		grid-auto-flow: row;
		grid-auto-columns: auto;
		padding-top: 10px;
	}
}

/* Entrance, run by whoever inserts the ad (adds .is-play). */
.nova-lista-ads--tpl-vip .nova-lista-ad--vip.is-play {
	animation: nova-lista-vip-rise .32s var(--nova-lista-vip-ease-out) both;
}

.nova-lista-ads--tpl-vip .nova-lista-ad--vip.is-play .nova-lista-ad-vip__chip {
	animation: nova-lista-vip-chip .26s var(--nova-lista-vip-ease-out) .3s both;
}

.nova-lista-ads--tpl-vip .nova-lista-ad--vip.is-play .nova-lista-ad-vip__chip:nth-child(2) {
	animation-delay: .35s;
}

.nova-lista-ads--tpl-vip .nova-lista-ad--vip.is-play .nova-lista-ad-vip__chip:nth-child(3) {
	animation-delay: .4s;
}

.nova-lista-ads--tpl-vip .nova-lista-ad--vip.is-play::before {
	animation: nova-lista-vip-trace 1.6s linear .35s both;
}

@keyframes nova-lista-vip-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@keyframes nova-lista-vip-chip {
	from { opacity: 0; transform: translateY(6px) scale(.96); }
	to { opacity: 1; transform: none; }
}

@keyframes nova-lista-vip-trace {
	0% { --nova-lista-vip-trace: 0deg; opacity: 0; }
	10% { opacity: 1; }
	85% { opacity: 1; }
	100% { --nova-lista-vip-trace: 360deg; opacity: 0; }
}

@keyframes nova-lista-vip-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.nova-lista-ads--tpl-vip .nova-lista-ad--vip.is-play,
	.nova-lista-ads--tpl-vip .nova-lista-ad--vip.is-play .nova-lista-ad-vip__chip {
		animation: nova-lista-vip-fade .2s ease both;
	}

	.nova-lista-ads--tpl-vip .nova-lista-ad--vip.is-play::before {
		animation: none;
	}
}
