/**
 * Jumper Media - Jobs Listing Section
 * Design matched from Figma reference (fusion-starter-78d)
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

.jm-jobs-listing-section {
	font-family: 'Manrope', -apple-system, Roboto, Helvetica, sans-serif;
	color: #101828;
	line-height: 1.6;
	padding: 40px 0;
}

/* ── SEARCH / FILTER BAR ── */
.jm-search-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	width: 100%;
	max-width: 1043px;
	margin: 0 auto;
	padding: 20px;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 1.671px 6.686px 0 rgba(0, 0, 0, 0.16);
}

.jm-search-input {
	flex: 1;
	min-width: 200px;
	display: flex;
	align-items: center;
	gap: 8px;
	height: 48px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid #D4D4D4;
	overflow: hidden;
}

.jm-search-input svg {
	flex-shrink: 0;
}

.jm-search-input input {
	flex: 1;
	min-width: 0;
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #0A0A0A;
	outline: none;
	background: transparent;
	border: none;
}

.jm-search-input input::placeholder {
	color: #737373;
}

.jm-filter-select {
	flex: 1;
	min-width: 180px;
	display: flex;
	align-items: center;
	gap: 8px;
	height: 48px;
	padding: 0 16px;
	border-radius: 8px;
	border: 1px solid #D4D4D4;
	overflow: hidden;
	position: relative;
}

.jm-filter-select svg:first-child {
	flex-shrink: 0;
}

.jm-filter-select select {
	flex: 1;
	min-width: 0;
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #0A0A0A;
	outline: none;
	background: transparent;
	border: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.jm-filter-select .jm-chevron {
	flex-shrink: 0;
	pointer-events: none;
}

.jm-btn-reset {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 16px 8px;
	border-radius: 10px;
	background: #fff;
	font-family: 'Manrope', sans-serif;
	font-size: 18px;
	font-weight: 500;
	color: #155DFC;
	border: none;
	cursor: pointer;
	transition: color 0.2s;
	flex-shrink: 0;
}

.jm-btn-reset:hover {
	color: #0A4BD4;
}

/* ── RESULTS HEADER ── */
.jm-jobs-results {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 1044px;
	margin: 40px auto 0;
	padding: 0 20px;
}

.jm-jobs-count {
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #525252;
	margin: 0;
}

/* ── JOBS LIST (Single Column) ── */
.jm-jobs-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ── JOB CARD ── */
.jm-job-card {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 24px;
	padding: 24px;
	border-radius: 16px;
	border: 1px solid #E5E7EB;
	background: #fff;
	width: 100%;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.jm-job-card:hover {
	border-color: #D1D5DB;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.jm-job-card-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
	min-width: 0;
}

/* Title Row */
.jm-job-card-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.jm-job-card-title {
	font-family: 'Manrope', sans-serif;
	font-size: 20px;
	font-weight: 500;
	color: #101828;
	line-height: 28px;
	margin: 0;
}

.jm-job-card-title a {
	color: inherit;
	text-decoration: none;
}

.jm-job-card-title a:hover {
	color: #155DFC;
}

/* ── CATEGORY BADGES (with specific colors per department) ── */
.jm-job-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 10px;
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 400;
	flex-shrink: 0;
}

.jm-job-badge svg {
	flex-shrink: 0;
}

/* Design */
.jm-badge-design {
	background: #EFF6FF;
	color: #1447E6;
}

.jm-badge-design svg {
	color: #1447E6;
}

/* Engineering */
.jm-badge-engineering {
	background: #EEF2FF;
	color: #4F39F6;
}

.jm-badge-engineering svg {
	color: #4F39F6;
}

/* Marketing */
.jm-badge-marketing {
	background: #F0FDF4;
	color: #00A63E;
}

.jm-badge-marketing svg {
	color: #00A63E;
}

/* Content */
.jm-badge-content {
	background: #FEFCE8;
	color: #D08700;
}

.jm-badge-content svg {
	color: #D08700;
}

/* Analytics */
.jm-badge-analytics {
	background: #FAF5FF;
	color: #9810FA;
}

.jm-badge-analytics svg {
	color: #9810FA;
}

/* Customer Success */
.jm-badge-customer-success {
	background: #FDEFFF;
	color: #E614D8;
}

.jm-badge-customer-success svg {
	color: #E614D8;
}

/* Sales */
.jm-badge-sales {
	background: #FFF7ED;
	color: #EA580C;
}

.jm-badge-sales svg {
	color: #EA580C;
}

/* Description */
.jm-job-card-desc {
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #4A5565;
	line-height: 24px;
	margin: 0;
}

/* Meta (Location + Type) */
.jm-job-card-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.jm-job-meta-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.jm-job-meta-item span {
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #6A7282;
}

.jm-job-meta-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #D1D5DC;
	flex-shrink: 0;
}

.jm-job-meta-type {
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #6A7282;
}

/* ── CARD ACTIONS (Right Side) ── */
.jm-job-card-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.jm-job-refer-btn {
	height: 48px;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	border: 1px solid #E4E4E7;
	font-family: 'Manrope', sans-serif;
	font-size: 18px;
	font-weight: 500;
	color: #525252;
	background: #fff;
	text-decoration: none;
	transition: background 0.2s;
}

