/*
 * The footer, on every site. Each site has a footer template part of its own: the main site's keeps 10.7px at the
 * sides, PS IN's 33px. Its icons' look is still in Fluent snippet 103 "Main Page".
 */

/* The footer sits at the bottom of the screen on a short page (an empty cart, a wishlist), and keeps the same air above
   it on every page: 48px, 32px on a phone (Kirill, 2026-10-22: the wishlist's footer stuck to the list; pin it to the
   bottom instead of playing with gaps). The page's blocks keep their widths and places in the column (checked on nine
   kinds of page). */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

.wp-site-blocks > footer.wp-block-template-part {
	margin-top: auto;
	padding-top: 48px;
}

/* What the pages kept at their end to stand off the footer goes, so that air is the footer's alone. Measured on a phone
   on 2026-10-22 it ranged from 3px (catalogs) to 171px (the front page): spacers of 20-155px at the end of the
   content, the wrapper's own bottom padding (60px on the wishlist, 24px around the cart and the landings) and the last
   block's bottom margin. Kirill: the wishlist's 110px and the cart's 85px to the footer's line were too much. Only
   along the page's last edge, three blocks deep; padding stays inside the blocks below the wrapper, which may be
   coloured. */
.wp-site-blocks > .wp-block-spacer:has(+ footer.wp-block-template-part),
.wp-site-blocks > :has(+ footer.wp-block-template-part) > .wp-block-spacer:last-child,
.wp-site-blocks > :has(+ footer.wp-block-template-part) > :last-child > .wp-block-spacer:last-child,
.wp-site-blocks > :has(+ footer.wp-block-template-part) > :last-child > :last-child > .wp-block-spacer:last-child {
	display: none;
}

.wp-site-blocks > :has(+ footer.wp-block-template-part) {
	padding-bottom: 0 !important; /* over the blocks' own settings */
}

.wp-site-blocks > :has(+ footer.wp-block-template-part),
.wp-site-blocks > :has(+ footer.wp-block-template-part) > :last-child,
.wp-site-blocks > :has(+ footer.wp-block-template-part) > :last-child > :last-child {
	margin-bottom: 0 !important;
}

@media (max-width: 781px) {
	.wp-site-blocks > footer.wp-block-template-part {
		padding-top: 32px;
	}
}

/* The logo as large as the header's (149 x 40, snippet 194): it was 183 x 49 (Kirill, 2026-10-22). Grey and dimmed:
   in full colour it drew the eye away from the page above it (same day); its colour comes back under the pointer. */
footer .wp-block-site-logo img {
	width: 149px;
	height: auto;
	filter: grayscale(1);
	opacity: 0.55;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

@media (hover: hover) {
	footer .wp-block-site-logo a:hover img {
		filter: none;
		opacity: 1;
	}
}

/* On a phone the footer keeps the header's and the pages' 10px from the screen edges (storefront/css/layout.css);
   the side padding is the group's own setting, an inline style */
@media (max-width: 781px) {
	footer.wp-block-template-part > .wp-block-group {
		padding-left: var(--gp-phone-gutter, 10px) !important;
		padding-right: var(--gp-phone-gutter, 10px) !important;
	}
}

/* The MAX icon: a solid round shape at 90% of its 24px box (snippet 103) looked a size larger than the Telegram, VK and
   YouTube glyphs next to it; 72% still did (Kirill, 2026-10-22). 62% is a 60% shape: snippet 103's outline has 2%
   of room round it since the same day, as touching its box the shape lost its right edge on Kirill's iPhone. */
footer li.maxsocialfooter.wp-block-social-link svg {
	--max-size: 62%;
}

/* 12px between the icons' shapes. Their boxes are alike, 24px, but the glyphs in them are not (Telegram's is 13px
   wide, VK's and YouTube's 20, MAX's 14), and the gaps read 13, 9 and 12px. Weighed over the block's own
   ".wp-block-social-links .wp-block-social-link.wp-social-link { margin: 0 }". */
footer .wp-block-social-links .wp-block-social-link.wp-social-link-vk {
	margin-left: -1px;
}

footer .wp-block-social-links .wp-block-social-link.wp-social-link-youtube {
	margin-left: 3px;
}
