/**
 * Jobs archive styles.
 * Rewritten off the Uncode original: fixed-position sidebar replaced with
 * flexbox, WPBakery/Uncode selectors removed.
 */

:root {
	--jobs-accent: #fe9150;
	--jobs-accent-dark: #e77b3c;
	--jobs-title: #61489e;
	--jobs-title-hover: #7e6bad;
	--jobs-sidebar-w: 400px;
	--jobs-sidebar-bg: #000;
	/* Set this if the Agntix header is transparent/fixed and overlaps content.
	   Try 120px-180px, or leave 0 if the theme already reserves space. */
	--jobs-header-offset: 0px;
}

/* ---------------------------------------------------------------- layout */

.jobs-page {
	padding-top: var(--jobs-header-offset);
}

.jobs-page-inner {
	display: flex;
	align-items: flex-start;
	gap: 0;
}

.jobs-page-search {
	flex: 0 0 var(--jobs-sidebar-w);
	padding: 60px 36px;
	background-color: var(--jobs-sidebar-bg);
	color: #fff;
	font-size: 14px;
}

.jobs-page-list {
	flex: 1 1 auto;
	min-width: 0;
	padding: 30px 30px 0;
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	/* Re-add once the asset exists in the new theme:
	   background-image: url("../img/jobs-bg.jpg"); */
	background-color: #f4f4f4;
}

/* --------------------------------------------------------------- listing */

article.jobs-page-job-listing {
	background-color: #fff;
	padding: 30px 40px;
	margin-bottom: 30px;
	cursor: pointer;
	outline: 2px solid transparent;
	transition: outline-color .15s ease;
}

article.jobs-page-job-listing:hover,
article.jobs-page-job-listing:focus-within {
	outline-color: var(--jobs-accent);
}

article.jobs-page-job-listing h4 {
	margin-top: 15px;
	color: var(--jobs-title);
	font-size: 26px;
}

article.jobs-page-job-listing h4:hover {
	color: var(--jobs-title-hover);
}

article.jobs-page-job-listing p {
	font-size: 14px;
	margin-top: 10px;
}

.jobs-page-job-listing a {
	font-size: 14px;
	font-weight: 700;
	color: #555;
}

span.matador-job-field {
	display: block;
	padding-top: 10px;
}

.jobs-page-meta-tags {
	font-size: 14px;
	display: inline-block;
	padding: 15px;
	margin: 10px 5px 0 0;
	background-color: #eee;
}

/* ---------------------------------------------------------------- search */

.jobs-page-search .matador-search-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.jobs-search-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* keyword input + submit sit flush together */
.jobs-search-group-keyword {
	gap: 0;
	align-items: stretch;
}

.jobs-search-group-terms {
	flex-direction: column;
	gap: 14px;
}

.jobs-page-search ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jobs-page-search li a {
	text-decoration: none;
	color: #fff;
}

/* --- keyword field ------------------------------------------------------ */

.matador-search-form-field-keyword {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
}

.matador-search-form-field-keyword input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 44px;
	padding: 0 14px;
	font: 700 14px/1 Arial, Helvetica, sans-serif;
	color: #000;
	background-color: #fff;
	border: 2px solid transparent;
	border-radius: 0;
	margin: 0;
}

.matador-search-form-field-keyword input:focus {
	outline: none;
	border-color: var(--jobs-accent);
}

.jobs-page-search ::placeholder {
	color: #777;
	opacity: 1;
}

/* --- submit ------------------------------------------------------------- */

.matador-search-form-field-submit {
	flex: 0 0 auto;
	display: flex;
}

#matador-search-submit {
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	flex: 0 0 44px;
	font-size: 0;
	color: transparent;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	background-color: var(--jobs-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.2-4.2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
	transition: background-color .15s ease;
}

#matador-search-submit:hover,
#matador-search-submit:focus-visible {
	background-color: var(--jobs-accent-dark);
}

/* --- taxonomy dropdowns ------------------------------------------------- */

.matador-terms {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.matador-terms label {
	display: block;
	margin: 0;
}

.matador-terms-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .65);
}

.matador-terms select,
.matador-terms-select-input {
	width: 100%;
	height: 44px;
	padding: 0 38px 0 14px;
	font: 400 14px/1 Arial, Helvetica, sans-serif;
	color: #000;
	background-color: #fff;
	border: 2px solid transparent;
	border-radius: 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px 16px;
}

.matador-terms select:focus,
.matador-terms-select-input:focus {
	outline: none;
	border-color: var(--jobs-accent);
}

.matador-terms select[multiple] {
	height: auto;
	min-height: 110px;
	padding: 8px 14px;
	background-image: none;
}

