/*
 * HirePros front end.
 * Inherits the theme's fonts and text colour; accents use currentColor so it
 * adapts to light and dark themes. Override --hirepros-accent to brand it.
 */

.hirepros {
	--hirepros-accent: currentColor;
	--hirepros-radius: 10px;
	--hirepros-border: color-mix(in srgb, currentColor 16%, transparent);
	--hirepros-subtle: color-mix(in srgb, currentColor 5%, transparent);
	--hirepros-muted: color-mix(in srgb, currentColor 65%, transparent);
	font-family: inherit;
	line-height: 1.55;
}

.hirepros *,
.hirepros *::before,
.hirepros *::after {
	box-sizing: border-box;
}

.hirepros input,
.hirepros select,
.hirepros textarea,
.hirepros button {
	font: inherit;
	color: inherit;
}

/* Container for the classic single template */
.hirepros-container {
	width: 100%;
	max-width: 880px;
	margin: 0 auto;
	padding: 32px 16px 64px;
}
.hirepros-job__title { margin: 0 0 24px; }

/* Buttons */
.hirepros-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: #1d2327;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.15s;
}
.hirepros-button:hover { opacity: 0.88; }
.hirepros-button:active { transform: translateY(1px); }
.hirepros-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Filters */
.hirepros-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	padding: 16px;
	margin: 0 0 24px;
	border: 1px solid var(--hirepros-border);
	border-radius: var(--hirepros-radius);
	background: var(--hirepros-subtle);
}
.hirepros-filters__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 180px;
	min-width: 0;
}
.hirepros-filters__field label {
	font-size: 0.8125em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hirepros-muted);
}
.hirepros-filters select,
.hirepros-form input[type="text"],
.hirepros-form input[type="email"],
.hirepros-form input[type="tel"],
.hirepros-form textarea {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--hirepros-border);
	border-radius: 8px;
	background: transparent;
}
.hirepros-filters select option { color: #1d2327; }
.hirepros-filters__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}
.hirepros-filters__reset { font-size: 0.9em; }
.js .hirepros-filters--auto .hirepros-filters__submit { display: none; }

/* Listing */
.hirepros-jobs__count {
	margin: 0 0 12px;
	font-size: 0.875em;
	color: var(--hirepros-muted);
}
.hirepros-jobs__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}
.hirepros-job-card {
	margin: 0;
	padding: 20px 22px;
	border: 1px solid var(--hirepros-border);
	border-radius: var(--hirepros-radius);
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
	position: relative;
}
.hirepros-job-card:hover,
.hirepros-job-card:focus-within {
	border-color: color-mix(in srgb, currentColor 35%, transparent);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
	transform: translateY(-1px);
}
.hirepros-job-card__title {
	margin: 0 0 8px;
	font-size: 1.2em;
	line-height: 1.3;
}
.hirepros-job-card__title a {
	text-decoration: none;
	color: inherit;
}
.hirepros-job-card__title a::after {
	/* Whole card is clickable. */
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--hirepros-radius);
}
.hirepros-job-card__title a:focus-visible { outline: none; }
.hirepros-job-card__title a:focus-visible::after { outline: 2px solid currentColor; outline-offset: 2px; }
.hirepros-job-card__summary {
	margin: 8px 0 0;
	color: var(--hirepros-muted);
}
.hirepros-job-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 12px 0 0;
	font-size: 0.875em;
	color: var(--hirepros-muted);
}
.hirepros-job-card__salary {
	font-weight: 600;
	color: inherit;
	opacity: 1;
}

.hirepros-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.hirepros-tag {
	margin: 0;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.8125em;
	background: var(--hirepros-subtle);
	border: 1px solid var(--hirepros-border);
}
.hirepros-status-pill {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.8125em;
	font-weight: 600;
	background: var(--hirepros-subtle);
	border: 1px solid var(--hirepros-border);
}

.hirepros-empty {
	padding: 32px;
	text-align: center;
	border: 1px dashed var(--hirepros-border);
	border-radius: var(--hirepros-radius);
	color: var(--hirepros-muted);
}
.hirepros-empty p { margin: 0; }

