/*
 * Boostie Jobs boilerplate styles.
 * Colors and sizes come from the custom properties on .bst-wp-jobs. Settings > Boostie Jobs > Design
 * overrides them inline, and a theme can override them too.
 *
 * Every class and property uses the bst-wp- prefix so it never meets Boostie's own bst- styles,
 * which can load on the same page through Boostie widgets. Buttons and form controls are scoped
 * under .bst-wp-jobs and reset the properties themes commonly set on links, inputs and buttons.
 */
.bst-wp-jobs {
	--bst-wp-accent: #2563eb;
	--bst-wp-accent-text: #ffffff;
	--bst-wp-muted: #6b7280;
	--bst-wp-border: #e5e7eb;
	--bst-wp-surface: #ffffff;
	--bst-wp-chip: #f3f4f6;
	--bst-wp-radius: 9px;
	--bst-wp-gap: 24px;
	--bst-wp-max-width: 1040px;
	--bst-wp-control-height: 44px; /* Search inputs, the search button and square buttons share it. */

	box-sizing: border-box;
	max-width: var(--bst-wp-max-width);
	margin: 0 auto;
	padding: 32px 16px 64px;
	color: var(--bst-wp-text, inherit);
	line-height: 1.5;
}
.bst-wp-jobs *, .bst-wp-jobs *::before, .bst-wp-jobs *::after { box-sizing: border-box; }

/* Buttons */
.bst-wp-jobs .bst-wp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	width: auto; height: auto; min-width: 0; min-height: 0; margin: 0; padding: 8px 16px;
	border: 1px solid var(--bst-wp-border); border-radius: var(--bst-wp-radius);
	background: var(--bst-wp-surface); box-shadow: none; color: inherit;
	font: inherit; font-weight: 500; line-height: 1.2; letter-spacing: normal; text-transform: none; text-decoration: none;
	cursor: pointer;
}
.bst-wp-jobs .bst-wp-btn:hover { filter: brightness(0.97); }
.bst-wp-jobs .bst-wp-btn:focus-visible { outline: 2px solid var(--bst-wp-accent); outline-offset: 2px; }
.bst-wp-jobs .bst-wp-btn-primary { background: var(--bst-wp-accent); border-color: var(--bst-wp-accent); color: var(--bst-wp-accent-text); }
.bst-wp-jobs .bst-wp-btn-lg { padding: 14px 24px; font-size: 18px; }
.bst-wp-jobs .bst-wp-btn-square { width: var(--bst-wp-control-height); height: var(--bst-wp-control-height); padding: 0; }
.bst-wp-jobs .bst-wp-btn-block { display: flex; width: 100%; }

/* Tags and meta */
.bst-wp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.bst-wp-tag { padding: 3px 8px; border-radius: var(--bst-wp-radius); background: var(--bst-wp-chip); font-size: 12px; font-weight: 500; }
.bst-wp-meta { display: flex; flex-direction: column; margin: 0; color: var(--bst-wp-muted); font-size: 12px; }

/* Cards */
.bst-wp-card { padding: 16px; border: 1px solid var(--bst-wp-border); border-radius: var(--bst-wp-radius); background: var(--bst-wp-surface); }
.bst-wp-card-title { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.bst-wp-notice { padding: 16px; border: 1px solid var(--bst-wp-border); border-radius: var(--bst-wp-radius); }

/* Single job */
.bst-wp-back { margin: 0 0 24px; }
.bst-wp-job-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--bst-wp-gap); align-items: start; margin-bottom: 32px; }
.bst-wp-job-title { margin: 0 0 16px; font-size: 32px; line-height: 1.2; }
.bst-wp-job-layout {
	display: grid; grid-template-columns: 320px minmax(0, 1fr); grid-template-areas: "side body"; gap: 40px; align-items: start;
}
.bst-wp-job-body { grid-area: body; }
.bst-wp-job-sidebar { grid-area: side; display: flex; flex-direction: column; gap: var(--bst-wp-gap); }
.bst-wp-description h2, .bst-wp-description h3 { margin: 1.5em 0 0.5em; font-size: 1em; font-weight: 600; }
.bst-wp-description > :first-child { margin-top: 0; }
.bst-wp-description ul, .bst-wp-description ol { margin: 0 0 1em; padding-left: 24px; }
.bst-wp-description ul { list-style: disc; }
.bst-wp-description ol { list-style: decimal; }
.bst-wp-description li { display: list-item; }
.bst-wp-description li { margin: 0.4em 0; padding: 0; }
.bst-wp-job-body > .bst-wp-job-actions { margin: 32px 0 0; }
.bst-wp-details { margin: 0; }
.bst-wp-details-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--bst-wp-border); font-size: 14px; }
.bst-wp-details-row:first-child { border-top: 0; padding-top: 0; }
.bst-wp-details dt { color: var(--bst-wp-muted); }
.bst-wp-details dd { margin: 0; text-align: right; }

