/* Job Bank core web layer.
   Keep this file small: only route reset, shared controls, status messages,
   route loading, and modal primitives belong here. Page personality goes into
   page-specific files such as job_bank_jobs.css. */

:root {
	--jb-core-black: #050505;
	--jb-core-charcoal: #111111;
	--jb-core-panel: rgba(20, 20, 19, 0.92);
	--jb-core-panel-soft: rgba(255, 255, 255, 0.055);
	--jb-core-line: rgba(255, 255, 255, 0.14);
	--jb-core-line-strong: rgba(217, 174, 58, 0.46);
	--jb-core-text: #f7f5ee;
	--jb-core-muted: rgba(247, 245, 238, 0.68);
	--jb-core-gold: #d9ae3a;
	--jb-core-green: #1f9a5f;
	--jb-core-red: #c82d24;
	--jb-core-font-body: "Manrope", "Segoe UI", Arial, sans-serif;
	--jb-core-font-display: "Inter Tight", "Manrope", "Segoe UI", Arial, sans-serif;
}

html {
	background: var(--jb-core-black);
	overscroll-behavior-y: none;
}

body[data-path="job-bank"],
body[data-path="job"] {
	margin: 0;
	background: var(--jb-core-black);
	color: var(--jb-core-text);
	overscroll-behavior-y: none;
}

/* Frappe's website shell adds white wrappers by default. The public jobs portal
   owns the entire viewport, so these wrappers need to become transparent. */
body[data-path="job-bank"] .page-content-wrapper,
body[data-path="job-bank"] main.container,
body[data-path="job-bank"] .page_content,
body[data-path="job"] .page-content-wrapper,
body[data-path="job"] main.container,
body[data-path="job"] .page_content {
	width: 100%;
	max-width: none;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--jb-core-black);
}

body[data-path="job-bank"] .page-breadcrumbs,
body[data-path="job-bank"] .page-header-wrapper,
body[data-path="job-bank"] .page-footer,
body[data-path="job"] .page-breadcrumbs,
body[data-path="job"] .page-header-wrapper,
body[data-path="job"] .page-footer {
	display: none;
}

.jb-shell,
.jb-shell * {
	box-sizing: border-box;
	letter-spacing: 0;
}

.jb-shell {
	font-family: var(--jb-core-font-body);
	text-rendering: optimizeLegibility;
}

.jb-hidden,
.jb-workspace-hidden {
	display: none !important;
}

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

.jb-button,
.jb-button-secondary,
.jb-button-danger,
.jb-file-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 16px;
	border: 1px solid var(--jb-core-line);
	border-radius: 7px;
	font-family: var(--jb-core-font-body);
	font-size: 14px;
	font-weight: 760;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.jb-button {
	border-color: var(--jb-core-gold);
	background: var(--jb-core-gold);
	color: #080808;
	box-shadow: 0 14px 34px rgba(217, 174, 58, 0.16);
}

.jb-button:is(:hover, :focus-visible) {
	background: #f0c849;
	color: #080808;
	box-shadow: 0 0 0 3px rgba(217, 174, 58, 0.14), 0 18px 38px rgba(217, 174, 58, 0.2);
	transform: translateY(-1px);
}

.jb-button-secondary {
	background: rgba(255, 255, 255, 0.06);
	color: var(--jb-core-text);
}

.jb-button-secondary:is(:hover, :focus-visible) {
	border-color: var(--jb-core-line-strong);
	background: rgba(217, 174, 58, 0.12);
	color: var(--jb-core-text);
	box-shadow: 0 0 0 3px rgba(217, 174, 58, 0.1);
	transform: translateY(-1px);
}

.jb-button-danger {
	border-color: rgba(200, 45, 36, 0.48);
	background: rgba(200, 45, 36, 0.12);
	color: #ffd4d0;
}

.jb-field {
	display: grid;
	gap: 8px;
}

.jb-field label {
	color: rgba(247, 245, 238, 0.72);
	font-size: 11px;
	font-weight: 760;
	line-height: 1.2;
	text-transform: uppercase;
}

.jb-field input,
.jb-field select,
.jb-field textarea {
	width: 100%;
	min-height: 48px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 7px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--jb-core-text);
	font: 640 15px/1.35 var(--jb-core-font-body);
	outline: none;
	transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.jb-field input,
