/*
 * Public job pages. Inherit the theme's fonts and colours (currentColor and
 * translucent tints), so the pages look at home in any theme.
 */

.cohr-jobs {
	display: grid;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cohr-job {
	position: relative;
	margin: 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cohr-job:hover,
.cohr-job:focus-within {
	border-color: rgba(0, 0, 0, 0.22);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.cohr-job-title {
	margin: 0 0 0.75rem;
	font-size: 1.25em;
	line-height: 1.3;
}

.cohr-jobs .cohr-job-title a,
.cohr-jobs .cohr-job-link {
	text-decoration: none;
}

.cohr-jobs .cohr-job-title a:hover {
	text-decoration: underline;
}

/* The whole card is clickable through the title link. */
.cohr-job-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.cohr-job-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	font-weight: 600;
}

.cohr-job-link::after {
	content: "→";
	transition: transform 0.15s ease;
}

.cohr-job:hover .cohr-job-link::after {
	transform: translateX(3px);
}

.cohr-jobs-empty {
	padding: 2rem;
	border: 1px dashed rgba(0, 0, 0, 0.18);
	border-radius: 12px;
	text-align: center;
	opacity: 0.8;
}

/* Facts (type, workplace, deadline…) as soft chips. */
.cohr-job-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1rem;
	padding: 0;
}

.cohr-job-facts > div {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4em;
	padding: 0.3em 0.75em;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.05);
	font-size: 0.875em;
	line-height: 1.4;
}

.cohr-job-facts dt {
	margin: 0;
	opacity: 0.65;
}

.cohr-job-facts dt::after {
	content: ":";
}

.cohr-job-facts dd {
	margin: 0;
	font-weight: 600;
}

.cohr-deadline,
.cohr-closed {
	display: inline-block;
	padding: 0.4em 0.9em;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.05);
	font-size: 0.9em;
}

.cohr-closed {
	background: #fef2f2;
	color: #991b1b;
}

/* Application form. */
.cohr-apply {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.cohr-apply h2 {
	margin: 0 0 1.25rem;
}

.cohr-form {
	display: grid;
	gap: 1.25rem;
	max-width: 40rem;
}

.cohr-field {
	display: grid;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.cohr-field > label,
.cohr-field legend {
	margin: 0;
	padding: 0;
	font-weight: 600;
}

.cohr-field legend {
	margin-bottom: 0.4rem;
}

.cohr-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.cohr-field select,
.cohr-field textarea {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	border-radius: 8px;
}

/* File input as a drop zone. */
.cohr-field input[type="file"] {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 1rem;
	border: 1.5px dashed rgba(0, 0, 0, 0.22);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.02);
	cursor: pointer;
}

.cohr-field input[type="file"]:hover,
.cohr-field input[type="file"]:focus {
	border-color: currentcolor;
}

.cohr-field input[type="file"]::file-selector-button {
	margin-right: 0.75rem;
	padding: 0.45em 1em;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	background: #fff;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.cohr-field [aria-invalid="true"] {
	outline: 2px solid #b91c1c;
	outline-offset: 1px;
}

.cohr-choice {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin: 0;
	font-weight: 400;
}

.cohr-required,
.cohr-error,
.cohr-form-message.is-error {
	color: #b91c1c;
}

.cohr-help,
.cohr-error {
	margin: 0;
	font-size: 0.875em;
}

.cohr-help {
	opacity: 0.7;
}

.cohr-error:empty,
.cohr-form-message:empty {
	display: none;
}

.cohr-form-message {
	padding: 0.85rem 1rem;
	border-radius: 8px;
}

.cohr-form-message.is-error {
	background: #fef2f2;
}

.cohr-form-message.is-success {
	background: #ecfdf5;
	color: #065f46;
}

.cohr-submit {
	justify-self: start;
	min-width: 12rem;
	border-radius: 8px;
	cursor: pointer;
}

.cohr-submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* Honeypot: off-screen for people, present for bots. */
.cohr-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
