/*
 * job-manager: WP Job Manager 2.4.11 lists, filters, forms, notices and the dashboard table.
 * Views: pages that hold the [jobs], [submit_job_form] or [job_dashboard] shortcode (/jobs/, /post-a-job/),
 * single job listings and the job listings archive. Loaded by inc/plugin-styles.php (family `job-manager`).
 *
 * Colours only through the preset variables (contract 1.1, S10). No error red and no success green (rule 7):
 * a notice is the panel look, an error is the sun look. The plugin's own sheet sets its colours at one to four
 * classes deep, so the selectors here repeat its depth where they must win.
 */

/* Type of the plugin's job types, which it colours orange, green, red, blue and purple. */
.job-manager .job-type,
.job-manager .full-time,
.job-manager .part-time,
.job-manager .temporary,
.job-manager .freelance,
.job-manager .internship,
.job_listing .job-type,
.job_listing .full-time,
.job_listing .part-time,
.job_listing .temporary,
.job_listing .freelance,
.job_listing .internship,
.job_filters .job_types li label {
	color: var(--wp--preset--color--meta-grey);
}

/* Single listing meta: the plugin colours the badges at three classes deep (orange, green, pink, blue, purple,
   white text) and the expired and filled notes in error red. The element in the selector wins by one point. */
.single_job_listing .meta li:is(.job-type, .full-time, .part-time, .temporary, .freelance, .internship) {
	background-color: var(--wp--preset--color--panel);
	color: var(--wp--preset--color--meta-grey);
}

.single_job_listing .meta li:is(.listing-expired, .position-filled) {
	color: var(--wp--preset--color--ink);
}

/* Listing rows --------------------------------------------------------------------------------- */

div.job_listings ul.job_listings {
	border-top: 1px solid var(--wp--preset--color--mist);
}

div.job_listings ul.job_listings li.job_listing,
div.job_listings ul.job_listings li.no_job_listings_found {
	border-bottom: 1px solid var(--wp--preset--color--mist);
	color: var(--wp--preset--color--meta-grey);
}

div.job_listings ul.job_listings li.job_listing a,
div.job_listings ul.job_listings li.no_job_listings_found a {
	color: var(--wp--preset--color--meta-grey);
	text-decoration: none;
}

div.job_listings ul.job_listings li.job_listing a:is(:hover, :focus-visible),
div.job_listings ul.job_listings li.job_listing.job_position_featured a,
div.job_listings ul.job_listings li.job_listing.job_position_featured a:is(:hover, :focus-visible) {
	background-color: var(--wp--preset--color--panel);
}

div.job_listings ul.job_listings li.job_listing a div.position h3 {
	color: var(--wp--preset--color--deep-teal);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: 1.3;
}

/* Under the pointer and with keyboard focus the row takes the panel fill (above) and its title turns ink (12.00 on
   panel); nothing is underlined (pattern contract 1.0.11, 1.4). */
div.job_listings ul.job_listings li.job_listing a:is(:hover, :focus-visible) div.position h3 {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

/* A job's title in an employer's job dashboard: never underlined; ink under the pointer and with keyboard focus (pattern
   contract 1.0.11 and 1.0.12, 1.4). The plugin's job-dashboard.css underlines it under the pointer at (0,3,1) and prints
   after this sheet, so this rule is written at (0,4,1). */
.job-manager-jobs .jm-dashboard-job-column a.job-title:is(:hover, :focus-visible) {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

div.job_listings ul.job_listings li.job_listing a div.position .company,
div.job_listings ul.job_listings li.job_listing a div.position .company strong,
div.job_listings ul.job_listings li.job_listing a div.position .company .tagline,
div.job_listings ul.job_listings li.job_listing a div.location,
div.job_listings ul.job_listings li.job_listing a ul.meta,
div.job_listings ul.job_listings li.job_listing a ul.meta li {
	color: var(--wp--preset--color--meta-grey);
}

/* Load more and previous listings: the outline button. */
div.job_listings a.load_more_jobs,
div.job_listings a.load_previous {
	border-bottom-color: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--deep-teal);
}

/* Filters -------------------------------------------------------------------------------------- */

.job_filters {
	background-color: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--ink);
}

