/*
 * Service pages: the Social practice's own rules on the hub pattern (VOY-1593).
 *
 * /social/, /social/management/ and /social/email/ are built from the shared
 * components exactly as /seo/ is (patterns/umbrella-seo.php). These are the
 * few things the Social pages need that SEO does not, and every rule is
 * scoped under .vy-svc-page.is-style-umbrella-social, so no other page can
 * see them.
 *
 *   - /social/'s instrument tabs (panes --social, --email, --source) get a
 *     speech bubble, an envelope and a page instead of the search glyph. Its
 *     posts and sources are lists, not a map pack, so their rows read as
 *     cards like the email steps, and each pane's content sits in the middle
 *     of the body the copy column sets;
 *   - /social/management/ and /social/email/ have a one-pane instrument.
 *     svc-hero.js builds tabs only for two or more panes, so the panel keeps
 *     its no-script layout; the pane is centred in it at a larger size and
 *     its foot note reads under the list;
 *   - no Social plan is marked Recommended (the pages never named one), so
 *     the compare drawer's fourth column loses the recommended tint;
 *   - /social/email/ has one plan, so its card takes the full row, with its
 *     key lines in a second column from 1024 up;
 *   - /social/ has two pair cards, not three, so the grid has two columns.
 *
 * Colour is the practice pair --um-500 / --um-700; the black in the data URIs
 * is mask alpha.
 */

.vy-svc-page.is-style-umbrella-social {
	--vy-ic-post: 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 5h16v11H9l-5 4z'/%3E%3C/svg%3E");
	--vy-ic-mail: 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' y='5' width='18' height='14' rx='1.5'/%3E%3Cpath d='M3.5 6l8.5 7 8.5-7'/%3E%3C/svg%3E");
	--vy-ic-page: 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='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E");
}

/* ---- Hero instrument ---- */

.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub .vy-svc-inst__tabs button.is-social::before {
	-webkit-mask-image: var(--vy-ic-post);
	mask-image: var(--vy-ic-post);
}
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub .vy-svc-inst__tabs button.is-email::before {
	-webkit-mask-image: var(--vy-ic-mail);
	mask-image: var(--vy-ic-mail);
}
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub .vy-svc-inst__tabs button.is-source::before {
	-webkit-mask-image: var(--vy-ic-page);
	mask-image: var(--vy-ic-page);
}

/* The posts and the sources read as cards, as the email edition's steps do. */
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub .vy-svc-inst__list { gap: 8px; }
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub .vy-svc-inst__list > li:nth-child(n) {
	padding: 13px 16px 13px 44px;
	border-color: var(--border-hair);
	background: var(--bg-canvas);
}
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub .vy-svc-inst__list > li.is-you:nth-child(n) {
	border-color: color-mix(in oklab, var(--um-500) 55%, transparent);
	background: color-mix(in oklab, var(--um-500) 8%, var(--bg-canvas));
}

/* With tabs, each pane fills the body the copy column sets: its content sits in
   the middle of the space under the pane head, not at the top of it. */
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub.is-js .vy-svc-inst__head { margin-bottom: auto; }
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub.is-js .vy-svc-inst__pane > :is(.vy-svc-inst__list, .vy-svc-calendar__count) { margin-bottom: auto; }

/* One pane: no tabs, so the panel keeps the no-script layout. Centre the pane
   in the panel the copy column stretches, at a larger size, rather than leave
   the space under it. */
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub:not(.is-js) { justify-content: center; }
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub:not(.is-js) .vy-svc-inst__list > li:nth-child(n) { padding: 18px 20px 18px 48px; }
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub:not(.is-js) .vy-svc-inst__list strong { font-size: 17px; }
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub:not(.is-js) .vy-svc-calendar__rows > li:nth-child(n) {
	padding: 18px 20px 18px 48px;
	font-size: 16px;
}
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub:not(.is-js) .vy-svc-calendar__rows > li::before { top: calc(50% - 5px); }
.vy-svc-page.is-style-umbrella-social .vy-svc-inst--hub:not(.is-js) .vy-svc-inst__foot {
	padding-top: 12px;
	border-top: 1px solid var(--border-hair);
}

/* ---- Plan cards ---- */

/* No recommended plan, so no recommended column. */
.vy-svc-page.is-style-umbrella-social .vy-svc-plancmp :is(th, td):nth-child(4) { background: none; }

/* One plan: the card takes the row. From 1024 up it is two columns, the name,
   price and pitch on the left and the key lines on the right. */
.vy-svc-page.is-style-umbrella-social .vy-svc-plancards:not(:has(> .vy-svc-plan + .vy-svc-plan)) {
	grid-template-columns: minmax(0, 1fr);
	padding-top: 0;
}
@media (min-width: 1024px) {
	.vy-svc-page.is-style-umbrella-social .vy-svc-plancards:not(:has(> .vy-svc-plan + .vy-svc-plan)) > .vy-svc-plan {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
		/* The key lines span the four rows; the pitch's row takes what is left. */
		grid-template-rows: auto auto auto 1fr;
		align-items: start;
		gap: 12px 56px;
		padding: 32px;
	}
	.vy-svc-page.is-style-umbrella-social .vy-svc-plancards:not(:has(> .vy-svc-plan + .vy-svc-plan)) > .vy-svc-plan > * { grid-column: 1; }
	.vy-svc-page.is-style-umbrella-social .vy-svc-plancards:not(:has(> .vy-svc-plan + .vy-svc-plan)) > .vy-svc-plan > .vy-svc-plan__keys {
		grid-column: 2;
		grid-row: 1 / span 4;
		align-self: start;
		margin: 0;
	}
}

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

@media (min-width: 1024px) {
	.vy-svc-page.is-style-umbrella-social .vy-svc-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* A card twice as wide would make the fanned covers twice as wide: keep them the
   size SEO's three-card row gives them. */
.vy-svc-page.is-style-umbrella-social .vy-svc-pic__cover {
	width: min(46%, 220px);
	margin-left: calc(min(46%, 220px) / -2);
}