.jm-job-refer-btn:hover {
	background: #F9FAFB;
	text-decoration: none;
	color: #525252;
}

.jm-job-apply-btn {
	height: 48px;
	padding: 0 25px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	border-radius: 14px;
	border: 2px solid #155DFC;
	background: #fff;
	font-family: 'Manrope', sans-serif;
	font-size: 18px;
	font-weight: 500;
	color: #155DFC;
	text-decoration: none;
	transition: background 0.2s;
}

.jm-job-apply-btn:hover {
	background: #EFF6FF;
	color: #155DFC;
	text-decoration: none;
}

.jm-job-apply-btn svg {
	flex-shrink: 0;
}

/* ── NO RESULTS ── */
.jm-jobs-no-results {
	text-align: center;
	padding: 64px 20px;
}

.jm-jobs-no-results p {
	font-family: 'Manrope', sans-serif;
	font-size: 18px;
	font-weight: 400;
	color: #525252;
	margin: 0;
}

/* ── Filter icon button (mobile only) ── */
.jm-filter-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: none;
	background: transparent;
	cursor: pointer;
	flex-shrink: 0;
}

/* ── Mobile Filter Overlay ── */
.jm-filter-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.jm-filter-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* ── Mobile Filter Drawer ── */
.jm-filter-drawer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #fff;
	border-radius: 24px 24px 0 0;
	z-index: 10000;
	transform: translateY(100%);
	transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
	max-height: 85vh;
	overflow-y: auto;
	padding-bottom: env(safe-area-inset-bottom, 20px);
}

.jm-filter-drawer.active {
	transform: translateY(0);
}

.jm-filter-drawer-header {
	position: sticky;
	top: 0;
	background: #fff;
	padding: 12px 20px 16px;
	text-align: center;
	border-bottom: 1px solid #F0F0F0;
}

.jm-filter-drawer-handle {
	width: 40px;
	height: 4px;
	border-radius: 2px;
	background: #D4D4D4;
	margin: 0 auto 16px;
}

.jm-filter-drawer-close {
	position: absolute;
	left: 20px;
	top: 16px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
}

.jm-filter-drawer-title {
	font-family: 'Manrope', sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #101828;
	margin: 0;
}

.jm-filter-drawer-body {
	padding: 20px;
}

/* Remote Toggle */
.jm-filter-remote-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	border-bottom: 1px solid #F0F0F0;
}

.jm-filter-remote-toggle span {
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #101828;
}

.jm-toggle-switch {
	position: relative;
	width: 48px;
	height: 28px;
}

.jm-toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.jm-toggle-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #E5E7EB;
	border-radius: 28px;
	transition: background 0.3s;
}

.jm-toggle-slider:before {
	content: '';
	position: absolute;
	height: 22px;
	width: 22px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.3s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.jm-toggle-switch input:checked+.jm-toggle-slider {
	background: #155DFC;
}

.jm-toggle-switch input:checked+.jm-toggle-slider:before {
	transform: translateX(20px);
}

/* Filter Field */
.jm-filter-drawer-field {
	padding: 20px 0;
	border-bottom: 1px solid #F0F0F0;
}

.jm-filter-drawer-field:last-child {
	border-bottom: none;
}

.jm-filter-field-label {
	display: block;
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #101828;
	margin-bottom: 12px;
}

.jm-filter-drawer-field select {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid #D4D4D4;
	border-radius: 10px;
	font-family: 'Manrope', sans-serif;
	font-size: 15px;
	color: #525252;
	background: #FAFAFA;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23525252' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
}

/* Department Pills */
.jm-department-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.jm-dept-pill {
	height: 40px;
	padding: 0 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 20px;
	border: 1px solid #E5E7EB;
	background: #fff;
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #525252;
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
}

.jm-dept-pill:hover {
	border-color: #155DFC;
	color: #155DFC;
}

.jm-dept-pill.active {
	background: #155DFC;
	border-color: #155DFC;
	color: #fff;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {

	/* Show filter toggle, hide desktop filters */
	.jm-filter-toggle {
		display: flex;
	}

	.jm-filter-select,
	.jm-btn-reset {
		display: none;
	}

	.jm-search-bar {
		padding: 16px;
		border-radius: 20px;
	}

	.jm-search-input {
		min-width: unset;
	}

	.jm-jobs-results {
		padding: 0 16px;
	}

	/* Cards: side-by-side buttons */
	.jm-job-card {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		padding: 16px;
	}

	.jm-job-card-actions {
		width: 100%;
		flex-direction: row;
		gap: 12px;
	}

	.jm-job-refer-btn {
		flex: 1;
		height: 44px;
		font-size: 16px;
	}

	.jm-job-apply-btn {
		flex: 1;
		height: 44px;
		font-size: 16px;
	}

	.jm-job-card-title {
		font-size: 18px;
	}

	.jm-job-card-desc {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.jm-job-card-actions {
		flex-direction: column;
	}

	.jm-job-refer-btn,
	.jm-job-apply-btn {
		width: 100%;
	}
}