/**
 * RWS Job Board styles.
 *
 * Everything is driven by CSS custom properties so the brand palette can be
 * overridden from Bricks (or the theme) without touching this file. Set them on
 * :root, on the Bricks element, or on any ancestor:
 *
 *   :root {
 *     --rws-jb-brand: #c2410c;
 *     --rws-jb-radius: 10px;
 *   }
 */

.rws-jb,
.rws-job {
	--rws-jb-brand: #c2410c;
	--rws-jb-ink: #111827;
	--rws-jb-muted: #6b7280;
	--rws-jb-line: #e5e7eb;
	--rws-jb-surface: #ffffff;
	--rws-jb-surface-alt: #f9fafb;
	--rws-jb-radius: 10px;
	--rws-jb-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 12px rgba(16, 24, 40, 0.06);
	--rws-jb-map-height: 640px;
	--rws-jb-list-height: 720px;

	/* Job card */
	--rws-jb-card-radius: 12px;
	--rws-jb-card-line: #e3e6ea;
	--rws-jb-card-title: #12213f;
	--rws-jb-label: #3f4a5c;
	--rws-jb-control-bg: #f3f4f6;
	--rws-jb-control-bg-hover: #eaecef;
	--rws-jb-filters-radius: 14px;
	--rws-jb-card-location: #8a9098;
	--rws-jb-pay: #d81f2a;

	/* Typography. Set these to `inherit` to fall back to the Bricks theme. */
	--rws-jb-font-heading: "Oswald", "Arial Narrow", sans-serif;
	--rws-jb-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	box-sizing: border-box;
	max-width: 100%;
	color: var(--rws-jb-ink);
	font-family: var(--rws-jb-font-body);
}

/* Headings use the condensed face; everything else inherits the body font. */
.rws-jb__card-title,
.rws-jb__iw-title,
.rws-job__title,
.rws-job__section-title {
	font-family: var(--rws-jb-font-heading);
}

.rws-jb *,
.rws-jb *::before,
.rws-jb *::after,
.rws-job *,
.rws-job *::before,
.rws-job *::after {
	box-sizing: inherit;
}

/* ---------------------------------------------------------------------------
 * Filters
 * ------------------------------------------------------------------------ */

.rws-jb__filters {
	background: var(--rws-jb-surface);
	border: 1px solid var(--rws-jb-card-line, #e3e6ea);
	border-radius: var(--rws-jb-filters-radius, 14px);
	padding: 22px 26px;
	margin-bottom: 16px;
	max-width: 100%;
}

@media (max-width: 599px) {
	.rws-jb__filters {
		padding: 18px;
	}

	/* Full-width controls read better than a cramped two-up on a phone. */
	.rws-jb__field {
		flex: 1 1 100%;
	}

	.rws-jb__clear {
		width: 100%;
	}
}

/* One row: every field flexes evenly, the button pins to the end and lines up
   with the controls rather than the labels. */
.rws-jb__filters-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
}

.rws-jb__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 0;
	min-width: 128px;
}

