/**
 * Jobs Block Styles
 */

.pyrum-jobs-wrapper {
	margin-block: var(--wp--preset--spacing--50);
}

.pyrum-jobs-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--wp--preset--color--contrast-2);
}

.pyrum-jobs-table thead {
	background: var(--wp--preset--color--contrast-1);
}

.pyrum-jobs-table th {
	padding: 1rem;
	text-align: left;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--contrast);
	border-bottom: 2px solid var(--wp--preset--color--contrast-2);
}

.pyrum-jobs-table th:last-child {
	width: 60px;
	text-align: center;
}

.pyrum-job-row {
	transition: background-color 0.2s ease;
	cursor: pointer;
	scroll-margin-top: 2rem;
}

.pyrum-job-row:not(:first-child) {
	border-top: 1px solid #000;
}

.pyrum-job-row:hover {
	background: var(--wp--preset--color--primary-light);
}

.pyrum-job-row td {
	padding: 1rem;
}

.pyrum-job-title {
	font-weight: 600;
	width: 50%;
	font-size: var(--wp--preset--font-size--large);
}

.pyrum-job-stellentyp,
.pyrum-job-standort {
	color: var(--wp--preset--color--contrast-3);
}

.pyrum-job-toggle-cell {
	text-align: center;
}

.pyrum-job-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	background: var(--wp--preset--color--contrast-2);
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s ease;
	color: var(--wp--preset--color--contrast);
}

.pyrum-job-toggle:hover {
	background: var(--wp--preset--color--contrast-3);
}

.pyrum-job-toggle::after {
	content: '';
	width: 20px;
	height: 20px;
	background-image: url('../../assets/images/plus.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.pyrum-job-toggle[aria-expanded="true"]::after {
	background-image: url('../../assets/images/minus.svg');
}

.pyrum-job-details {
	background: var(--wp--preset--color--contrast-1);
}

.pyrum-job-details td {
	padding: 1rem;
}

.pyrum-job-details[hidden] {
	display: none;
}

.pyrum-job-details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.pyrum-job-column strong {
	display: block;
	margin-block-start: 0;
	margin-block-end: 1rem;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.pyrum-job-column ul {
	margin: 0;
	padding: 0;
	list-style: disc;
	padding-inline-start: 1.5rem;
}

.pyrum-job-column ul li {
	margin-block-end: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
	.pyrum-jobs-table thead {
		display: none;
	}

	.pyrum-jobs-table,
	.pyrum-jobs-table tbody {
		display: block;
	}

	.pyrum-job-row {
		display: flex;
		flex-wrap: wrap;
	}

	.pyrum-job-row {
		position: relative;
		margin-block-end: 0.5rem;
		border: 1px solid var(--wp--preset--color--contrast-2);
		padding-top: 0.5rem;
	}

	.pyrum-job-row td {
		display: block;
		padding: 0.75rem 1rem;
		border: none;
	}

	.pyrum-job-row td::before {
		content: attr(data-label);
		font-weight: 600;
		margin-inline-end: 0.5rem;
		color: var(--wp--preset--color--contrast-3);
		font-size: var(--wp--preset--font-size--small);
		text-transform: uppercase;
	}

	.pyrum-job-row td.pyrum-job-title {
		width: 100%;
		box-sizing: border-box;
		padding-right: 4rem;
	}

	.pyrum-job-title::before {
		display: none;
	}

	.pyrum-job-stellentyp,
	.pyrum-job-standort {
		display: inline-block;
		width: 50%;
		padding: 0.5rem 1rem;
		box-sizing: border-box;
	}

	.pyrum-job-stellentyp::before {
		content: "Auslastung: ";
		display: block;
	}

	.pyrum-job-standort::before {
		content: "Ort: ";
		display: block;
	}

	.pyrum-job-toggle-cell {
		position: absolute;
		top: 1rem;
		right: 0;
		padding: 0 !important;
	}

	.pyrum-job-toggle-cell::before {
		content: "";
	}

	.pyrum-job-details {
		display: block;
	}

	.pyrum-job-details td {
		display: block;
	}

	.pyrum-job-details-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}
