/*
 * Platinum Careers front end. Mobile first.
 *
 * Colours and fonts come from the site's Elementor global variables, with the brand values as fallbacks.
 * Contrast (WCAG AA): navy on white is about 16:1, body text on white about 9.5:1, navy on the orange
 * buttons about 6:1, error red on white and on the light panel more than 6:1. Orange is never used for
 * text or with white text; it is only a button background (with navy text) or a decoration.
 * Nothing here loads a font or any file from another site.
 */

:root {
	--pe-navy: var(--e-global-color-primary, #101C2C);
	--pe-orange: var(--e-global-color-secondary, #FE7002);
	--pe-text: var(--e-global-color-text, #3A4756);
	--pe-line: var(--e-global-color-accent, #CAD2D8);
	/* Borders of form controls need 3:1 against white, which the pale accent colour does not give. */
	--pe-control-border: #66727F;
	--pe-error: #B42318;
	--pe-surface: #F4F6F8;
	--pe-font-heading: var(--e-global-typography-primary-font-family, "Manrope"), system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--pe-font-body: var(--e-global-typography-text-font-family, "Source Sans 3"), system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */

.pe-roles,
.pe-form-wrap,
.pe-job,
.pe-meta,
.pe-closed,
.pe-sections,
.pe-related,
.pe-fraud {
	font-family: var(--pe-font-body);
	color: var(--pe-text);
	line-height: 1.55;
}

.pe-roles *,
.pe-roles *::before,
.pe-roles *::after,
.pe-form-wrap *,
.pe-form-wrap *::before,
.pe-form-wrap *::after,
.pe-job *,
.pe-job *::before,
.pe-job *::after,
.pe-closed *,
.pe-related *,
.pe-fraud * {
	box-sizing: border-box;
}

/* A display rule on a class would otherwise beat the hidden attribute. */
.pe-roles [hidden],
.pe-form-wrap [hidden],
.pe-sticky-apply[hidden] {
	display: none !important;
}

.pe-roles :focus-visible,
.pe-form-wrap :focus-visible,
.pe-closed :focus-visible,
.pe-related :focus-visible,
.pe-fraud :focus-visible,
.pe-job :focus-visible,
.pe-sticky-apply:focus-visible {
	outline: 3px solid var(--pe-navy);
	outline-offset: 2px;
	/* A white ring fills the gap, so the outline also shows on a dark background. */
	box-shadow: 0 0 0 2px #fff;
}

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

a.pe-btn,
button.pe-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid var(--pe-orange);
	border-radius: 6px;
	background: var(--pe-orange);
	color: var(--pe-navy);
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.pe-btn:hover,
button.pe-btn:hover {
	border-color: var(--pe-navy);
	background: var(--pe-navy);
	color: #fff;
}

button.pe-btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}

/* ---------- Open roles: chips and cards ---------- */

/* The chips only work with JavaScript, so they stay hidden until the script has run. Without it every card shows. */
.pe-chips {
	display: none;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
}

.pe-roles[data-pe-ready] .pe-chips {
	display: flex;
}

button.pe-chip {
	min-height: 44px;
	padding: 8px 18px;
	border: 2px solid var(--pe-navy);
	border-radius: 999px;
	background: #fff;
	color: var(--pe-navy);
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

button.pe-chip:hover {
	background: var(--pe-surface);
	color: var(--pe-navy);
}

button.pe-chip[aria-pressed="true"],
button.pe-chip[aria-pressed="true"]:hover {
	background: var(--pe-navy);
	color: #fff;
}

.pe-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pe-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 20px;
	border: 1px solid var(--pe-line);
	border-top: 4px solid var(--pe-orange);
	border-radius: 8px;
	background: #fff;
}

.pe-card--compact {
	padding: 16px;
}

.pe-card__discipline {
	margin: 0;
	color: var(--pe-text);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pe-card__title {
	margin: 0;
	color: var(--pe-navy);
	font-family: var(--pe-font-heading);
	font-size: 20px;
	font-weight: 800;
	line-height: 1.25;
}

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

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

.pe-card__summary {
	margin: 0;
	color: var(--pe-text);
}

.pe-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0;
	padding: 0;
	color: var(--pe-text);
	font-size: 15px;
	list-style: none;
}

.pe-card__meta li {
	margin: 0;
	padding: 0;
}

.pe-card__meta li + li::before {
	margin-right: 12px;
	content: "\00B7";
	content: "\00B7" / "";
}

.pe-card .pe-btn {
	margin-top: auto;
}

.pe-empty {
	padding: 24px;
	border: 2px dashed var(--pe-control-border);
	border-radius: 8px;
	background: #fff;
	color: var(--pe-navy);
}

.pe-empty p {
	margin: 0 0 16px;
	font-size: 18px;
}

.pe-empty p:last-child {
	margin-bottom: 0;
}

/* ---------- Job page ---------- */

.pe-job__inner {
	max-width: 880px;
	margin: 0 auto;
	padding: 24px 16px 64px;
}

.pe-breadcrumb {
	margin: 0 0 16px;
	font-size: 15px;
}

.pe-breadcrumb a {
	color: var(--pe-navy);
	text-decoration: underline;
}

.pe-job__title {
	margin: 0 0 16px;
	color: var(--pe-navy);
	font-family: var(--pe-font-heading);
	font-size: 32px;
	font-weight: 800;
	line-height: 1.15;
}

.pe-job__about {
	margin: 0 0 32px;
}

.pe-job__content > :first-child {
	margin-top: 0;
}

.pe-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.pe-meta__item {
	margin: 0;
	padding: 6px 12px;
	border: 1px solid var(--pe-line);
	border-radius: 999px;
	background: var(--pe-surface);
	color: var(--pe-navy);
	font-size: 15px;
	font-weight: 600;
}

.pe-closed {
	margin: 0 0 24px;
	padding: 20px;
	border: 1px solid var(--pe-line);
	border-left: 6px solid var(--pe-orange);
	border-radius: 6px;
	background: var(--pe-surface);
	color: var(--pe-navy);
}

.pe-closed p {
	margin: 0 0 12px;
}

.pe-closed p:last-child {
	margin-bottom: 0;
}

.pe-closed__title {
	font-size: 18px;
	font-weight: 800;
}

.pe-sections {
	margin: 0 0 32px;
}

.pe-section {
	margin: 0 0 28px;
}

.pe-section__title,
.pe-related__title,
.pe-form-title {
	margin: 0 0 12px;
	color: var(--pe-navy);
	font-family: var(--pe-font-heading);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.2;
}

.pe-list {
	margin: 0;
	padding-left: 1.25em;
	color: var(--pe-text);
}

.pe-list li {
	margin: 0 0 8px;
}

.pe-related {
	margin: 48px 0 0;
}

.pe-fraud {
	margin: 40px 0 0;
	padding: 16px 20px;
	border-left: 6px solid var(--pe-navy);
	border-radius: 6px;
	background: var(--pe-surface);
	color: var(--pe-text);
}

.pe-fraud p {
	margin: 0;
}

.pe-fraud__title {
	margin-bottom: 6px;
	color: var(--pe-navy);
	font-weight: 800;
}

.pe-fraud a {
	color: var(--pe-navy);
	text-decoration: underline;
}

/* ---------- Application form ---------- */

.pe-form-wrap {
	max-width: 720px;
	margin: 0 0 32px;
}

.pe-apply {
	display: grid;
	gap: 20px;
	margin: 0;
	padding: 20px;
	border: 1px solid var(--pe-line);
	border-radius: 8px;
	background: var(--pe-surface);
	scroll-margin-top: 80px;
}

.pe-form-title {
	margin-bottom: 0;
}

.pe-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.pe-field label {
	color: var(--pe-navy);
	font-weight: 700;
}

.pe-field input[type="text"],
.pe-field input[type="email"],
.pe-field input[type="tel"],
.pe-field input[type="file"],
.pe-field select,
.pe-field textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 12px;
	border: 2px solid var(--pe-control-border);
	border-radius: 6px;
	background: #fff;
	box-shadow: none;
	color: var(--pe-navy);
	font-family: inherit;
	/* 16px or more stops iPhones zooming in when a field is focused. */
	font-size: 16px;
	line-height: 1.4;
}

.pe-field textarea {
	min-height: 120px;
	resize: vertical;
}

.pe-field input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 8px 14px;
	border: 2px solid var(--pe-navy);
	border-radius: 6px;
	background: #fff;
	color: var(--pe-navy);
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.pe-field input:focus-visible,
.pe-field select:focus-visible,
.pe-field textarea:focus-visible {
	border-color: var(--pe-navy);
}

.pe-field [aria-invalid="true"] {
	border-color: var(--pe-error);
}

.pe-hint {
	margin: 0;
	color: var(--pe-text);
	font-size: 15px;
}

.pe-error {
	margin: 0;
	color: var(--pe-error);
	font-size: 15px;
	font-weight: 600;
}

.pe-error a {
	color: var(--pe-error);
	text-decoration: underline;
}

.pe-field .pe-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	color: var(--pe-navy);
	font-weight: 400;
	cursor: pointer;
}

.pe-check input[type="checkbox"] {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	margin: 2px 0 0;
	accent-color: var(--pe-navy);
}

/*
 * The honeypot. It is moved off-screen rather than hidden with display:none, because some bots skip
 * fields that are display:none, and people (screen readers included) never reach it.
 */
.pe-hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.pe-noscript {
	margin: 0;
	padding: 12px 16px;
	border-left: 6px solid var(--pe-orange);
	background: #fff;
	color: var(--pe-navy);
	font-weight: 600;
}

.pe-noscript a {
	color: var(--pe-navy);
	text-decoration: underline;
}

.pe-apply .pe-btn {
	justify-self: stretch;
}

.pe-success {
	padding: 24px;
	border: 2px solid var(--pe-navy);
	border-left-width: 8px;
	border-radius: 8px;
	background: #fff;
	color: var(--pe-navy);
}

.pe-success__message {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 700;
}

.pe-success__fraud {
	margin: 0;
	color: var(--pe-text);
}

/* ---------- Floating Apply button (phones only) ---------- */

.pe-sticky-apply {
	position: fixed;
	left: 16px;
	bottom: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 999;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 96px;
	min-height: 48px;
	padding: 12px 28px;
	border-radius: 999px;
	background: var(--pe-orange);
	box-shadow: 0 4px 14px rgba(16, 28, 44, 0.35);
	color: var(--pe-navy);
	font-family: var(--pe-font-body);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
}

.pe-sticky-apply:hover {
	background: var(--pe-navy);
	color: #fff;
}

/* ---------- Larger screens ---------- */

@media (min-width: 768px) {
	.pe-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.pe-card {
		padding: 24px;
	}

	.pe-card--compact {
		padding: 20px;
	}

	.pe-job__inner {
		padding: 40px 24px 80px;
	}

	.pe-job__title {
		font-size: 40px;
	}

	.pe-apply {
		padding: 32px;
	}

	.pe-apply .pe-btn {
		justify-self: start;
	}

	/* The floating button is for phones only. */
	.pe-sticky-apply {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	a.pe-btn,
	button.pe-btn,
	button.pe-chip {
		transition: none;
	}
}
