/* Tavapan Jobs – frontend */

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

.tvpj-wrap {
	container-type: inline-size;
	box-sizing: border-box;
	width: 100%;
}

/* Poster (inserat image) */
.tvpj-poster {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 6px;
	background: #2b2420;
	line-height: 0;
}

.tvpj-poster__img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
}

canvas.tvpj-live {
	opacity: 0;
	transition: opacity 0.3s;
}

canvas.tvpj-live.is-ready {
	opacity: 1;
}

.tvpj-poster__cta {
	position: absolute;
	display: block;
	border-radius: 999px;
	transition: box-shadow 0.15s;
}

.tvpj-poster__cta:hover,
.tvpj-poster__cta:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65);
	outline: none;
}

/* Facts */
.tvpj-card__facts,
.tvpj-single__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 0 0 12px !important;
	padding: 0 !important;
	list-style: none !important;
}

.tvpj-fact {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.tvpj-fact::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	background: var(--tvpj-brand, #0045bf);
	-webkit-mask: var(--tvpj-icon) center / contain no-repeat;
	mask: var(--tvpj-icon) center / contain no-repeat;
}

.tvpj-fact--location {
	--tvpj-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}

.tvpj-fact--workload {
	--tvpj-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M10 16v-1H3.01L3 19c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2v-4h-7v1h-4zm10-9h-4.01V5l-2-2h-4l-2 2v2H4c-1.1 0-2 .9-2 2v3c0 1.11.89 2 2 2h6v-2h4v2h6c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm-6 0h-4V5h4v2z'/%3E%3C/svg%3E");
}

/* Button */
.tvpj-button,
.tvpj-button:visited {
	display: inline-flex;
	align-items: center;
	gap: 0.8em;
	padding: 0.85em 1.6em;
	border-radius: 999px;
	background: var(--tvpj-brand, #0045bf);
	color: #fff !important;
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none !important;
	transition: filter 0.15s, transform 0.15s;
}

.tvpj-button:hover,
.tvpj-button:focus-visible {
	filter: brightness(1.12);
	transform: translateY(-1px);
}

/* Job listing */
.tvpj-jobs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px 28px;
	margin: 0 0 2em;
}

.tvpj-jobs.tvpj-cols-1 { grid-template-columns: 1fr; }
.tvpj-jobs.tvpj-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tvpj-jobs.tvpj-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@container (max-width: 900px) {
	.tvpj-jobs.tvpj-cols-3,
	.tvpj-jobs.tvpj-cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container (max-width: 540px) {
	.tvpj-jobs.tvpj-jobs {
		grid-template-columns: 1fr;
	}
}

.tvpj-jobs--text {
	grid-template-columns: 1fr;
	gap: 0;
}

.tvpj-jobs--empty {
	display: block;
}

.tvpj-card {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.tvpj-jobs--text .tvpj-card {
	padding: 20px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.tvpj-card__media {
	display: block;
	margin-bottom: 14px;
	transition: transform 0.2s, box-shadow 0.2s;
	border-radius: 6px;
}

.tvpj-card__media:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.tvpj-card__title {
	margin: 0 0 4px !important;
	font-size: 1.2em;
	line-height: 1.25;
}

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

.tvpj-card__title a:hover {
	color: var(--tvpj-brand, #0045bf);
}

.tvpj-card__sub {
	margin: 0 0 8px !important;
	opacity: 0.8;
}

.tvpj-card__more {
	margin-top: auto;
	color: var(--tvpj-brand, #0045bf);
	font-weight: 700;
	text-decoration: none;
}

.tvpj-card__more:hover {
	text-decoration: underline;
}

/* Job page */
.tvpj-wrap .tvpj-single__title {
	margin: 0 0 28px;
	padding: 0;
	font-size: clamp(26px, 1.1rem + 1.6vw, 40px);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0;
	overflow-wrap: break-word;
	text-wrap: balance;
}

.tvpj-single {
	display: grid;
	grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	margin: 0 0 2em;
}

@container (max-width: 720px) {
	.tvpj-single {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.tvpj-single__poster {
		position: static;
		max-width: 480px;
	}
}

.tvpj-single__poster {
	position: sticky;
	top: 24px;
}


.tvpj-single__sub {
	margin: 0 0 10px !important;
	font-size: 1.25em;
	font-weight: 600;
}

.tvpj-single__content {
	margin: 18px 0 24px;
}

.tvpj-single__apply {
	margin: 0 0 8px !important;
}

.tvpj-single__mail {
	font-size: 0.9em;
	opacity: 0.8;
}

.tvpj-back a {
	color: var(--tvpj-brand, #0045bf);
	font-weight: 700;
	text-decoration: none;
}

/* Plugin template */
.tvpj-page .tvpj-container {
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px 60px;
}

.tvpj-page__title {
	margin: 0 0 28px;
}

/* Fallback for browsers without container queries */
@media (max-width: 600px) {
	.tvpj-single,
	.tvpj-jobs.tvpj-jobs {
		grid-template-columns: 1fr;
	}
}
