/* Job Board Front-End Styles (Theme- & Divi-Safe) */
.jb-wrapper {
	--jb-accent: #2563eb;
	--jb-accent-hover: #1d4ed8;
	--jb-card-bg: #ffffff;
	--jb-card-border: #e2e8f0;
	--jb-text: #1e293b;
	--jb-muted: #64748b;
	--jb-filled-bg: #fef3c7;
	--jb-filled-text: #92400e;
	font-family: inherit;
	max-width: 1000px;
	margin: 0 auto;
	padding: 12px 0;
}

.jb-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.jb-header-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.jb-board-title {
	margin: 0 0 6px;
	font-size: 1.9rem;
	line-height: 1.2;
}

.jb-board-subtitle {
	margin: 0;
	opacity: 0.9;
}

.jb-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 6px;
	border: none;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, transform 0.1s ease;
}

.jb-btn-primary {
	background: var(--jb-accent, #2563eb);
	color: #ffffff;
}

.jb-btn-primary:hover {
	background: var(--jb-accent-hover, #1d4ed8);
}

.jb-btn-secondary {
	background: #e2e8f0;
	color: #1e293b;
}

.jb-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
}

.jb-filter-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.jb-filter-select,
.jb-filter-search {
	padding: 7px 12px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #1e293b;
	font-size: 0.92rem;
}

.jb-filter-search {
	min-width: 220px;
}

.jb-category-section {
	margin-bottom: 36px;
}

.jb-category-heading {
	font-size: 1.4rem;
	margin: 0 0 14px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--jb-accent);
}

.jb-cards {
	display: flex;
	flex-direction: column;
	gap: var(--jb-gap, 18px);
}

.jb-card {
	background: var(--jb-card-bg);
	color: var(--jb-text);
	border: 1px solid var(--jb-card-border);
	border-left: 5px solid var(--jb-accent);
	border-radius: var(--jb-radius, 8px);
	padding: 20px 22px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Style Presets */
.jb-preset-dark_slate .jb-card {
	background: #1e293b;
	color: #f1f5f9;
	border-color: #334155;
}
.jb-preset-dark_slate .jb-org-name {
	color: #ffffff;
}
.jb-preset-dark_slate .jb-card-body {
	color: #cbd5e1;
}
.jb-preset-dark_slate .jb-card-header {
	border-bottom-color: #334155;
}

.jb-preset-minimal .jb-card {
	background: transparent;
	color: inherit;
	border: none;
	border-left: 4px solid var(--jb-accent);
	border-bottom: 1px solid rgba(148, 163, 184, 0.35);
	border-radius: 0;
	box-shadow: none;
	padding: 14px 16px;
}
.jb-preset-minimal .jb-org-name,
.jb-preset-minimal .jb-card-body {
	color: inherit;
}

.jb-card-filled {
	opacity: 0.82;
	border-left-color: #d97706;
}

.jb-card-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid #f1f5f9;
}

.jb-org-name {
	margin: 0 0 4px;
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
}

.jb-position-row {
	font-size: 1rem;
	font-weight: 600;
	color: var(--jb-accent);
}

.jb-location {
	color: var(--jb-muted);
	font-weight: 400;
	margin-left: 4px;
}

.jb-card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.jb-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
}

.jb-badge-filled {
	background: var(--jb-filled-bg);
	color: var(--jb-filled-text);
	text-transform: uppercase;
}

.jb-badge-tag {
	background: #eff6ff;
	color: #1d4ed8;
}

.jb-card-body {
	color: #334155;
	line-height: 1.6;
	margin-bottom: 14px;
}

.jb-card-body p:last-child {
	margin-bottom: 0;
}

.jb-card-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.jb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.jb-action-btn {
	display: inline-block;
	padding: 7px 14px;
	border-radius: 5px;
	background: var(--jb-accent);
	color: #ffffff !important;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
}

.jb-action-secondary {
	background: #f1f5f9;
	color: #1e293b !important;
	border: 1px solid #cbd5e1;
}

.jb-deadline {
	font-size: 0.85rem;
	color: var(--jb-muted);
	font-weight: 500;
}

.jb-card-footer-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	margin-left: auto;
	text-align: right;
}

.jb-posted-date {
	font-size: 0.76rem;
	color: #64748b;
	line-height: 1.2;
}

.jb-card-featured {
	border-color: var(--jb-accent, #2563eb) !important;
	box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}

.jb-badge-featured {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fcd34d;
}

/* Modal */
.jb-modal[hidden] {
	display: none;
}

.jb-modal {
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483000 !important;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	overflow-y: auto;
	padding: 48px 16px 32px;
}

.jb-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.78);
}

.jb-modal-dialog {
	position: relative;
	z-index: 1;
	margin: auto;
	background: #ffffff;
	color: #1e293b;
	width: 100%;
	max-width: 660px;
	border-radius: 10px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.jb-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 22px;
	border-bottom: 1px solid #e2e8f0;
}

.jb-modal-header h3 {
	margin: 0;
	font-size: 1.25rem;
	color: #0f172a;
}

.jb-modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #64748b;
}

.jb-modal-body {
	padding: 18px 22px;
}

.jb-modal-note {
	margin: 0 0 14px;
	font-size: 0.9rem;
	color: #64748b;
}

.jb-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px;
	margin-bottom: 12px;
}

.jb-field {
	margin-bottom: 12px;
}