.rws-jb__label {
	font-family: var(--rws-jb-font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--rws-jb-label, #3f4a5c);
	margin: 0;
}

.rws-jb__select {
	width: 100%;
	padding: 11px 30px 11px 14px;
	font-family: var(--rws-jb-font-body);
	font-size: 14px;
	line-height: 1.3;
	color: var(--rws-jb-ink);
	background-color: var(--rws-jb-control-bg, #f3f4f6);
	border: 1px solid transparent;
	border-radius: 8px;
	appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a9098' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* The empty value is the "Any" placeholder, so grey it like one. */
.rws-jb__select:has(option[value=""]:checked) {
	color: var(--rws-jb-card-location, #8a9098);
}

.rws-jb__select:hover {
	background-color: var(--rws-jb-control-bg-hover, #eaecef);
}

.rws-jb__select:focus-visible {
	outline: none;
	border-color: var(--rws-jb-ink);
	background-color: var(--rws-jb-surface);
}

.rws-jb__count {
	margin: 0 0 14px;
	font-family: var(--rws-jb-font-body);
	font-size: 13px;
	font-weight: 500;
	color: var(--rws-jb-muted);
}

.rws-jb__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	padding: 11px 20px;
	font-family: var(--rws-jb-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--rws-jb-card-title, #12213f);
	background: var(--rws-jb-surface);
	border: 2px solid var(--rws-jb-card-title, #12213f);
	border-radius: 8px;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.rws-jb__clear:not(:disabled):hover {
	color: #fff;
	background: var(--rws-jb-card-title, #12213f);
}

.rws-jb__clear:focus-visible {
	outline: 2px solid var(--rws-jb-brand);
	outline-offset: 2px;
}

.rws-jb__clear:disabled {
	opacity: 0.35;
	cursor: default;
}

/* ---------------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------------ */

.rws-jb__body {
	display: grid;
	gap: 20px;
	/* minmax(0,…) rather than 1fr: grid children default to min-width auto,
	   which lets a long unbreakable string push the column past the viewport. */
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
	.rws-jb--split .rws-jb__body {
		grid-template-columns: minmax(320px, 4fr) minmax(0, 6fr);
		align-items: start;
	}
}

.rws-jb__list-wrap {
	min-width: 0;
}

.rws-jb--map-top .rws-jb__body {
	display: flex;
	flex-direction: column-reverse;
}

.rws-jb__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	max-height: var(--rws-jb-list-height);
	overflow-y: auto;
	padding-right: 4px;
	scrollbar-width: thin;
}

/* Below the split breakpoint the list should not be its own scroll area —
   a scrollbox inside a scrolling page is awkward on touch. */
@media (max-width: 899px) {
	.rws-jb__list {
		max-height: none;
		overflow: visible;
		padding-right: 0;
	}
}

.rws-jb--map-top .rws-jb__list,
.rws-jb--list-only .rws-jb__list {
	max-height: none;
	overflow: visible;
}

@media (min-width: 900px) {
	.rws-jb--map-top .rws-jb__list,
	.rws-jb--list-only .rws-jb__list {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}
}

.rws-jb__map-wrap {
	position: relative;
}

@media (min-width: 900px) {
	.rws-jb--split .rws-jb__map-wrap {
		position: sticky;
		top: 24px;
	}
}

.rws-jb__map {
	width: 100%;
	height: var(--rws-jb-map-height);
	min-height: 320px;
	border-radius: var(--rws-jb-radius);
	border: 1px solid var(--rws-jb-line);
	overflow: hidden;
	background: var(--rws-jb-surface-alt);
}

@media (max-width: 899px) {
	.rws-jb__map {
		height: min(var(--rws-jb-map-height), 380px);
	}
}

.rws-jb__map--error {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	text-align: center;
}

.rws-jb__map-error {
	max-width: 40ch;
	font-size: 14px;
	line-height: 1.5;
	color: var(--rws-jb-muted);
}

/* ---------------------------------------------------------------------------
 * Job cards
 * ------------------------------------------------------------------------ */

.rws-jb__card {
	--rws-jb-accent: var(--rws-jb-brand);

	position: relative;
	display: block;
	min-width: 0;
	max-width: 100%;
	background: var(--rws-jb-surface);
	border: 1px solid var(--rws-jb-card-line, #e3e6ea);
	border-radius: var(--rws-jb-card-radius, 12px);
	padding: 16px 18px;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.rws-jb__card:hover,
.rws-jb__card:focus-visible,
.rws-jb__card.is-active {
	box-shadow: var(--rws-jb-shadow);
	transform: translateY(-1px);
	color: inherit;
}

.rws-jb__card:focus-visible {
	outline: 2px solid var(--rws-jb-accent);
	outline-offset: 2px;
}

.rws-jb__card.is-active {
	border-color: var(--rws-jb-accent);
}

/* Badge + pay row */

.rws-jb__card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-bottom: 10px;
}

.rws-jb__card-badge {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--rws-jb-accent);
	color: #fff;
	font-family: var(--rws-jb-font-body);
	font-size: 10px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	display: inline-block;
}

.rws-jb__card-pay {
	/* Must be allowed to wrap: values like "$25.00 - $40.00/HR Weekly Pay" are
	   far too long to hold on one line on a phone. */
	flex: 0 1 auto;
	min-width: 0;
	font-family: var(--rws-jb-font-body);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--rws-jb-pay, #d81f2a);
	text-align: right;
	overflow-wrap: anywhere;
}

.rws-jb__card-title {
	margin: 0 0 6px;
	font-size: 18px;
	line-height: 1.3;
	/* Oswald tops out at 700 — anything higher gets synthesised and smears. */
	font-weight: 600;
	color: var(--rws-jb-card-title, #12213f);
	/* Job titles are pipe-separated runs with no spaces around long tokens. */
	overflow-wrap: anywhere;
}

.rws-jb__card-location {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--rws-jb-card-location, #8a9098);
	overflow-wrap: anywhere;
}

/* States */

.rws-jb__loading,
.rws-jb__empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--rws-jb-muted);
	background: var(--rws-jb-surface-alt);
	border: 1px dashed var(--rws-jb-line);
	border-radius: var(--rws-jb-radius);
}

.rws-jb__empty-title {
	margin: 0 0 4px;
	font-weight: 600;
	color: var(--rws-jb-ink);
}

.rws-jb__empty-sub {
	margin: 0;
	font-size: 14px;
}

.rws-jb__noscript {
	padding: 16px;
	background: var(--rws-jb-surface-alt);
	border-radius: var(--rws-jb-radius);
}

/* Info window */

.rws-jb__iw {
	font-family: inherit;
	padding: 2px 4px 4px;
	min-width: 190px;
}

.rws-jb__iw-type {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--rws-jb-accent, #c2410c);
	margin-bottom: 3px;
}

.rws-jb__iw-title {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #111827;
	text-decoration: none;
	margin-bottom: 4px;
}

.rws-jb__iw-location,
.rws-jb__iw-pay {
	font-size: 13px;
	color: #6b7280;
}

.rws-jb__iw-pay {
	font-weight: 600;
	color: #111827;
}

.rws-jb__iw-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--rws-jb-accent, #c2410c);
	text-decoration: none;
}

.rws-jb__pin {
	line-height: 0;
	transform: translateY(0);
}

/* ---------------------------------------------------------------------------
 * Single job layout
 * ------------------------------------------------------------------------ */

.rws-job {
	--rws-job-accent: var(--rws-jb-brand);
	--rws-job-navy: #152242;
	--rws-job-apply: #e01b2e;
	--rws-job-bullet: #e01b2e;
}

/* Breadcrumb */

.rws-job__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	font-family: var(--rws-jb-font-body);
	font-size: 14px;
	color: var(--rws-jb-card-location, #8a9098);
}

.rws-job__breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.rws-job__breadcrumb a:hover {
	color: var(--rws-job-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rws-job__crumb-sep {
	color: #c7ccd3;
}

.rws-job__crumb-current {
	color: var(--rws-jb-muted);
}

/* Hero */

.rws-job__hero {
	background: var(--rws-jb-surface);
	border: 1px solid var(--rws-jb-card-line, #e3e6ea);
	border-radius: var(--rws-jb-filters-radius, 14px);
	padding: 30px 34px 32px;
	margin-bottom: 22px;
}

.rws-job__title {
	margin: 0 0 14px;
	font-size: clamp(30px, 4.2vw, 44px);
	line-height: 1.15;
	font-weight: 600;
	/* Condensed faces are already tight; negative tracking closes them up. */
	letter-spacing: 0;
}

.rws-job__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.rws-job__badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	font-family: var(--rws-jb-font-body);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 999px;
	background: var(--rws-jb-control-bg, #f3f4f6);
	color: var(--rws-jb-card-title, #12213f);
}

.rws-job__badge--type {
	background: var(--rws-job-accent);
	color: #fff;
}

/* Apply */

.rws-job__cta {
	display: block;
	width: 100%;
	padding: 15px 26px;
	font-family: var(--rws-jb-font-body);
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	color: #fff;
	background: var(--rws-job-apply);
	border-radius: 8px;
	text-decoration: none;
	transition: filter 0.15s ease;
}

.rws-job__cta:hover {
	color: #fff;
	filter: brightness(0.92);
}

.rws-job__apply-card {
	background: var(--rws-job-navy);
	border-radius: var(--rws-jb-filters-radius, 14px);
	padding: 24px;
}

.rws-job__apply-kicker {
	margin: 0 0 14px;
	font-family: var(--rws-jb-font-body);
	font-size: 15px;
	color: #d5dbe6;
}

/* Hero fact row */

.rws-job__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	margin: 0;
}

.rws-job__fact {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.rws-job__fact dt {
	margin: 0;
	font-family: var(--rws-jb-font-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--rws-jb-card-location, #8a9098);
}

.rws-job__fact dd {
	margin: 0;
	font-family: var(--rws-jb-font-body);
	font-size: 17px;
	font-weight: 600;
	color: var(--rws-jb-card-title, #12213f);
}

/* Body grid */

.rws-job__grid {
	display: grid;
	gap: 22px;
	grid-template-columns: 1fr;
}

@media (min-width: 900px) {
	.rws-job__grid {
		grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
		align-items: start;
	}
}

.rws-job__main {
	background: var(--rws-jb-surface);
	border: 1px solid var(--rws-jb-card-line, #e3e6ea);
	border-radius: var(--rws-jb-filters-radius, 14px);
	padding: 30px 34px 34px;
}

.rws-job__section + .rws-job__section {
	margin-top: 28px;
}

.rws-job__section-title {
	margin: 0 0 12px;
	font-size: 23px;
	font-weight: 600;
	letter-spacing: 0;
}

.rws-job__prose {
	font-family: var(--rws-jb-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: #303a4b;
}

.rws-job__prose p {
	margin: 0 0 0.9em;
}

.rws-job__prose p:last-child,
.rws-job__prose ul:last-child,
.rws-job__prose ol:last-child {
	margin-bottom: 0;
}

.rws-job__prose ul,
.rws-job__prose ol {
	margin: 0 0 0.9em;
	padding-left: 0;
	list-style: none;
}

.rws-job__prose ol {
	list-style: decimal;
	padding-left: 1.3em;
}

/* Red bullet markers */
.rws-job__prose ul > li {
	position: relative;
	padding-left: 20px;
	margin-bottom: 0.45em;
}

.rws-job__prose ul > li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.62em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--rws-job-bullet);
}

.rws-job__prose ol > li {
	margin-bottom: 0.45em;
}

.rws-job__aside {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

@media (min-width: 900px) {
	.rws-job__aside {
		position: sticky;
		top: 24px;
	}
}

.rws-job__card {
	background: var(--rws-jb-surface);
	border: 1px solid var(--rws-jb-card-line, #e3e6ea);
	border-radius: var(--rws-jb-filters-radius, 14px);
	padding: 22px 24px;
}

.rws-job__card-label {
	margin: 0 0 14px;
	font-family: var(--rws-jb-font-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--rws-jb-card-location, #8a9098);
}

/* Recruiter */

.rws-job__recruiter {
	display: flex;
	align-items: center;
	gap: 14px;
}

.rws-job__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--rws-job-navy);
	color: #fff;
	font-family: var(--rws-jb-font-body);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.rws-job__recruiter-meta {
	min-width: 0;
}

.rws-job__recruiter-name {
	margin: 0 0 2px;
	font-family: var(--rws-jb-font-body);
	font-size: 17px;
	font-weight: 700;
	color: var(--rws-jb-card-title, #12213f);
}

.rws-job__recruiter-phone {
	font-family: var(--rws-jb-font-body);
	font-size: 15px;
	color: var(--rws-jb-card-location, #8a9098);
	text-decoration: none;
}

.rws-job__recruiter-phone:hover {
	color: var(--rws-job-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Map card */

.rws-job__map-card {
	position: relative;
	border-radius: var(--rws-jb-filters-radius, 14px);
	overflow: hidden;
	background: #e5e7eb;
}

.rws-job__map-pill {
	position: absolute;
	z-index: 2;
	top: 14px;
	left: 14px;
	padding: 6px 12px;
	border-radius: 8px;
	background: #fff;
	font-family: var(--rws-jb-font-body);
	font-size: 13px;
	font-weight: 600;
	color: var(--rws-jb-card-title, #12213f);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.14);
}

.rws-job__map {
	height: 240px;
	background: #e5e7eb;
}

/* Visually hidden, still read by screen readers */

.rws-jb-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.rws-jb__card,
	.rws-job__cta {
		transition: none;
	}

	.rws-jb__card:hover,
	.rws-jb__card.is-active,
	.rws-job__cta:hover {
		transform: none;
	}
}
