/* Careers: a ledger of open roles. Each row opens its posting in a
   right-hand drawer (a native <dialog>, opened by wtc-careers.js).
   Without JavaScript the postings print in full under their rows. */
.wtc-jobs {
	--wtc-slate-deep: #46586a;
	--wtc-slate-soft: #8b99a8;
	--wtc-rule: #e5e1d6;
	padding: clamp(1.5rem, 4vh, 2.5rem) 0 clamp(3rem, 8vh, 5rem);
}

.wtc-jobs__inner {
	max-width: var(--wp--style--global--wide-size, 1340px);
	margin-inline: auto;
	padding-inline: var(--wp--style--root--padding-left, 2rem) var(--wp--style--root--padding-right, 2rem);
}

.wtc-jobs__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.25rem;
}

.wtc-jobs__head h2 {
	margin: 0;
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.wtc-jobs__count,
.wtc-jobs__num,
.wtc-jobs__meta,
.wtc-jobs__more,
.wtc-jobs__eyebrow,
.wtc-jobs__facts,
.wtc-jobs__close {
	font-family: var(--wp--preset--font-family--geist-mono);
	letter-spacing: 0.12em;
	color: var(--wtc-slate-deep);
}

.wtc-jobs__count { font-size: 12px; }

.wtc-jobs__list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--wtc-rule);
}

.wtc-jobs__item { border-bottom: 1px solid var(--wtc-rule); }

.wtc-jobs__row {
	-webkit-appearance: none;
	appearance: none;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas: "num title more" "num meta more";
	column-gap: 1.1rem;
	row-gap: 0.45rem;
	align-items: baseline;
	width: 100%;
	margin: 0;
	padding: 1.35rem 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: padding 300ms cubic-bezier(0.42, 0, 0.58, 1);
}

.wtc-jobs__num { grid-area: num; font-size: 12px; color: var(--wtc-slate-soft); }

.wtc-jobs__title {
	grid-area: title;
	font-size: clamp(1.25rem, 2vw, 1.625rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.wtc-jobs__meta,
.wtc-jobs__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1.25rem;
	font-size: 11px;
}

.wtc-jobs__meta { grid-area: meta; }

.wtc-jobs__more {
	grid-area: more;
	align-self: center;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 11px;
	text-transform: uppercase;
}

.wtc-jobs__more::after {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wtc-slate-deep);
	transition: transform 300ms cubic-bezier(0.42, 0, 0.58, 1);
}

.wtc-jobs__row:hover,
.wtc-jobs__row:focus-visible { padding-left: 0.6rem; }

.wtc-jobs__row:hover .wtc-jobs__more::after,
.wtc-jobs__row:focus-visible .wtc-jobs__more::after { transform: scale(1.6); }

.wtc-jobs__row:focus-visible,
.wtc-jobs__close:focus-visible,
.wtc-jobs__applybtn:focus-visible {
	outline: 2px solid var(--wtc-slate-deep);
	outline-offset: 3px;
}

.wtc-jobs__open {
	margin: 1.75rem 0 0;
	color: var(--wp--preset--color--accent-4);
	font-size: 1.0625rem;
}

.wtc-jobs__open a,
.wtc-jobs__apply p a { color: var(--wp--preset--color--contrast); }

/* ---- The drawer ----------------------------------------------------- */