.jb-field label {
	display: block;
	font-weight: 600;
	font-size: 0.88rem;
	margin-bottom: 4px;
	color: #1e293b;
}

.jb-field input[type="text"],
.jb-field input[type="email"],
.jb-field input[type="url"],
.jb-field input[type="date"],
.jb-field select,
.jb-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 0.95rem;
	color: #1e293b;
	background: #ffffff;
}

.jb-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 14px 22px;
	border-top: 1px solid #e2e8f0;
}

.jb-modal-feedback {
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 0.92rem;
	margin-top: 10px;
}

.jb-modal-feedback.jb-success {
	background: #dcfce7;
	color: #166534;
}

.jb-modal-feedback.jb-error {
	background: #fee2e2;
	color: #991b1b;
}

.jb-inline-footer {
	margin-top: 14px;
	display: flex;
	justify-content: flex-end;
}

/* Dark Mode (.jb-mode-dark) & Auto Dark Mode (.jb-mode-auto) */
.jb-mode-dark .jb-board-title,
.jb-mode-dark .jb-category-heading,
.jb-mode-dark .jb-org-name,
.jb-mode-dark .jb-modal-header h3,
.jb-mode-dark .jb-field label {
	color: #ffffff;
}
.jb-mode-dark .jb-board-subtitle,
.jb-mode-dark .jb-filter-group label,
.jb-mode-dark .jb-empty {
	color: #f1f5f9;
}
.jb-mode-dark .jb-position-title {
	color: #60a5fa;
}
.jb-mode-dark .jb-location,
.jb-mode-dark .jb-deadline {
	color: #cbd5e1;
}
.jb-mode-dark .jb-card,
.jb-mode-dark .jb-modal-dialog {
	background: #1e293b;
	color: #f1f5f9;
	border-color: #334155;
}
.jb-mode-dark .jb-card-body,
.jb-mode-dark .jb-modal-note {
	color: #cbd5e1;
}
.jb-mode-dark .jb-card-header,
.jb-mode-dark .jb-modal-header,
.jb-mode-dark .jb-modal-footer {
	border-color: #334155;
}
.jb-mode-dark .jb-filter-select,
.jb-mode-dark .jb-filter-search,
.jb-mode-dark .jb-field input[type="text"],
.jb-mode-dark .jb-field input[type="email"],
.jb-mode-dark .jb-field input[type="url"],
.jb-mode-dark .jb-field input[type="date"],
.jb-mode-dark .jb-field select,
.jb-mode-dark .jb-field textarea {
	background: #0f172a;
	color: #f1f5f9;
	border-color: #475569;
}
.jb-mode-dark .jb-action-secondary,
.jb-mode-dark .jb-btn-secondary {
	background: #334155;
	color: #f1f5f9 !important;
	border-color: #475569;
}

@media (prefers-color-scheme: dark) {
	.jb-mode-auto .jb-board-title,
	.jb-mode-auto .jb-category-heading,
	.jb-mode-auto .jb-org-name,
	.jb-mode-auto .jb-modal-header h3,
	.jb-mode-auto .jb-field label {
		color: #ffffff;
	}
	.jb-mode-auto .jb-board-subtitle,
	.jb-mode-auto .jb-filter-group label,
	.jb-mode-auto .jb-empty {
		color: #f1f5f9;
	}
	.jb-mode-auto .jb-position-title {
		color: #60a5fa;
	}
	.jb-mode-auto .jb-location,
	.jb-mode-auto .jb-deadline {
		color: #cbd5e1;
	}
	.jb-mode-auto .jb-card,
	.jb-mode-auto .jb-modal-dialog {
		background: #1e293b;
		color: #f1f5f9;
		border-color: #334155;
	}
	.jb-mode-auto .jb-card-body,
	.jb-mode-auto .jb-modal-note {
		color: #cbd5e1;
	}
	.jb-mode-auto .jb-card-header,
	.jb-mode-auto .jb-modal-header,
	.jb-mode-auto .jb-modal-footer {
		border-color: #334155;
	}
	.jb-mode-auto .jb-filter-select,
	.jb-mode-auto .jb-filter-search,
	.jb-mode-auto .jb-field input[type="text"],
	.jb-mode-auto .jb-field input[type="email"],
	.jb-mode-auto .jb-field input[type="url"],
	.jb-mode-auto .jb-field input[type="date"],
	.jb-mode-auto .jb-field select,
	.jb-mode-auto .jb-field textarea {
		background: #0f172a;
		color: #f1f5f9;
		border-color: #475569;
	}
	.jb-mode-auto .jb-action-secondary,
	.jb-mode-auto .jb-btn-secondary {
		background: #334155;
		color: #f1f5f9 !important;
		border-color: #475569;
	}
}

/* Subtle Animations (respecting reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
	@keyframes jbFadeSlideUp {
		from {
			opacity: 0;
			transform: translateY(8px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	@keyframes jbModalPop {
		from {
			opacity: 0;
			transform: scale(0.97);
		}
		to {
			opacity: 1;
			transform: scale(1);
		}
	}

	.jb-animated .jb-card {
		animation: jbFadeSlideUp 0.24s ease-out both;
		transition: transform 0.16s ease, box-shadow 0.16s ease;
	}

	.jb-animated .jb-card:hover {
		transform: translateY(-2px);
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	}

	.jb-animated .jb-modal-dialog {
		animation: jbModalPop 0.18s ease-out both;
	}
}