.job_filters .job_types,
.job_filters .showing_jobs {
	background-color: var(--wp--preset--color--panel);
	border-top-color: var(--wp--preset--color--mist);
}

.job_filters .job_types li {
	border-right-color: var(--wp--preset--color--mist);
}

.job_filters .search_jobs div .showing_jobs a.active {
	background-color: var(--wp--preset--color--mist);
}

/* Fields: filters, the submission form and the dashboard. White, ink text, a 1px meta-grey border. */
.job_filters .search_jobs :is(input[type="text"], input[type="search"], input[type="email"], select),
.job-manager-form fieldset :is(input.input-text, input.input-date, select, textarea),
.job-manager-form fieldset .wp-editor-container {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--meta-grey);
	border-radius: 0.25rem;
	box-sizing: border-box;
	color: var(--wp--preset--color--ink);
	font-family: inherit;
	font-size: inherit;
	line-height: 1.4;
	min-height: 2.75rem;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

.job-manager-form fieldset .wp-editor-container {
	min-height: 0;
	padding: 0;
}

.job-manager-form fieldset .wp-editor-container textarea {
	border-width: 0;
}

.job_filters .search_jobs :is(input[type="text"], input[type="search"], input[type="email"], select)::placeholder,
.job-manager-form fieldset :is(input.input-text, textarea)::placeholder {
	color: var(--wp--preset--color--meta-grey);
	opacity: 1;
}

/* Choices: at least 20px, teal-strong. */
.job_filters input[type="checkbox"],
.job_filters input[type="radio"],
.job-manager-form fieldset input[type="checkbox"],
.job-manager-form fieldset input[type="radio"] {
	accent-color: var(--wp--preset--color--teal-strong);
	cursor: pointer;
	height: 1.25rem;
	margin-right: var(--wp--preset--spacing--30);
	vertical-align: middle;
	width: 1.25rem;
}

.job_filters .search_jobs div.search_remote_position input {
	width: 1.25rem;
}

/* Labels --------------------------------------------------------------------------------------- */

.job-manager-form fieldset label:not(.full-line-checkbox-field label) {
	color: var(--wp--preset--color--heading-grey);
	font-weight: 700;
}

.job-manager-form fieldset label:not(.full-line-checkbox-field label) small,
.job-manager-form fieldset small.description {
	color: var(--wp--preset--color--meta-grey);
	font-weight: 400;
	opacity: 1;
}

.job-manager-form fieldset abbr.required {
	color: var(--wp--preset--color--ink);
}

.job-manager-form fieldset {
	border-bottom-color: var(--wp--preset--color--mist);
}

.job_filters .search_jobs div.search_remote_position label#remote_position_label,
.job_filters .job_types li label {
	color: var(--wp--preset--color--ink);
}

/* Buttons: the primary button of contract 2.5 ----------------------------------------------------- */

.job_filters .search_jobs .search_submit input[type="submit"],
.job-manager-form input[type="submit"],
.job-manager-form fieldset .account-sign-in .button,
.job-manager-form .button,
.job-manager-form .button-primary,
.job-manager-jobs .job-dashboard-action-edit,
.job_application .application_button {
	-webkit-appearance: none;
	appearance: none;
	background-color: var(--wp--preset--color--teal-strong);
	border: 2px solid var(--wp--preset--color--teal-strong);
	border-radius: 999px;
	box-sizing: border-box;
	color: var(--wp--preset--color--white);
	cursor: pointer;
	display: inline-block;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 1rem; /* 1.4 and master ruling 40: button text is a literal 1rem, 16px. */
	font-weight: 700;
	letter-spacing: 0.1875rem;
	line-height: 1.15;
	min-height: 2.75rem;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	width: auto;
}