.jb-field select {
	padding: 0 14px;
}

.jb-field textarea {
	min-height: 118px;
	padding: 13px 14px;
	resize: vertical;
}

.jb-field input::placeholder,
.jb-field textarea::placeholder {
	color: rgba(247, 245, 238, 0.42);
}

.jb-field input:focus,
.jb-field select:focus,
.jb-field textarea:focus {
	border-color: rgba(217, 174, 58, 0.66);
	background: rgba(255, 255, 255, 0.11);
	box-shadow: 0 0 0 3px rgba(217, 174, 58, 0.12);
}

.jb-field select option {
	background: #101010;
	color: var(--jb-core-text);
}

.jb-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.jb-form-grid .is-wide {
	grid-column: 1 / -1;
}

.jb-status,
.jb-empty {
	border: 1px solid var(--jb-core-line);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--jb-core-muted);
}

.jb-status {
	margin: 18px auto 0;
	padding: 13px 16px;
}

.jb-status.is-error {
	border-color: rgba(200, 45, 36, 0.48);
	background: rgba(200, 45, 36, 0.12);
	color: #ffd4d0;
}

.jb-status.is-success {
	border-color: rgba(31, 154, 95, 0.5);
	background: rgba(31, 154, 95, 0.14);
	color: #d7ffe8;
}

.jb-status.is-info {
	border-color: rgba(217, 174, 58, 0.42);
	background: rgba(217, 174, 58, 0.12);
	color: #fff0bd;
}

.jb-empty {
	padding: 18px;
	text-align: center;
}

.jb-pill,
.jb-file-link {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 5px 10px;
	border: 1px solid rgba(217, 174, 58, 0.28);
	border-radius: 999px;
	background: rgba(217, 174, 58, 0.12);
	color: var(--jb-core-gold);
	font-size: 12px;
	font-weight: 780;
	line-height: 1;
	text-decoration: none;
}

.jb-pill-warning {
	border-color: rgba(200, 45, 36, 0.34);
	background: rgba(200, 45, 36, 0.12);
	color: #ffb6ae;
}

.jb-modal[hidden] {
	display: none !important;
}

.jb-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: clamp(14px, 3vw, 26px);
}

.jb-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.74);
}

.jb-modal-panel {
	position: relative;
	z-index: 1;
	width: min(960px, 100%);
	max-height: min(88vh, 840px);
	border: 1px solid rgba(217, 174, 58, 0.34);
	border-radius: 10px;
	background: #101010;
	color: var(--jb-core-text);
	box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
}

.jb-modal-panel:focus {
	outline: none;
}

body.jb-modal-open {
	overflow: hidden;
}

/* Shared navigation overlay used by the JS route-loading helper. */
.jb-route-loading {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(5, 5, 5, 0.88);
	color: #f8f8f5;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	backdrop-filter: blur(10px);
	transition: opacity 160ms ease, visibility 160ms ease;
}

.jb-route-loading.is-light {
	background: rgba(250, 250, 247, 0.9);
	color: #080808;
}

.jb-route-loading.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.jb-route-loading-panel {
	display: grid;
	gap: 14px;
	place-items: center;
	min-width: min(248px, 82vw);
	padding: 24px 28px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	background: rgba(12, 12, 12, 0.58);
	box-shadow: 0 28px 84px rgba(0, 0, 0, 0.44);
}

.jb-route-loading.is-light .jb-route-loading-panel {
	border-color: rgba(0, 0, 0, 0.14);
	background: rgba(255, 255, 255, 0.58);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
}

.jb-route-loading-panel strong {
	color: currentColor;
	font-size: 12px;
	font-weight: 740;
	text-transform: uppercase;
}

.jb-route-loading-mark {
	position: relative;
	width: 76px;
	height: 2px;
	border-radius: 999px;
	background: color-mix(in srgb, currentColor 24%, transparent);
	overflow: hidden;
}

.jb-route-loading-mark::after {
	position: absolute;
	inset: 0 auto 0 -32px;
	width: 32px;
	border-radius: inherit;
	background: currentColor;
	content: "";
	animation: jb-core-loading-sweep 950ms ease-in-out infinite;
}

@keyframes jb-core-loading-sweep {
	to {
		transform: translateX(108px);
	}
}

@media (max-width: 720px) {
	.jb-form-grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.001ms !important;
	}
}