.matador-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;
}

/* ------------------------------------------------------------------- CTA */

.matador-custom-cta {
	margin-top: 4px;
}

.matador-match-btn {
	display: inline-block;
	width: 100%;
	text-align: center;
	padding: 12px 22px;
	border: 0;
	background-color: var(--jobs-accent);
	color: #000;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background-color .15s ease;
}

.matador-match-btn:hover {
	background-color: var(--jobs-accent-dark);
}

/* ------------------------------------------------------------ single job */

.job-single-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: calc(48px + var(--jobs-header-offset)) 24px 72px;
}

.job-single-back {
	display: inline-block;
	margin-bottom: 18px;
	font-size: 14px;
	font-weight: 700;
	color: #555;
	text-decoration: none;
}

.job-single-back:hover {
	color: var(--jobs-accent-dark);
}

.job-single-title {
	margin: 0 0 6px;
	font-size: 38px;
	line-height: 1.15;
	color: var(--jobs-title);
}

.job-single-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
}

.job-single-meta .jobs-page-meta-tags {
	margin: 0;
}

.job-single-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 40px;
	align-items: start;
}

.job-single-content {
	min-width: 0;
	line-height: 1.7;
}

.job-single-content h2,
.job-single-content h3 {
	margin-top: 1.6em;
	color: var(--jobs-title);
}

.job-single-content ul,
.job-single-content ol {
	padding-left: 1.25em;
}

.job-single-aside {
	position: sticky;
	top: 24px;
}

.job-single-apply-card {
	padding: 28px;
	background-color: #f6f6f6;
	border-top: 4px solid var(--jobs-accent);
}

.job-single-apply-title {
	margin: 0 0 16px;
	font-size: 20px;
	color: var(--jobs-title);
}

.job-single-apply-card input[type="text"],
.job-single-apply-card input[type="email"],
.job-single-apply-card input[type="tel"],
.job-single-apply-card textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 0;
}

.job-single-apply-card input:focus,
.job-single-apply-card textarea:focus {
	outline: none;
	border-color: var(--jobs-accent);
}

.job-single-footer {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid #e3e3e3;
}

.job-single-footer .matador-match-btn {
	width: auto;
	min-width: 260px;
}

/* --------------------------------------------------------- responsive */

@media screen and (max-width: 1100px) {
	.jobs-page-inner {
		flex-direction: column;
	}

	.jobs-page-search {
		flex: 1 1 auto;
		width: 100%;
		padding: 30px;
	}

	/* side by side once the sidebar goes full width */
	.jobs-search-group-terms {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.jobs-search-group-terms .matador-terms {
		flex: 1 1 240px;
		width: auto;
	}

	.jobs-page-search .matador-search-form {
		max-width: 900px;
		margin: 0 auto;
	}

	.matador-match-btn {
		width: auto;
		min-width: 260px;
	}

	.jobs-page-list {
		width: 100%;
		padding: 30px 30px 0;
		background-attachment: scroll;
	}
}

@media screen and (max-width: 690px) {
	.jobs-page-search {
		padding: 24px 20px;
		font-size: 12px;
	}

	.jobs-search-group-terms {
		flex-direction: column;
	}

	.jobs-search-group-terms .matador-terms {
		flex: 1 1 auto;
	}

	.matador-match-btn {
		width: 100%;
		min-width: 0;
	}

	article.jobs-page-job-listing,
	.jobs-page-meta-tags,
	article.jobs-page-job-listing p {
		font-size: 12px;
	}

	article.jobs-page-job-listing {
		padding: 24px 20px;
	}

	article.jobs-page-job-listing h4 {
		font-size: 22px;
		margin-top: 0;
	}

	.jobs-page-meta-tags {
		padding: 10px;
		margin: 10px 3px 0 0;
	}

	.job-single-body {
		grid-template-columns: 1fr;
	}

	.job-single-title {
		font-size: 28px;
	}
}

/* --------------------------------------- single job: theme-conflict guards */

/* Agntix/Bootstrap-style resets can collapse the grid; re-assert it. */
.job-single .job-single-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 40px;
	align-items: start;
}

@media screen and (max-width: 991px) {
	.job-single .job-single-body {
		grid-template-columns: 1fr;
	}

	.job-single-aside {
		position: static;
	}
}

/* Matador's application form ships unstyled. */
.job-single-apply-card .matador-application-field {
	margin-bottom: 14px;
}

.job-single-apply-card label {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #444;
}

.job-single-apply-card input[type="file"] {
	width: 100%;
	font-size: 13px;
}

