/*
 * Post a Job: the structured fields.
 *
 * Deliberately small. The theme already styles .jbf-submit heavily; this only
 * covers the controls the theme has never seen, and the optional-details
 * disclosure. Colours come from the theme's custom properties so each board
 * keeps its own accent.
 */

.jbf-submit .jbf-advanced,
.jbf-submit .jbf-advanced *,
.jbf-submit .input-number {
	box-sizing: border-box;
}

.jbf-submit .jbf-advanced {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--jbf-radius, 10px);
	background: var(--wp--preset--color--surface);
}

.jbf-submit .jbf-advanced__summary {
	padding: 0.9rem 1.1rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	list-style-position: inside;
	min-height: 44px;
}

.jbf-submit .jbf-advanced__summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: -3px;
}

.jbf-submit .jbf-advanced[open] .jbf-advanced__summary {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.jbf-submit .jbf-advanced > fieldset {
	padding: 0 1.1rem;
}

.jbf-submit .jbf-advanced > fieldset:first-of-type {
	padding-top: 1.1rem;
}

.jbf-submit .jbf-advanced > fieldset:last-of-type {
	padding-bottom: 1.1rem;
}

/* Number inputs: the pay pair reads as a range rather than two unrelated boxes,
   and never gets wide enough to push the form sideways on a phone. */
.jbf-submit .input-number {
	max-width: 12rem;
	min-height: 44px;
}

.jbf-submit .fieldset-job_salary_min,
.jbf-submit .fieldset-job_salary_max,
.jbf-submit .fieldset-job_salary_unit {
	max-width: 100%;
}

.jbf-submit select,
.jbf-submit .input-text {
	max-width: 100%;
}

/* Touch targets. The select gets the full 44px; a checkbox is sized up and its
   label carries the tap area, which is how a checkbox is meant to work. */
.jbf-submit .fieldset-type-select select {
	min-height: 44px;
}

.jbf-submit .fieldset-type-checkbox input[type="checkbox"] {
	width: 1.15rem;
	height: 1.15rem;
}

.jbf-submit .fieldset-type-checkbox label {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

/* Section headings inserted by job-submit.js. Without JavaScript there are no
   headings and the form is still in a sensible order. */
.jbf-submit .jbf-form-section {
	margin: 2rem 0 0.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: 1.05rem;
	line-height: 1.3;
	color: var(--wp--preset--color--primary);
}

.jbf-submit .jbf-form-section:first-of-type {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* The address field is toggled by the method select; [hidden] must win. */
.jbf-submit fieldset[hidden] {
	display: none;
}
