/*
 * PSU Job Board. Deliberately light: fonts, colors and button styles come from the theme.
 * Lines use a translucent version of the text color so they work on light or dark themes.
 */

.psu-jobs,
.psu-job-detail {
	--psu-line: rgba(127, 127, 127, 0.35);
	--psu-error: #b3261e;
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
	.psu-jobs,
	.psu-job-detail {
		--psu-line: color-mix(in srgb, currentColor 20%, transparent);
	}
}

/* Fields */
.psu-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 0;
}

.psu-field label {
	font-weight: 600;
}

.psu-optional {
	font-weight: 400;
	opacity: 0.7;
}

.psu-jobs input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.psu-jobs select,
.psu-apply input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.psu-apply textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.55em 0.7em;
	font: inherit;
	color: inherit;
	background-color: transparent;
	border: 1px solid var(--psu-line);
	border-radius: 4px;
}

.psu-jobs select option {
	color: initial;
}

.psu-jobs :focus-visible,
.psu-apply :focus-visible,
.psu-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.psu-hint,
.psu-eeo {
	margin: 0;
	font-size: 0.875em;
	opacity: 0.75;
}

/* Search bar and filters */
.psu-jobs__search {
	display: grid;
	gap: 1.25rem;
	margin: 0 0 1.5rem;
}

.psu-jobs__keyword {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
}

.psu-jobs__keyword .psu-field--grow {
	flex: 1 1 16rem;
}

.psu-jobs__keyword .psu-field--submit {
	flex: 0 0 auto;
}

.psu-jobs__filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	gap: 1rem 1.5rem;
}

.psu-filter {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.psu-filter legend {
	margin: 0 0 0.4rem;
	padding: 0;
	font-weight: 600;
}

.psu-check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.25rem 0;
	cursor: pointer;
}

.psu-check input {
	flex: 0 0 auto;
	width: 1.1em;
	height: 1.1em;
	margin: 0;
}

/* Results */
.psu-jobs__count {
	margin: 0 0 0.75rem;
	font-size: 0.9em;
}

.psu-jobs__count a {
	margin-left: 0.75rem;
}

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

.psu-job {
	margin: 0;
	padding: 1.1rem 0;
	border-bottom: 1px solid var(--psu-line);
}

.psu-job__title {
	margin: 0 0 0.3rem;
	font-size: 1.2em;
	line-height: 1.3;
}

.psu-job__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 1.25rem;
	margin: 0;
	font-weight: 600;
}

.psu-job__posted {
	margin: 0.3rem 0 0;
	font-size: 0.875em;
	opacity: 0.75;
}

.psu-jobs__pages {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-top: 1.5rem;
}

.psu-jobs__pages .page-numbers {
	padding: 0.35em 0.7em;
}

.psu-jobs__pages .current {
	font-weight: 700;
	border-bottom: 2px solid currentColor;
}

/* Single job */
.psu-job-detail__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: 0.9rem 1.5rem;
	margin: 0 0 1.5rem;
	padding: 1rem 0;
	border-top: 1px solid var(--psu-line);
	border-bottom: 1px solid var(--psu-line);
}

.psu-job-detail__facts dt {
	margin: 0;
	font-size: 0.85em;
	opacity: 0.75;
}

.psu-job-detail__facts dd {
	margin: 0.1rem 0 0;
	font-weight: 600;
}

.psu-job-detail .psu-apply-link {
	margin: 0 0 2rem;
	padding: 0;
}

.psu-button {
	display: inline-block;
	padding: 0.6em 1.1em;
	font-weight: 600;
	text-decoration: none;
	border: 2px solid currentColor;
	border-radius: 4px;
}

/* Application */
.psu-apply {
	max-width: 40rem;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 2px solid currentColor;
}

.psu-apply form {
	display: grid;
	gap: 1.1rem;
}

.psu-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.1rem;
}

@media (max-width: 600px) {
	.psu-row {
		grid-template-columns: 1fr;
	}
}

.psu-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-weight: 400 !important;
}

.psu-consent input {
	flex: 0 0 auto;
	margin-top: 0.3em;
}

.psu-field--error input,
.psu-field--error textarea {
	border-color: var(--psu-error) !important;
}

.psu-field__error {
	margin: 0;
	font-size: 0.875em;
	color: var(--psu-error);
}

.psu-alert {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--psu-error);
	background: rgba(179, 38, 30, 0.08);
}

/* Honeypot: hidden from people, visible to bots */
.psu-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
