/*
 * Contact lines (client feedback FB-45, 2026-11-17; functions.php, "Contact lines with an icon"). A
 * paragraph with the Email, Phone or Address style shows an icon in place of its written label. Core
 * loads this file in the editor and on any page that renders a paragraph.
 *
 * Flow:
 *   1. The paragraph keeps room on its start side for the icon, and every line of its text starts after
 *      that room, so a long address or email wraps under the text, never under the icon. A long word
 *      (an email address) breaks rather than overflow a 390px phone.
 *   2. The icon is the paragraph's ::before, placed in that room: a 1.25em square painted in the text
 *      colour through the line icon as a mask, as the footer's group links do. A text colour chosen
 *      from the palette in the block sidebar colours the icon too.
 *   3. It is centred on the first line: its top is half the line height (1lh) minus half its own
 *      height. A browser without the lh unit keeps the fixed offset declared before it.
 *   4. The icon replaces a visible label, so functions.php adds the label as the generated content's
 *      alternative text (`content: "" / "Email"`, translated). The plain `content: ""` here is what a
 *      browser without that syntax keeps: the icon still shows, without a name.
 */
:is(.is-style-ngheduoc-contact-email, .is-style-ngheduoc-contact-phone, .is-style-ngheduoc-contact-address) {
	--ngheduoc-contact-icon: 1.25em;
	overflow-wrap: anywhere; /* Step 1: a long email breaks inside the text column. */
	padding-inline-start: calc(var(--ngheduoc-contact-icon) + 0.625rem); /* Step 1: the icon's room. */
	position: relative;
}

:is(.is-style-ngheduoc-contact-email, .is-style-ngheduoc-contact-phone, .is-style-ngheduoc-contact-address)::before {
	background-color: currentcolor; /* Step 2. */
	content: ""; /* Step 4: fallback; functions.php adds the alternative text. */
	height: var(--ngheduoc-contact-icon);
	inset-inline-start: 0;
	-webkit-mask: url("../images/icons/envelope.svg") center / contain no-repeat;
	mask: url("../images/icons/envelope.svg") center / contain no-repeat;
	position: absolute;
	top: 0.2em;
	top: calc((1lh - var(--ngheduoc-contact-icon)) / 2); /* Step 3. */
	width: var(--ngheduoc-contact-icon);
}

.is-style-ngheduoc-contact-phone::before {
	-webkit-mask-image: url("../images/icons/phone.svg");
	mask-image: url("../images/icons/phone.svg");
}

.is-style-ngheduoc-contact-address::before {
	-webkit-mask-image: url("../images/icons/map-pin.svg");
	mask-image: url("../images/icons/map-pin.svg");
}