/* Listing */
.bst-wp-search { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; margin-bottom: var(--bst-wp-gap); }
.bst-wp-jobs .bst-wp-field { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; } /* A <label>, which themes often give a margin. */
.bst-wp-jobs .bst-wp-label { margin: 0; font-size: 12px; font-weight: 600; line-height: 1.5; }
.bst-wp-jobs .bst-wp-field input {
	-webkit-appearance: none; appearance: none;
	width: 100%; height: var(--bst-wp-control-height); margin: 0; padding: 0 12px;
	border: 1px solid var(--bst-wp-border); border-radius: var(--bst-wp-radius);
	background: var(--bst-wp-surface); box-shadow: none; color: inherit; font: inherit; line-height: normal;
}
.bst-wp-jobs .bst-wp-field input:focus { border-color: var(--bst-wp-accent); outline: 2px solid color-mix(in srgb, var(--bst-wp-accent) 25%, transparent); outline-offset: 0; }
/*
 * The search button is the only <button> in the plugin, and themes style button and [type=submit]
 * directly (for example .fl-page button[type=submit]). This selector outranks those, so the
 * button keeps the accent color and font in every state.
 */
.bst-wp-jobs .bst-wp-search button[type="submit"].bst-wp-btn {
	height: var(--bst-wp-control-height); margin: 0; padding: 0 24px;
	border: 1px solid var(--bst-wp-accent); border-radius: var(--bst-wp-radius);
	background: var(--bst-wp-accent); box-shadow: none; color: var(--bst-wp-accent-text);
	font: inherit; font-weight: 500; line-height: 1.2; letter-spacing: normal; text-transform: none; text-shadow: none;
}
.bst-wp-list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--bst-wp-gap); align-items: start; }
.bst-wp-results { display: flex; flex-direction: column; gap: 16px; }
.bst-wp-count { margin: 0; color: var(--bst-wp-muted); font-size: 13px; }
.bst-wp-job-card-title { margin: 0 0 8px; font-size: 20px; font-weight: 500; }
.bst-wp-job-card-title a { color: inherit; text-decoration: none; }
.bst-wp-job-card-title a:hover { text-decoration: underline; }
.bst-wp-job-card-pay { margin: 0 0 8px; font-size: 14px; font-weight: 500; }
.bst-wp-job-card-excerpt { margin: 0 0 16px; }
.bst-wp-job-card-footer { display: flex; justify-content: flex-end; }
.bst-wp-filters { display: flex; flex-direction: column; gap: var(--bst-wp-gap); }
.bst-wp-check { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; font-size: 13px; cursor: pointer; }

/* Checkboxes drawn with CSS so they follow the accent, border and radius settings. */
.bst-wp-jobs .bst-wp-check input {
	-webkit-appearance: none; appearance: none;
	position: static; inset: auto; opacity: 1; visibility: visible; /* Themes often hide checkboxes to draw their own on the label. */
	display: grid; place-content: center; flex: 0 0 auto;
	width: 18px; height: 18px; margin: 1px 0 0; margin-top: max(0px, calc((1lh - 18px) / 2)); padding: 0;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: min(var(--bst-wp-radius), 5px);
	background: var(--bst-wp-surface); box-shadow: none; cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}
.bst-wp-jobs .bst-wp-check input::before {
	content: ""; width: 10px; height: 10px;
	background: var(--bst-wp-accent-text);
	clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
	transform: scale(0); transition: transform 0.12s ease-in-out;
}
.bst-wp-jobs .bst-wp-check input:hover { border-color: var(--bst-wp-accent); }
.bst-wp-jobs .bst-wp-check input:checked { background: var(--bst-wp-accent); border-color: var(--bst-wp-accent); }
.bst-wp-jobs .bst-wp-check input:checked::before { transform: scale(1); }
.bst-wp-jobs .bst-wp-check input:focus-visible { outline: 2px solid var(--bst-wp-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	.bst-wp-jobs .bst-wp-check input, .bst-wp-jobs .bst-wp-check input::before { transition: none; }
}
.bst-wp-count-inline { color: var(--bst-wp-muted); }
.bst-wp-pagination { display: flex; flex-wrap: wrap; gap: 6px; }
.bst-wp-pagination .page-numbers {
	padding: 6px 12px; border: 1px solid var(--bst-wp-border); border-radius: var(--bst-wp-radius); color: inherit; text-decoration: none;
}
.bst-wp-pagination .page-numbers.current { background: var(--bst-wp-accent); border-color: var(--bst-wp-accent); color: var(--bst-wp-accent-text); }

/* Small screens */
@media (max-width: 800px) {
	.bst-wp-job-header { grid-template-columns: 1fr; }
	.bst-wp-job-layout { grid-template-columns: 1fr; grid-template-areas: "body" "side"; }
	.bst-wp-search { grid-template-columns: 1fr; }
	.bst-wp-list-layout { grid-template-columns: 1fr; }
	.bst-wp-job-title { font-size: 26px; }
	.bst-wp-job-sidebar > .bst-wp-btn-block { display: none; }
}
