/**
 * Imperial HR — front-end styles.
 * Scoped to .ihr so the plugin never bleeds into the host theme.
 */

.ihr {
	--ihr-brand: #10224A;
	--ihr-accent: #0F6E63;
	--ihr-ink: #1B222E;
	--ihr-body: #4A5361;
	--ihr-muted: #7A8494;
	--ihr-line: #DFE3E8;
	--ihr-bg: #F5F6F8;
	--ihr-white: #FFFFFF;
	--ihr-error: #B3261E;
	--ihr-radius: 2px;
	--ihr-serif: Georgia, "Times New Roman", serif;

	color: var(--ihr-body);
	font-size: 16px;
	line-height: 1.6;
	max-width: 1080px;
	margin-left: auto;
	margin-right: auto;
}

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

/* ---------- Buttons ---------- */

.ihr-btn {
	display: inline-block;
	padding: 13px 26px;
	border: 1px solid transparent;
	border-radius: var(--ihr-radius);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.ihr-btn--primary {
	background: var(--ihr-brand);
	color: #fff;
}

.ihr-btn--primary:hover,
.ihr-btn--primary:focus {
	background: #0A1836;
	color: #fff;
}

.ihr-btn--ghost {
	background: transparent;
	border-color: var(--ihr-line);
	color: var(--ihr-body);
}

.ihr-btn--ghost:hover {
	border-color: var(--ihr-brand);
	color: var(--ihr-brand);
}

.ihr-btn--submit {
	background: var(--ihr-accent);
	color: #fff;
	padding-left: 34px;
	padding-right: 34px;
}

.ihr-btn--submit:hover {
	background: #0B564D;
	color: #fff;
}

.ihr-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ---------- Vacancy list ---------- */

.ihr-job-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ihr-job-card {
	display: flex;
	gap: 28px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 26px 0;
	border-bottom: 1px solid var(--ihr-line);
}

.ihr-job-card:first-child {
	border-top: 1px solid var(--ihr-line);
}

.ihr-job-card.is-closed {
	opacity: 0.62;
}

.ihr-job-card__title {
	margin: 0 0 8px;
	font-family: var(--ihr-serif);
	font-size: 21px;
	line-height: 1.3;
	color: var(--ihr-brand);
}

.ihr-job-card__title a {
	color: inherit;
	text-decoration: none;
}

.ihr-job-card__title a:hover {
	text-decoration: underline;
}

.ihr-job-card__facts {
	margin: 0 0 8px;
	font-size: 13px;
	letter-spacing: 0.02em;
	color: var(--ihr-muted);
}

.ihr-job-card__excerpt {
	margin: 0;
	font-size: 15px;
}

.ihr-job-card__side {
	flex: 0 0 auto;
	text-align: right;
}

.ihr-job-card__closing {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--ihr-muted);
}

.ihr-job-card__closing span {
	display: block;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ihr-pill {
	display: inline-block;
	padding: 5px 12px;
	border-radius: var(--ihr-radius);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ihr-pill--closed {
	background: #EDEFF2;
	color: var(--ihr-muted);
}

.ihr-empty {
	padding: 32px;
	background: var(--ihr-bg);
	text-align: center;
	color: var(--ihr-muted);
}

/* ---------- Vacancy summary ---------- */

.ihr-summary {
	margin: 0 0 32px;
	padding: 24px 28px;
	background: var(--ihr-bg);
	border-left: 3px solid var(--ihr-accent);
}

.ihr-summary__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 18px 28px;
}

.ihr-summary__label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ihr-muted);
	margin-bottom: 3px;
}

.ihr-summary__value {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: var(--ihr-ink);
}

.ihr-summary__safeguarding {
	margin: 20px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--ihr-line);
	font-size: 13px;
	color: var(--ihr-muted);
}

/* ---------- Form shell ---------- */

.ihr-form-wrap {
	margin: 48px auto;
}

.ihr-eyebrow {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ihr-accent);
}

.ihr-form-title {
	margin: 0 0 10px;
	font-family: var(--ihr-serif);
	font-size: 32px;
	line-height: 1.2;
	color: var(--ihr-brand);
}

.ihr-form-intro {
	margin: 0 0 32px;
	max-width: 60ch;
	color: var(--ihr-body);
}

.ihr-form-layout {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: 44px;
	align-items: start;
}

/* ---------- The numbered progress rail ---------- */

.ihr-rail {
	position: sticky;
	top: 32px;
}

.ihr-rail__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 1px solid var(--ihr-line);
}

