/*
 * Danielle Nia: CSS theme.json can't express.
 *
 * Use the presets (--wp--preset--*, --wp--custom--*), never raw values.
 * Block styles registered in functions.php each get a section here.
 */

/* 1. Base ---------------------------------------------------------------- */

/* Short pages: the footer sits at the bottom of the window, not above white space. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* No header: the page is main then the footer, which meet with no gap.
 * (The Template Part block has no margin setting, and core puts the root
 * block gap between top-level parts.) */
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* Captions over a photo (album covers in the home hero) take the Cover's
 * text colour; core's image caption colour is grey, for white pages. */
.wp-block-cover .wp-element-caption {
	color: inherit;
}

/* <main> takes focus only from the skip link (tabindex="-1", functions.php),
 * never from Tab, so it needs no ring. */
main[tabindex="-1"]:focus {
	outline: none;
}

:where(a):focus-visible,
:where(.wp-element-button):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* 2. Social Icons, "Offset buttons" style (the links list) ----------------
 * White buttons with an icon and a label, and the periwinkle offset shadow
 * that shrinks as the button moves into it on hover. Colours come from the
 * block's own icon colour settings (ink on white). :root lifts these rules
 * over core's per-brand colours and its hover zoom.
 */

:root .wp-block-social-links.is-style-offset-buttons {
	padding-left: 0;
}

:root .wp-block-social-links.is-style-offset-buttons .wp-social-link {
	border-radius: var(--wp--preset--border-radius--button);
	box-shadow: var(--wp--preset--shadow--offset);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

:root .wp-block-social-links.is-style-offset-buttons .wp-social-link:hover,
:root .wp-block-social-links.is-style-offset-buttons .wp-social-link:focus-within {
	box-shadow: var(--wp--preset--shadow--offset-pressed);
	transform: translate(3px, 3px);
}

:root .wp-block-social-links.is-style-offset-buttons .wp-block-social-link-anchor {
	gap: var(--wp--preset--spacing--x-small);
	padding: var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--medium) var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--small);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--custom--type--button--font-size);
	font-weight: var(--wp--custom--type--button--font-weight);
	line-height: var(--wp--custom--type--button--line-height);
	text-decoration: none;
}

:root .wp-block-social-links.is-style-offset-buttons .wp-block-social-link-anchor svg {
	width: 1.5rem;
	height: 1.5rem;
	flex: none;
}

/* Core shrinks visible labels to 0.65em; here they're the button text. */
:root .wp-block-social-links.is-style-offset-buttons .wp-block-social-link-label {
	margin-inline: 0;
	font-size: inherit;
}

/* Phones (below the mobile breakpoint, 600px): full-width stacked buttons. */
@media (max-width: 599px) {
	:root .wp-block-social-links.is-style-offset-buttons {
		flex-direction: column;
		align-items: stretch;
		max-width: 22rem;
		margin-inline: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	:root .wp-block-social-links.is-style-offset-buttons .wp-social-link {
		transition: none;
	}

	:root .wp-block-social-links.is-style-offset-buttons .wp-social-link:hover,
	:root .wp-block-social-links.is-style-offset-buttons .wp-social-link:focus-within {
		transform: none;
	}
}
