/*
 * CONT-3: contacts by department.
 * A ruled directory: each team or desk with a line on what to ask it, its
 * phone number and its email address. One under another on a phone; from a
 * tablet up the three parts stand on one line.
 */

/* One desk under another at every width. */
.wprk-section.wprk-cont-3 .wprk-cont-3__list {
	border-block-start: 1px solid var(--wprk-border);
	gap: 0;
	grid-template-columns: minmax(0, 1fr);
}

.wprk-cont-3 .wprk-cont-3__desk {
	border-block-end: 1px solid var(--wprk-border);
	display: grid;
	gap: 0.2rem;
	padding-block: var(--wp--preset--spacing--30);
}

.wprk-cont-3 .wprk-cont-3__desk > * {
	margin: 0;
	min-width: 0;
}

.wprk-cont-3 .wprk-cont-3__desk :where(h3) {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
	overflow-wrap: break-word;
}

.wprk-cont-3 .wprk-cont-3__desk .wprk-muted {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

/*
 * Phone and email: plain figures and letters, underlined in the accent colour.
 * Staff type the words; the theme makes the link (inc/contact-links.php).
 */
.wprk-cont-3 .wprk-cont-3__desk :where(.wprk-cont-3__phone, .wprk-cont-3__email) {
	color: var(--wprk-heading);
	font-variant-numeric: lining-nums tabular-nums;
	font-weight: 500;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.wprk-cont-3 .wprk-cont-3__desk .wprk-muted + :where(.wprk-cont-3__phone, .wprk-cont-3__email) {
	margin-block-start: var(--wp--preset--spacing--10);
}

/*
 * The padding makes each link a tap target 2.75rem high or more. The negative
 * margin gives that height back, so the lines keep their distance.
 */
.wprk-cont-3 .wprk-cont-3__desk :where(.wprk-cont-3__phone, .wprk-cont-3__email) a {
	color: var(--wprk-heading);
	display: inline-block;
	margin-block: -0.4rem;
	padding-block: 0.7rem;
	text-decoration-color: var(--wprk-accent);
	text-underline-offset: 0.25em;
}

.wprk-cont-3 .wprk-cont-3__desk :where(.wprk-cont-3__phone, .wprk-cont-3__email) a:hover {
	text-decoration-color: currentColor;
}

/* From a tablet up: who, then the phone, then the email, on one line. */
@media (min-width: 782px) {
	.wprk-cont-3 .wprk-cont-3__desk {
		align-items: center;
		column-gap: var(--wp--preset--spacing--40);
		grid-template-columns: minmax(0, 1fr) minmax(0, 12rem) minmax(0, 17rem);
	}

	.wprk-cont-3 .wprk-cont-3__desk > :where(h3, .wprk-muted) {
		grid-column: 1;
	}

	.wprk-cont-3 .wprk-cont-3__desk > .wprk-cont-3__phone {
		grid-column: 2;
		grid-row: 1 / span 2;
	}

	.wprk-cont-3 .wprk-cont-3__desk > .wprk-cont-3__email {
		grid-column: 3;
		grid-row: 1 / span 2;
	}

	.wprk-cont-3 .wprk-cont-3__desk .wprk-muted + :where(.wprk-cont-3__phone, .wprk-cont-3__email) {
		margin-block-start: 0;
	}
}

/* Editor: the words are not a link yet, and look the way the link will. */
.editor-styles-wrapper .wprk-cont-3 .wprk-cont-3__desk :where(.wprk-cont-3__phone, .wprk-cont-3__email) {
	text-decoration: underline;
	text-decoration-color: var(--wprk-accent);
	text-underline-offset: 0.25em;
}

@media (prefers-reduced-motion: no-preference) {
	.wprk-cont-3 .wprk-cont-3__desk a {
		transition: text-decoration-color 0.18s ease;
	}
}