.ihr-rail__item {
	position: relative;
	display: flex;
	gap: 14px;
	padding: 14px 0 14px 22px;
	color: var(--ihr-muted);
	transition: color 0.16s ease;
}

.ihr-rail__item::before {
	content: "";
	position: absolute;
	left: -1px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: transparent;
	transition: background-color 0.16s ease;
}

.ihr-rail__item.is-active::before,
.ihr-rail__item.is-done::before {
	background: var(--ihr-accent);
}

.ihr-rail__item.is-active,
.ihr-rail__item.is-done {
	color: var(--ihr-ink);
}

.ihr-rail__number {
	flex: 0 0 auto;
	font-family: var(--ihr-serif);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--ihr-muted);
	padding-top: 2px;
}

.ihr-rail__item.is-active .ihr-rail__number,
.ihr-rail__item.is-done .ihr-rail__number {
	color: var(--ihr-accent);
}

.ihr-rail__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.ihr-rail__hint {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--ihr-muted);
}

/* ---------- Panels ---------- */

.ihr-panel {
	background: var(--ihr-white);
	border: 1px solid var(--ihr-line);
	border-radius: var(--ihr-radius);
	padding: 32px;
}

.ihr-panel[hidden] {
	display: none;
}

.ihr-panel__title {
	margin: 0 0 6px;
	font-family: var(--ihr-serif);
	font-size: 22px;
	color: var(--ihr-brand);
}

.ihr-panel__intro {
	margin: 0 0 24px;
	font-size: 14.5px;
	color: var(--ihr-muted);
}

.ihr-panel__title + .ihr-field,
.ihr-panel__title + .ihr-grid,
.ihr-panel__title + .ihr-role-card {
	margin-top: 22px;
}

/* ---------- Fields ---------- */

.ihr-field {
	margin: 0 0 20px;
}

.ihr-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ihr-ink);
}

.ihr-req {
	color: var(--ihr-error);
}

.ihr-field input[type="text"],
.ihr-field input[type="email"],
.ihr-field input[type="tel"],
.ihr-field input[type="url"],
.ihr-field input[type="date"],
.ihr-field select,
.ihr-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--ihr-line);
	border-radius: var(--ihr-radius);
	background: var(--ihr-white);
	font-family: inherit;
	font-size: 15px;
	color: var(--ihr-ink);
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.ihr-field textarea {
	resize: vertical;
	line-height: 1.6;
}

.ihr-field input:focus,
.ihr-field select:focus,
.ihr-field textarea:focus {
	outline: none;
	border-color: var(--ihr-accent);
	box-shadow: 0 0 0 3px rgba(15, 110, 99, 0.14);
}

.ihr-field.has-error input,
.ihr-field.has-error select,
.ihr-field.has-error textarea {
	border-color: var(--ihr-error);
}

.ihr-error {
	display: none;
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--ihr-error);
}

.ihr-field.has-error .ihr-error {
	display: block;
}

.ihr-hint {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: var(--ihr-muted);
}

.ihr-grid {
	display: grid;
	gap: 0 20px;
}

.ihr-grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

.ihr-grid--3 {
	grid-template-columns: repeat(3, 1fr);
}

.ihr-field--full {
	grid-column: 1 / -1;
}

.ihr-fieldset {
	margin: 0 0 24px;
	padding: 22px 24px;
	border: 1px solid var(--ihr-line);
	border-radius: var(--ihr-radius);
}

.ihr-fieldset legend {
	padding: 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ihr-accent);
}

/* ---------- Role card and safeguarding ---------- */

.ihr-role-card {
	padding: 20px 24px;
	background: var(--ihr-bg);
	border-left: 3px solid var(--ihr-accent);
	margin-bottom: 24px;
}

.ihr-role-card__label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ihr-muted);
	margin-bottom: 4px;
}

.ihr-role-card__title {
	display: block;
	font-family: var(--ihr-serif);
	font-size: 20px;
	color: var(--ihr-brand);
}

.ihr-role-card__ref {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: var(--ihr-muted);
}

.ihr-safeguarding {
	padding: 20px 24px;
	border: 1px solid var(--ihr-line);
	border-radius: var(--ihr-radius);
	background: #FBFBFC;
}

.ihr-safeguarding h4 {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ihr-brand);
}

.ihr-safeguarding p {
	margin: 0;
	font-size: 13.5px;
	color: var(--ihr-muted);
}

/* ---------- Uploads ---------- */