.wtc-jobs__drawer {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(34rem, 100vw);
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid var(--wtc-rule);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.wtc-jobs__drawer::backdrop { background: rgba(4, 4, 27, 0.42); }

.wtc-jobs__drawer[open] { animation: wtc-jobs-in 360ms cubic-bezier(0.22, 1, 0.36, 1); }
.wtc-jobs__drawer[open]::backdrop { animation: wtc-jobs-fade 360ms ease; }
.wtc-jobs__drawer.is-closing { animation: wtc-jobs-out 220ms ease-in forwards; }
.wtc-jobs__drawer.is-closing::backdrop { animation: wtc-jobs-fade 220ms ease reverse forwards; }

@keyframes wtc-jobs-in { from { transform: translateX(100%); } }
@keyframes wtc-jobs-out { to { transform: translateX(100%); } }
@keyframes wtc-jobs-fade { from { opacity: 0; } }

.wtc-jobs__sheet { padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2.5rem; }

.wtc-jobs__sheethead {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.wtc-jobs__eyebrow { font-size: 12px; }

.wtc-jobs__close {
	-webkit-appearance: none;
	appearance: none;
	padding: 0.45rem 0.9rem;
	border: 1px solid rgba(70, 88, 106, 0.35);
	border-radius: 999px;
	background: none;
	font-size: 11px;
	text-transform: uppercase;
	cursor: pointer;
}

.wtc-jobs__close:hover { border-color: var(--wtc-slate-deep); }

.wtc-jobs__sheet h2 {
	margin: 0 0 0.9rem;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.wtc-jobs__facts { margin: 0 0 1.75rem; }

.wtc-jobs__intro {
	margin: 0 0 2rem;
	font-size: 1.125rem;
	line-height: 1.55;
}

.wtc-jobs__sheet h3 {
	margin: 0 0 0.9rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--wtc-rule);
	font-size: 1.0625rem;
	font-weight: 600;
}

.wtc-jobs__sheet ul {
	display: grid;
	gap: 0.6rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.wtc-jobs__sheet li {
	position: relative;
	padding-left: calc(6px + 0.85rem);
	color: var(--wp--preset--color--accent-4);
	font-size: 1rem;
	line-height: 1.5;
}

.wtc-jobs__sheet li::before {
	content: "";
	position: absolute;
	left: 0;
	top: calc(0.75em - 3px);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #5e7285;
}

.wtc-jobs__apply {
	padding-top: 1.5rem;
	border-top: 1px solid var(--wtc-rule);
}

.wtc-jobs__applybtn {
	display: inline-block;
	padding: 0.6rem 1.25rem;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: 999px;
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	background-image: radial-gradient(circle, var(--wp--preset--color--base) 45%, transparent 55%);
	background-size: 0.625rem 0.625rem;
	background-repeat: no-repeat;
	background-position: -0.75rem 50%;
	transition:
		background-position 300ms cubic-bezier(0.42, 0, 0.58, 1),
		padding 300ms cubic-bezier(0.42, 0, 0.58, 1);
}

.wtc-jobs__applybtn:hover,
.wtc-jobs__applybtn:focus-visible {
	background-position: 1.25rem 50%;
	padding-left: calc(1.25rem + 0.625rem + 0.5rem);
}

.wtc-jobs__apply p {
	margin: 1rem 0 0;
	color: var(--wp--preset--color--accent-4);
	font-size: 0.9375rem;
}

/* No JavaScript: nothing can open a dialog, so print each posting in
   place and drop the controls that would do nothing. */
html:not(.wtc-js) .wtc-jobs__drawer {
	display: block;
	position: static;
	width: auto;
	height: auto;
	border: 0;
	overflow: visible;
}

html:not(.wtc-js) .wtc-jobs__sheet { padding: 0 0 2rem; }
html:not(.wtc-js) .wtc-jobs__sheethead,
html:not(.wtc-js) .wtc-jobs__sheet h2,
html:not(.wtc-js) .wtc-jobs__facts,
html:not(.wtc-js) .wtc-jobs__more { display: none; }
html:not(.wtc-js) .wtc-jobs__row { cursor: default; }

@media (max-width: 600px) {
	.wtc-jobs__row {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "title more" "meta meta";
	}
	.wtc-jobs__num { display: none; }
	.wtc-jobs__more { font-size: 0; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.wtc-jobs__drawer[open],
	.wtc-jobs__drawer[open]::backdrop,
	.wtc-jobs__drawer.is-closing,
	.wtc-jobs__drawer.is-closing::backdrop { animation: none; }
	.wtc-jobs__row,
	.wtc-jobs__more::after,
	.wtc-jobs__applybtn { transition: none; }
}