.job_filters .search_jobs .search_submit input[type="submit"]:is(:hover, :focus-visible),
.job-manager-form input[type="submit"]:is(:hover, :focus-visible),
.job-manager-form fieldset .account-sign-in .button:is(:hover, :focus-visible),
.job-manager-form .button:is(:hover, :focus-visible),
.job-manager-form .button-primary:is(:hover, :focus-visible),
.job-manager-jobs .job-dashboard-action-edit:is(:hover, :focus-visible),
.job_application .application_button:is(:hover, :focus-visible) {
	background-color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--teal-strong);
	color: var(--wp--preset--color--teal-strong);
}

/* The sign-out pill stands a space apart from its sentence, and its key icon apart from its text (master ruling 87):
   the plugin's 2px after the icon is less than the pill's letter-spacing. On a phone the pill wraps under the
   sentence, where a margin would only indent it. */
@media (min-width: 600px) {
	.job-manager-form fieldset .account-sign-in .button,
	#job-manager-job-dashboard .account-sign-in .button {
		margin-left: var(--wp--preset--spacing--30);
	}
}

.job-manager-form fieldset .account-sign-in .button::before,
#job-manager-job-dashboard .account-sign-in .button::before {
	margin-right: var(--wp--preset--spacing--20);
	vertical-align: -0.15em;
}

/* The file input's button: the outline button of contract 2.5 (master ruling 87), in place of the browser's grey
   button inside the themed field box. */
.job-manager-form fieldset input[type="file"]::file-selector-button {
	-webkit-appearance: none;
	appearance: none;
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--deep-teal);
	border-radius: 999px;
	color: var(--wp--preset--color--deep-teal);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.1rem;
	margin-right: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	text-transform: uppercase;
}

.job-manager-form fieldset input[type="file"]::file-selector-button:hover {
	background-color: var(--wp--preset--color--deep-teal);
	color: var(--wp--preset--color--white);
}

.job-manager-form input[type="submit"]:disabled,
.job-manager-form input[type="submit"].disabled {
	cursor: not-allowed;
	opacity: 1;
	background-color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--meta-grey);
}

/* Notices: the plugin's error, info and message boxes take the panel and sun looks (1.1 rule 7). ---- */

.job-manager-error,
.job-manager-info,
.job-manager-message {
	background-color: var(--wp--preset--color--panel);
	border-top: 0;
	border-left: 4px solid var(--wp--preset--color--deep-teal);
	box-shadow: none;
	color: var(--wp--preset--color--ink);
}

.job-manager-error.job-manager-error {
	background-color: var(--wp--preset--color--sun);
	border-left-color: var(--wp--preset--color--ink);
}

.job-manager-error.job-manager-error:before,
.job-manager-info.job-manager-info:before,
.job-manager-message.job-manager-message:before {
	color: var(--wp--preset--color--ink);
}

/* Dashboard table ------------------------------------------------------------------------------ */

table.job-manager-jobs {
	border-collapse: collapse;
	color: var(--wp--preset--color--ink);
	width: 100%;
}

table.job-manager-jobs :is(th, td) {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--mist);
	padding: var(--wp--preset--spacing--30);
	text-align: left;
}

table.job-manager-jobs th {
	color: var(--wp--preset--color--heading-grey);
	font-weight: 700;
}

/* Narrow screens: the list and the filters stack ----------------------------------------------------- */

@media (max-width: 599px) {
	div.job_listings ul.job_listings li.job_listing a div.position,
	div.job_listings ul.job_listings li.job_listing a div.location,
	div.job_listings ul.job_listings li.job_listing a ul.meta {
		float: none;
		text-align: left;
		width: 100%;
	}

	/* Stacked, the plugin's 1em column gutter would indent these lines from the title (master ruling 87). */
	div.job_listings ul.job_listings li.job_listing a div.location,
	div.job_listings ul.job_listings li.job_listing a ul.meta {
		padding-left: 0;
	}

	.job_filters .job_types li {
		float: none;
		border-right-width: 0;
	}
}