.job-single-apply-card button,
.job-single-apply-card input[type="submit"] {
	width: 100%;
	padding: 12px 22px;
	border: 0;
	background-color: var(--jobs-accent);
	color: #000;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
}

.job-single-apply-card button:hover,
.job-single-apply-card input[type="submit"]:hover {
	background-color: var(--jobs-accent-dark);
}

/* Long job descriptions from Bullhorn often carry inline styles and wide tables. */
.job-single-content img,
.job-single-content table {
	max-width: 100%;
	height: auto;
}

.job-single-content table {
	display: block;
	overflow-x: auto;
}

/* ------------------------------- overrides for site-wide custom CSS ------ */

/*
 * The site's Additional CSS contains `a { border-radius: 35px !important; }`
 * and a `.innovar-fab { position: fixed; bottom: 158px; right: 28px; }` rule
 * that fights the .innovar-fab-wrap positioning from functions.php.
 * Scope the jobs pages back to sane values.
 */

.jobs-page a.matador-match-btn,
.job-single a.matador-match-btn,
.job-single-back {
	border-radius: 0 !important;
}

.job-single-apply-card .matador-button,
.job-single-apply-card #matador-submit {
	border-radius: 0 !important;
}

/* Matador's own field markup, which arrives with h5 labels. */
.job-single-apply-card .matador-field-group {
	margin-bottom: 14px;
}

.job-single-apply-card .matador-field-label {
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #444;
}

.job-single-apply-card .matador-field input[type="text"],
.job-single-apply-card .matador-field input[type="email"],
.job-single-apply-card .matador-field input[type="tel"],
.job-single-apply-card .matador-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 0;
}

.job-single-apply-card .for-file {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border: 1px dashed #bbb;
	font-size: 13px;
	cursor: pointer;
}

.job-single-apply-card .matador-field-description {
	margin-top: 6px;
	font-size: 11px;
	color: #777;
}

.job-single-apply-card .checkboxes {
	list-style: none;
	margin: 0;
	padding: 0;
}

.job-single-apply-card .checkbox label {
	display: flex;
	gap: 8px;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: #555;
	line-height: 1.5;
}

.job-single-apply-card #matador-submit {
	width: 100%;
	margin-top: 8px;
	padding: 12px 22px;
	border: 0;
	background-color: var(--jobs-accent);
	color: #000;
	font-weight: 700;
	cursor: pointer;
}

.job-single-apply-card .matador-field-job-seeker {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

/* ------------------------------------ sticky sidebar + progressive reveal */

/*
 * When ScrollTrigger pins the sidebar, the element stops stretching, so the
 * black column would end partway down. Paint the column on the flex parent
 * instead so it stays full height regardless of how the sidebar is positioned.
 */
@media screen and (min-width: 1101px) {
	.jobs-page-inner {
		background-image: linear-gradient(
			to right,
			var(--jobs-sidebar-bg) 0,
			var(--jobs-sidebar-bg) var(--jobs-sidebar-w),
			transparent var(--jobs-sidebar-w)
		);
	}

	.jobs-page-search {
		background-color: transparent;
	}

	/* The sidebar is moved with translate3d by jobs-archive.js. It must not be
	   stretched to the row height or there'd be nothing to travel within. */
	.jobs-page-search {
		align-self: flex-start;
		will-change: transform;
	}
}

.is-job-hidden {
	display: none !important;
}

.jobs-page-more {
	padding: 10px 0 50px;
	text-align: center;
}

.jobs-page-count {
	margin: 0 0 14px;
	font-size: 13px;
	color: #444;
}

.jobs-page-more-btn {
	width: auto;
	min-width: 240px;
}

.jobs-page-more-btn[hidden] {
	display: none;
}

/* ------------------------------------------- archive: page title display */

/*
 * The Agntix breadcrumb bar prints an archive title above the listings.
 * Hide the text but keep the bar, because .tp-breadcrumb-space supplies the
 * top padding that stops the fixed header covering the content.
 */
body.post-type-archive-matador-job-listings .tp-breadcrumb-title {
	display: none;
}

/*
 * If you'd rather remove the bar entirely, comment out the rule above,
 * uncomment this, and adjust the padding to taste.
 *
 * body.post-type-archive-matador-job-listings .tp-breadcrumb-area {
 *   display: none;
 * }
 * body.post-type-archive-matador-job-listings .jobs-page {
 *   padding-top: 180px;
 * }
 * @media screen and (max-width: 767px) {
 *   body.post-type-archive-matador-job-listings .jobs-page {
 *     padding-top: 150px;
 *   }
 * }
 */
