/*
 * Darstellung der Stellen.
 *
 * Eigenständig und mit eigenem Präfix piz-job. Farben, Schriften und Abstände
 * kommen über die CSS-Variablen des Themes, damit sich beides nicht beisst;
 * die Fallback-Werte entsprechen dem Stand von index.css.
 *
 * Das abgelöste Plugin brachte 404 Regeln mit, das Theme weitere 28 – für die
 * Darstellung braucht es davon ein Dutzend. Der Rest betraf Akkordeon,
 * Social-Sharing, Merkliste, select2 und das Bewerbungsformular, das jetzt
 * bei HR4YOU liegt.
 */

/*
 * Hinweis zur Spezifität: Die Regeln für Eingabefelder und Knopf tragen den
 * Wrapper .piz-jobs vor sich. Ohne ihn haben sie dieselbe Spezifität wie
 * input[type="text"]:not(.form-control) aus dem Theme, das border: none setzt
 * - und dann entscheidet die Ladereihenfolge der Stylesheets darüber, ob die
 * Felder sichtbar sind.
 */

/* ── Filterleiste ───────────────────────────────────────────────────────── */

.piz-jobs {
	--piz-job-field-height: 46px;
}

.piz-job-filters {
	display: grid;
	grid-template-columns: 2fr 1fr 120px;
	gap: 20px;
	align-items: stretch;
	margin: 40px 0 50px;
	padding-bottom: 25px;
	border-bottom: 1px solid #efeeee;
}

/*
 * Eine gemeinsame Regel für alle drei Bedienelemente, mit fester Höhe statt
 * min-height: input, select und button bringen je eigene Vorgaben für
 * line-height und Innenabstand mit, und mit min-height fällt jedes anders
 * hoch aus.
 */
.piz-jobs .piz-job-filters input[type="text"],
.piz-jobs .piz-job-filters select,
.piz-jobs .piz-job-filters button {
	box-sizing: border-box;
	height: var(--piz-job-field-height);
	margin: 0;
	padding: 0 24px;
	border-radius: 32px;
	font-family: inherit;
	font-size: 15px;
	line-height: normal;
	box-shadow: none;
	outline: 0;
	appearance: none;
	-webkit-appearance: none;
}

.piz-jobs .piz-job-filters input[type="text"],
.piz-jobs .piz-job-filters select {
	width: 100%;
	border: 1px solid #efeeee;
	background: #fff;
	color: #66717a;
}

/* Der Pfeil des Auswahlfelds, den appearance: none entfernt hat. */
.piz-jobs .piz-job-filters select {
	padding-right: 46px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2366717a' stroke-width='1.5' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 22px center;
}

/* Platz für die Lupe am rechten Rand des Suchfelds. */
.piz-job-search {
	position: relative;
	display: flex;
	align-items: center;
}

.piz-jobs .piz-job-search input[type="text"] {
	padding-right: 46px;
}

.piz-job-search img {
	position: absolute;
	right: 18px;
	width: 16px;
	height: 16px;
	pointer-events: none;
}

.piz-jobs .piz-job-filters button {
	border: 1px solid transparent;
	background: var(--bg-darker, rgb(115 108 106));
	color: #fff;
	white-space: nowrap;
	cursor: pointer;
}

/* ── Übersicht ──────────────────────────────────────────────────────────── */

.piz-job-list {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 20px;
}

.piz-job-card {
	min-height: 150px;
	padding: 20px;
	border-radius: 32px;
	background: var(--bg-darker, rgb(115 108 106));
	color: #fff;
}

.piz-job-card-title {
	margin: 0 0 12px;
	font-size: 22px;
	line-height: 1.3;
}

.piz-job-card-title a {
	color: #fff;
	text-decoration: none;
}

.piz-job-card-title a:hover,
.piz-job-card-title a:focus-visible {
	text-decoration: underline;
}

/* ── Kennzeichen (Ort, Pensum) ──────────────────────────────────────────── */

.piz-job-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	align-items: center;
}

.piz-job-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
}

.piz-job-tag img {
	width: 14px;
	height: 14px;
	filter: grayscale(1);
}

/* ── Detailseite ────────────────────────────────────────────────────────── */

.piz-job-single-content {
	margin-bottom: 42px;
}

.piz-job-single-tags .piz-job-tag {
	color: var(--first-heading-color, #736b69);
}

.piz-job-contact {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	margin: 2.5rem 0 1.5rem;
	padding: 1.25rem 1.5rem;
	border-radius: 16px;
	background: var(--form-bg-color, #cec0bc24);
}

.piz-job-contact-photo {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}

.piz-job-contact p {
	margin: 0 0 0.25rem;
}

.piz-job-contact p:last-child {
	margin-bottom: 0;
}

.piz-job-contact-role {
	display: block;
	font-size: 0.9em;
	opacity: 0.75;
}

.piz-job-apply {
	margin: 2rem 0 1rem;
}

.piz-job-archived {
	margin: 0 0 2rem;
	padding: 1rem 1.25rem;
	border-left: 4px solid #b32d2e;
	background: rgba(179, 45, 46, 0.06);
}

.piz-job-archived p {
	margin: 0;
}

/* ── Hinweise und Zustände ──────────────────────────────────────────────── */

.piz-job-empty {
	margin-top: 30px;
	text-align: center;
}

.piz-job-card[hidden],
.piz-job-empty[hidden] {
	display: none !important;
}

.piz-job-filters .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Schmale Ansichten ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
	.piz-job-list {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 600px) {
	.piz-job-filters {
		grid-template-columns: 1fr;
	}

	.piz-job-list {
		grid-template-columns: 1fr;
	}
}