.hirepros-pagination { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.hirepros-pagination .page-numbers {
	display: inline-flex;
	min-width: 40px;
	min-height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0 10px;
	border: 1px solid var(--hirepros-border);
	border-radius: 8px;
	text-decoration: none;
}
.hirepros-pagination .current { font-weight: 700; background: var(--hirepros-subtle); }

/* Single job */
.hirepros-details {
	margin: 0 0 32px;
	padding: 20px;
	border: 1px solid var(--hirepros-border);
	border-radius: var(--hirepros-radius);
	background: var(--hirepros-subtle);
}
.hirepros-details__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin: 0 0 20px;
}
.hirepros-details__item { margin: 0; }
.hirepros-details dt {
	font-size: 0.75em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--hirepros-muted);
}
.hirepros-details dd { margin: 2px 0 0; font-weight: 600; }
.hirepros-job__description { margin-bottom: 40px; }

/* Application form */
.hirepros-apply {
	padding-top: 32px;
	border-top: 1px solid var(--hirepros-border);
	scroll-margin-top: 24px;
}
.hirepros-apply__title { margin: 0 0 20px; }
.hirepros-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 20px;
}
.hirepros-form__field { margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.hirepros-form__field--wide { grid-column: 1 / -1; }
.hirepros-form__field label { font-weight: 600; }
.hirepros-form input[type="file"] {
	padding: 10px;
	border: 1px dashed var(--hirepros-border);
	border-radius: 8px;
	width: 100%;
}
.hirepros-form__help { color: var(--hirepros-muted); font-size: 0.8125em; }
.hirepros-form input:focus-visible,
.hirepros-form textarea:focus-visible,
.hirepros-filters select:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}
.hirepros-form__consent { font-size: 0.9375em; }
.hirepros-form__consent label { display: flex; gap: 10px; align-items: flex-start; }
.hirepros-form__consent input { margin-top: 0.3em; }
.hirepros-form__hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hirepros-alert {
	padding: 14px 16px;
	margin: 0 0 20px;
	border-radius: 8px;
	border: 1px solid var(--hirepros-border);
	background: var(--hirepros-subtle);
}
.hirepros-alert p { margin: 4px 0 0; }
.hirepros-alert--success { border-color: #1a7f37; background: color-mix(in srgb, #1a7f37 10%, transparent); }
.hirepros-alert--error { border-color: #b32d2e; background: color-mix(in srgb, #b32d2e 10%, transparent); }

/* Job status + deadline */
.hirepros-job-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 12px;
	border-radius: 999px;
	font-size: 0.8125em;
	font-weight: 700;
	line-height: 1.6;
	white-space: nowrap;
}
.hirepros-job-status::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}
.hirepros-job-status--open { color: #047857; background: color-mix(in srgb, #10b981 16%, transparent); }
.hirepros-job-status--closed { color: var(--hirepros-muted); background: var(--hirepros-subtle); border: 1px solid var(--hirepros-border); }
.hirepros-job-status--filled { color: #1d4ed8; background: color-mix(in srgb, #3b82f6 14%, transparent); }

.hirepros-details__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--hirepros-border);
}
.hirepros-details__deadline { font-weight: 600; }
.hirepros-details--closed .hirepros-details__deadline,
.hirepros-details--filled .hirepros-details__deadline { color: var(--hirepros-muted); font-weight: 400; }
.hirepros-closed-note { margin: 0; color: var(--hirepros-muted); }

.hirepros-job-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hirepros-job-card__head .hirepros-job-card__title { margin-bottom: 8px; }
.hirepros-job-card__deadline { font-weight: 600; }

@media (max-width: 640px) {
	.hirepros-form__grid { grid-template-columns: 1fr; }
	.hirepros-filters { padding: 12px; }
	.hirepros-filters__field { flex-basis: 100%; }
	.hirepros-job-card { padding: 16px; }
	.hirepros-details { padding: 16px; }
	.hirepros-button { width: 100%; }
}
