/*
 * Service pages: the Ads practice's own rules on the hub pattern (VOY-1594).
 *
 * /ads/, /ads/google/ and /ads/meta/ are built from the shared components
 * exactly as /seo/ is (patterns/umbrella-seo.php). These are the few things
 * the Ads pages need that SEO does not, and every rule is scoped under
 * .vy-svc-page.is-style-umbrella-ads, which only those three page groups
 * carry (cards elsewhere use the style without vy-svc-page). The loader
 * enqueues every svc-*.css on every umbrella page, which is why the scope
 * matters.
 *
 *   - Tab icons for the hub panes these pages add: one budget, tracked first,
 *     one report, every week and the remarketing loop.
 *   - /ads/ sells four plans, not three: four cards across from 1200, two
 *     from 1024, and the compare drawer's fifth column shown on a phone.
 *   - No Ads plan is the recommended one, so no drawer column is tinted.
 *   - Two pair cards, not three, so the pictures run two across.
 *
 * Colours are the practice pair --um-500 / --um-700 only. The icons are masks
 * over currentColor; the black in their data URIs is mask alpha.
 */

.vy-svc-page.is-style-umbrella-ads {
	--vy-ic-budget: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='6.5' width='17' height='12' rx='2'/%3E%3Cpath d='M3.5 10.5h17M15.5 14.5h2'/%3E%3C/svg%3E");
	--vy-ic-tracked: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M8.5 12.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E");
	--vy-ic-report: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='3.5' width='13' height='17' rx='1.5'/%3E%3Cpath d='M9 8.5h6M9 12h6M9 15.5h4'/%3E%3C/svg%3E");
	--vy-ic-week: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5.5' width='16' height='14' rx='2'/%3E%3Cpath d='M4 10h16M8.5 3.5v4M15.5 3.5v4'/%3E%3C/svg%3E");
	--vy-ic-loop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12a7.5 7.5 0 0 1 13-5.1M19.5 12a7.5 7.5 0 0 1-13 5.1'/%3E%3Cpath d='M17.5 3.5v3.6h-3.6M6.5 20.5v-3.6h3.6'/%3E%3C/svg%3E");
}

/* ---- Tab icons ------------------------------------------------------------- */

.vy-svc-page.is-style-umbrella-ads .vy-svc-inst--hub .vy-svc-inst__tabs button.is-budget::before {
	-webkit-mask-image: var(--vy-ic-budget);
	mask-image: var(--vy-ic-budget);
}
.vy-svc-page.is-style-umbrella-ads .vy-svc-inst--hub .vy-svc-inst__tabs button.is-tracked::before {
	-webkit-mask-image: var(--vy-ic-tracked);
	mask-image: var(--vy-ic-tracked);
}
.vy-svc-page.is-style-umbrella-ads .vy-svc-inst--hub .vy-svc-inst__tabs button.is-report::before {
	-webkit-mask-image: var(--vy-ic-report);
	mask-image: var(--vy-ic-report);
}
.vy-svc-page.is-style-umbrella-ads .vy-svc-inst--hub .vy-svc-inst__tabs button.is-weekly::before {
	-webkit-mask-image: var(--vy-ic-week);
	mask-image: var(--vy-ic-week);
}
.vy-svc-page.is-style-umbrella-ads .vy-svc-inst--hub .vy-svc-inst__tabs button.is-loop::before {
	-webkit-mask-image: var(--vy-ic-loop);
	mask-image: var(--vy-ic-loop);
}

/* ---- Plan cards: four on /ads/ ---------------------------------------------- */

@media (min-width: 1024px) {
	.vy-svc-page.is-style-umbrella-ads .vy-svc-plancards:has(> .vy-svc-plan:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
	.vy-svc-page.is-style-umbrella-ads .vy-svc-plancards:has(> .vy-svc-plan:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---- Compare drawer: no recommended plan, and a fifth column on a phone ----- */

.vy-svc-page.is-style-umbrella-ads .vy-svc-plancmp :is(th, td):nth-child(4) { background: none; }
@media (max-width: 767px) {
	.vy-svc-page.is-style-umbrella-ads .vy-svc-plancmp[data-plan="5"] :is(th, td):nth-child(5) { display: table-cell; }
}

/* ---- Pair cards: two across ------------------------------------------------ */

@media (min-width: 1024px) {
	.vy-svc-page.is-style-umbrella-ads .vy-svc-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Four plan columns in the drawer: even widths, so no column reads as the pick. */
@media (min-width: 768px) {
	.vy-svc-page.is-style-umbrella-ads .vy-svc-plancmp table:has(th:nth-child(5)) :is(th, td):not(:first-child) { width: 18.5%; }
}