.ihr-upload {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 22px 24px;
	border: 1px dashed var(--ihr-line);
	border-radius: var(--ihr-radius);
	background: #FBFBFC;
	transition: border-color 0.16s ease, background-color 0.16s ease;
}

.ihr-upload.is-dragover {
	border-color: var(--ihr-accent);
	background: rgba(15, 110, 99, 0.05);
}

.ihr-upload.has-file {
	border-style: solid;
	border-color: var(--ihr-accent);
}

.ihr-upload input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.ihr-upload__text {
	font-size: 13.5px;
	color: var(--ihr-muted);
}

.ihr-upload__text strong {
	display: block;
	font-size: 15px;
	color: var(--ihr-ink);
	margin-bottom: 2px;
}

/* ---------- Declaration ---------- */

.ihr-declaration {
	margin-top: 8px;
	padding: 24px;
	background: var(--ihr-bg);
}

.ihr-declaration h4 {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ihr-brand);
}

.ihr-check {
	display: flex;
	gap: 11px;
	align-items: flex-start;
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.55;
	cursor: pointer;
}

.ihr-check input {
	flex: 0 0 auto;
	margin-top: 3px;
	width: 17px;
	height: 17px;
	accent-color: var(--ihr-accent);
}

/* ---------- Actions and notices ---------- */

.ihr-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid var(--ihr-line);
}

.ihr-actions .ihr-btn--submit {
	margin-left: auto;
}

.ihr-notice {
	padding: 14px 18px;
	margin: 0 0 22px;
	border-radius: var(--ihr-radius);
	font-size: 14.5px;
}

.ihr-notice--error {
	background: #FDEDEC;
	border-left: 3px solid var(--ihr-error);
	color: #7F1D1B;
}

.ihr-notice--closed {
	background: var(--ihr-bg);
	border-left: 3px solid var(--ihr-muted);
	color: var(--ihr-body);
}

.ihr-form-status {
	margin-top: 16px;
	font-size: 14px;
	color: var(--ihr-muted);
}

.ihr-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Success ---------- */

.ihr-success {
	max-width: 640px;
	margin: 48px auto;
	padding: 44px 40px;
	background: var(--ihr-white);
	border: 1px solid var(--ihr-line);
	border-top: 3px solid var(--ihr-accent);
	text-align: center;
}

.ihr-success__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 20px;
	border-radius: 50%;
	background: var(--ihr-accent);
	color: #fff;
	font-size: 24px;
	line-height: 1;
}

.ihr-success__title {
	margin: 0 0 18px;
	font-family: var(--ihr-serif);
	font-size: 26px;
	color: var(--ihr-brand);
}

.ihr-success__reference {
	display: inline-block;
	margin: 0 0 20px;
	padding: 14px 26px;
	background: var(--ihr-bg);
	border-left: 3px solid var(--ihr-accent);
	text-align: left;
}

.ihr-success__reference span {
	display: block;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ihr-muted);
}

.ihr-success__reference strong {
	display: block;
	margin-top: 3px;
	font-family: var(--ihr-serif);
	font-size: 22px;
	color: var(--ihr-brand);
}

.ihr-success__text {
	margin: 0;
	font-size: 15px;
	color: var(--ihr-body);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.ihr-form-layout {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.ihr-rail {
		position: static;
	}

	.ihr-rail__list {
		display: flex;
		gap: 4px;
		overflow-x: auto;
		border-left: 0;
		border-bottom: 1px solid var(--ihr-line);
		padding-bottom: 2px;
		-webkit-overflow-scrolling: touch;
	}

	.ihr-rail__item {
		flex: 0 0 auto;
		flex-direction: column;
		gap: 2px;
		padding: 10px 16px 12px;
	}

	.ihr-rail__item::before {
		left: 0;
		right: 0;
		top: auto;
		bottom: -1px;
		width: auto;
		height: 2px;
	}

	.ihr-rail__hint {
		display: none;
	}
}

@media (max-width: 640px) {
	.ihr-grid--2,
	.ihr-grid--3 {
		grid-template-columns: 1fr;
	}

	.ihr-panel {
		padding: 22px 18px;
	}

	.ihr-form-title {
		font-size: 26px;
	}

	.ihr-job-card {
		flex-direction: column;
		gap: 14px;
	}

	.ihr-job-card__side {
		text-align: left;
	}

	.ihr-actions {
		flex-wrap: wrap;
	}

	.ihr-actions .ihr-btn {
		flex: 1 1 auto;
	}

	.ihr-actions .ihr-btn--submit {
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ihr * {
		transition: none !important;
		animation: none !important;
	}
}
