/**
 * Lediga jobb – front end. Fonts come from the site's theme (sans headings, serif body text);
 * this adds layout, spacing and states for job lists, cards, filters and the job page, in the
 * theme's own language: dark heading bars, the yellow accent, square corners.
 */

.jobhub,
.jobhub-module,
.jobhub-job,
.jobhub-preview-frame {
	--jobhub-ink: #222;
	--jobhub-text: #333;
	--jobhub-muted: #666;
	--jobhub-line: #e2e2e2;
	--jobhub-line-strong: #c9c9c9;
	--jobhub-soft: #f6f6f6;
	--jobhub-accent: #f7d117;
	--jobhub-accent-dark: #e0bc00;
	--jobhub-focus: #1a4fd6;
	--jobhub-warning: #d98200;
	--jobhub-warning-soft: #fff7e6;
}

.jobhub-heading {
	/* Same look as the theme's ".heading-style h2" bars. */
	margin: 0;
	padding: 9px 0 0 8px;
	color: #fff;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.jobhub .heading-style h2 a,
.jobhub .heading-style h2 a:hover {
	color: #fff;
	text-decoration: none;
}

/* Lists and cards ------------------------------------------------------------ */

.jobhub-list {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.jobhub-card {
	position: relative;
	margin: 0;
	border-bottom: 1px solid var(--jobhub-line);
}

.jobhub-card__link {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 16px 12px 16px 15px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s;
}

.jobhub-card__link:hover {
	background-color: var(--jobhub-soft);
}

.jobhub-card__link:hover .jobhub-card__title,
.jobhub-card__link:focus .jobhub-card__title {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.jobhub-card__link:focus-visible {
	outline: 2px solid var(--jobhub-focus);
	outline-offset: -2px;
}

.jobhub-card__logo {
	display: flex;
	flex: 0 0 88px;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 88px;
	height: 60px;
	padding: 6px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--jobhub-line);
}

.jobhub-card__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
}

.jobhub-card__initial {
	color: var(--jobhub-muted);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

.jobhub-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.jobhub-card__title {
	color: var(--jobhub-ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.jobhub-card__byline,
.jobhub-card__meta {
	color: var(--jobhub-muted);
	font-size: 14px;
	line-height: 1.4;
}

.jobhub-card__ingress {
	margin-top: 2px;
	color: var(--jobhub-text);
	font-size: 15px;
	line-height: 1.5;
}

.jobhub-card__meta {
	margin-top: 2px;
	font-size: 13px;
}

/* Compact cards (sidebar widget, compact shortcode) */

.jobhub-card--compact .jobhub-card__link {
	padding: 12px 10px;
}

.jobhub-card--compact .jobhub-card__title {
	font-size: 15px;
}

.jobhub-card--compact .jobhub-card__byline {
	font-size: 13px;
}

/* Featured: a yellow edge and the label; the background stays light so a list of only
   featured jobs does not turn grey. */

.jobhub-card.is-featured {
	box-shadow: inset 3px 0 0 var(--jobhub-accent);
}

.jobhub-label {
	display: inline-block;
	align-self: flex-start;
	margin-bottom: 2px;
	padding: 2px 7px;
	background: var(--jobhub-ink);
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
}

.jobhub-module__more {
	margin: 12px 0 24px;
	font-weight: 700;
}

.jobhub-module__more a {
	text-decoration: none;
}

.jobhub-module__more a:hover,
.jobhub-module__more a:focus {
	text-decoration: underline;
}

.jobhub-count {
	margin: 0 0 4px;
	color: var(--jobhub-muted);
	font-size: 14px;
}

.jobhub-empty {
	margin: 16px 0;
	padding: 32px 16px;
	background: var(--jobhub-soft);
	color: var(--jobhub-muted);
	text-align: center;
}

/* Automatic placements: front page and under articles */

.jobhub-placement--start {
	margin: 0 0 16px;
}

.jobhub-placement--article {
	clear: both;
	margin: 32px 0 16px;
}

/* Article text styles underline every link; cards and module links stay clean. Only the link
   itself and the text spans: the logo frame keeps its border. */
.jobhub-placement .jobhub-card__link,
.jobhub-placement .jobhub-card__body span,
.jobhub-placement .jobhub-module__more a {
	border-bottom: 0;
	color: inherit;
	text-decoration: none;
}

.jobhub-placement .jobhub-card__link .jobhub-label {
	color: #fff;
}

.jobhub-placement .jobhub-card__link:hover .jobhub-card__title,
.jobhub-placement .jobhub-card__link:focus .jobhub-card__title {
	text-decoration: underline;
}

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

.jobhub-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 16px 0 12px;
}

.jobhub-filters select {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	min-width: 190px;
	max-width: 100%;
	height: 40px;
	margin: 0;
	padding: 0 34px 0 12px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
	border: 1px solid var(--jobhub-line-strong);
	border-radius: 0;
	color: var(--jobhub-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 38px;
	cursor: pointer;
}

.jobhub-filters select:hover {
	border-color: var(--jobhub-muted);
}

.jobhub-filters select:focus-visible {
	outline: 2px solid var(--jobhub-focus);
	outline-offset: 1px;
}

.jobhub-filters button {
	height: 40px;
	padding: 0 16px;
	background: var(--jobhub-ink);
	border: 0;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.jobhub-filters__reset {
	margin-left: 4px;
	color: var(--jobhub-ink);
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Pagination */

.jobhub-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 16px 0 24px;
}

.jobhub-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--jobhub-line-strong);
	color: var(--jobhub-ink);
	font-weight: 700;
	text-decoration: none;
}

.jobhub-pagination a.page-numbers:hover,
.jobhub-pagination a.page-numbers:focus {
	border-color: var(--jobhub-ink);
}

.jobhub-pagination .page-numbers.current {
	background: var(--jobhub-ink);
	border-color: var(--jobhub-ink);
	color: #fff;
}

.jobhub-pagination .page-numbers.dots {
	border-color: transparent;
}

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

.jobhub-job {
	padding: 20px 0 32px;
}

.jobhub-job__header {
	display: flex;
	gap: 20px;
	align-items: center;
	margin-bottom: 20px;
}

.jobhub-job__logo {
	flex: 0 0 auto;
	box-sizing: border-box;
	width: auto;
	max-width: 140px;
	height: auto;
	max-height: 96px;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--jobhub-line);
}

.jobhub-job__header > div {
	min-width: 0;
}

.jobhub-job__title {
	margin: 4px 0 6px;
	color: var(--jobhub-ink);
	font-size: 30px;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.jobhub-job__byline {
	margin: 0;
	color: var(--jobhub-muted);
	font-size: 16px;
}

.jobhub-job__ingress {
	margin: 0 0 20px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
}

.jobhub-job__image {
	display: block;
	width: 100%;
	height: auto;
	margin: 20px 0;
}

.jobhub-job__video {
	margin: 20px 0;
}

.jobhub-job__video iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.jobhub-job__section {
	margin-top: 28px;
}

.jobhub-job__section h2 {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 1.3;
}

.jobhub-job__section p:last-child {
	margin-bottom: 0;
}

.jobhub-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 16px 24px;
	margin: 24px 0;
	padding: 18px 20px;
	background: var(--jobhub-soft);
	border-top: 3px solid var(--jobhub-ink);
}

.jobhub-facts dt {
	color: var(--jobhub-muted);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.jobhub-facts dd {
	margin: 3px 0 0;
	color: var(--jobhub-ink);
	overflow-wrap: anywhere;
}

.jobhub-contact p {
	line-height: 1.7;
}

.jobhub-apply-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: center;
	margin: 24px 0;
}

.jobhub-apply {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	padding: 13px 26px;
	background: var(--jobhub-accent);
	border: 0;
	color: var(--jobhub-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

.jobhub-apply::after {
	content: "\2192";
	font-weight: 400;
	transition: transform 0.15s;
}

.jobhub-apply:hover,
.jobhub-apply:focus {
	background: var(--jobhub-ink);
	color: #fff;
	text-decoration: none;
}

.jobhub-apply:hover::after {
	transform: translateX(3px);
}

.jobhub-apply:focus-visible {
	outline: 2px solid var(--jobhub-focus);
	outline-offset: 2px;
}

/* The last apply button closes the page as a small call-to-action box. */
.jobhub-job > .jobhub-apply-wrap:last-child {
	margin-top: 32px;
	padding: 20px;
	background: var(--jobhub-soft);
}

.jobhub-apply-date {
	color: var(--jobhub-muted);
	font-size: 15px;
}

.jobhub-notice {
	margin-bottom: 20px;
	padding: 14px 16px;
	background: var(--jobhub-warning-soft);
	border-left: 4px solid var(--jobhub-warning);
	color: var(--jobhub-ink);
}

.jobhub-notice a {
	margin-left: 4px;
	color: inherit;
	font-weight: 700;
}

.jobhub-job.is-expired .jobhub-job__title {
	color: var(--jobhub-muted);
}

/* Small screens --------------------------------------------------------------------------- */

@media (max-width: 600px) {

	.jobhub-card__link {
		gap: 12px;
		padding: 14px 8px 14px 12px;
	}

	.jobhub-card__logo {
		flex-basis: 60px;
		width: 60px;
		height: 44px;
		padding: 4px;
	}

	.jobhub-card__title {
		font-size: 16px;
	}

	.jobhub-filters select {
		flex: 1 1 100%;
		min-width: 0;
	}

	.jobhub-job__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.jobhub-job__logo {
		max-width: 110px;
		max-height: 72px;
	}

	.jobhub-job__title {
		font-size: 24px;
	}

	.jobhub-job__ingress {
		font-size: 17px;
	}

	.jobhub-apply {
		justify-content: center;
		width: 100%;
		box-sizing: border-box;
	}

	.jobhub-job > .jobhub-apply-wrap:last-child {
		padding: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.jobhub-card__link,
	.jobhub-apply,
	.jobhub-apply::after {
		transition: none;
	}
}
