/* ==========================================================
   Aspire Job Listings Management — Frontend Styles
   Primary: var(--aspire-primary, #0175d4)
   Accent:  var(--aspire-accent, #00a38e)
   ========================================================== */

.ajb-wrap {
	--ajb-primary: var(--aspire-primary, #0175d4);
	--ajb-accent: var(--aspire-accent, #00a38e);
	--ajb-height: var(--aspire-height, 700px);
	font-family: 'League Spartan', system-ui, sans-serif;
	color: #111;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
}
.ajb-wrap *, .ajb-wrap *::before, .ajb-wrap *::after { box-sizing: border-box; }

/* ---------- Filter bar ----------
   Desktop & Tablet: inline (row) layout.
   Mobile: block (stacked, full-width) layout — see media query below. */
.ajb-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 16px;
}
.ajb-search-box {
	position: relative;
	display: inline-block;
	flex: 1 1 220px;
}
.ajb-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 13px;
	opacity: .6;
}
.ajb-search-box input {
	width: 100%;
	padding: 10px 12px 10px 34px;
	border: 1px solid #dcdfe4;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
}
.ajb-filter-select {
	display: inline-block;
	padding: 10px 12px;
	border: 1px solid #dcdfe4;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	background: #fff;
	color: #111;
	min-width: 150px;
}
.ajb-filter-select:focus, .ajb-search-box input:focus { outline: 2px solid var(--ajb-primary); outline-offset: 1px; }
.ajb-clear-btn {
	display: inline-block;
	background: none;
	border: none;
	color: var(--ajb-primary);
	font-weight: 600;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	padding: 8px 6px;
	margin-left: auto;
}
.ajb-clear-btn:hover { text-decoration: underline; }

/* ---------- Split layout ---------- */
.ajb-split {
	display: grid;
	grid-template-columns: 360px 1fr;
	gap: 18px;
	height: var(--ajb-height);
}
.ajb-list-col {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #f8f9fb;
	overflow: hidden;
}
.ajb-list {
	overflow-y: auto;
	flex: 1;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.ajb-detail-col {
	min-height: 0;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}
.ajb-detail {
	height: 100%;
	overflow-y: auto;
	padding: 28px 32px;
}

/* Scrollbar styling */
.ajb-list::-webkit-scrollbar, .ajb-detail::-webkit-scrollbar { width: 8px; }
.ajb-list::-webkit-scrollbar-thumb, .ajb-detail::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 8px; }
.ajb-list::-webkit-scrollbar-track, .ajb-detail::-webkit-scrollbar-track { background: transparent; }

/* ---------- Job card (list item) ---------- */
.ajb-item {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 16px;
	cursor: pointer;
	transition: box-shadow .15s, border-color .15s, transform .1s;
}
.ajb-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.ajb-item.active {
	border-color: var(--ajb-accent);
	border-width: 2px;
	box-shadow: 0 4px 14px rgba(0,163,142,.15);
}
.ajb-logo {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: #f1f3f5;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}
.ajb-logo img { width: 100%; height: 100%; object-fit: cover; }
.ajb-logo-placeholder { font-size: 18px; }
.ajb-item-title {
	margin: 10px 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: #000;
	line-height: 1.3;
}
.ajb-item-company { margin: 0 0 4px; font-size: 13.5px; font-weight: 600; color: #374151; }
.ajb-item-meta { margin: 0 0 6px; font-size: 12.5px; color: #6b7280; display: flex; gap: 8px; flex-wrap: wrap; }
.ajb-item-salary { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: #000; }
.ajb-item-excerpt {
	margin: 0 0 12px;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ajb-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ajb-item-time { font-size: 11.5px; color: #9ca3af; white-space: nowrap; }

.ajb-remote-tag {
	background: rgba(0,163,142,.1);
	color: var(--ajb-accent);
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: 11.5px;
}
.ajb-type-tag {
	background: rgba(1,117,212,.08);
	color: var(--ajb-primary);
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
}

/* ---------- Apply buttons ---------- */
.ajb-apply-btn {
	background: var(--ajb-primary);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
	border-radius: 8px;
	display: inline-block;
	text-align: center;
	transition: background .15s, transform .1s;
}
.ajb-apply-btn:hover { background: #015fa8; }
.ajb-apply-btn-sm { padding: 8px 18px; font-size: 13px; }
.ajb-apply-btn-lg { padding: 12px 28px; font-size: 15px; }

/* ---------- Detail panel ---------- */
.ajb-panel { display: none; }
.ajb-panel.active { display: block; }
.ajb-back-btn {
	display: none;
	background: none;
	border: none;
	color: var(--ajb-primary);
	font-weight: 700;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	margin-bottom: 14px;
	padding: 0;
}
.ajb-panel-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.ajb-logo-lg { width: 64px; height: 64px; border-radius: 10px; }
.ajb-logo-lg .ajb-logo-placeholder { font-size: 30px; }
.ajb-panel-company { margin: 0 0 2px; font-size: 13.5px; font-weight: 600; color: #6b7280; }
.ajb-panel-title { margin: 0 0 8px; font-size: 24px; font-weight: 800; color: #000; line-height: 1.25; }
.ajb-panel-meta { margin: 0; font-size: 13.5px; color: #6b7280; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.ajb-panel-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 16px 0;
	border-top: 1px solid #eef0f2;
	border-bottom: 1px solid #eef0f2;
	margin-bottom: 24px;
}
.ajb-salary-badge { font-size: 15px; font-weight: 700; color: #000; }

.ajb-section { margin-bottom: 26px; }
.ajb-section h3 { font-size: 18px; font-weight: 700; margin: 0 0 10px; color: #000; }
.ajb-requirements { padding-left: 20px; margin: 0; }
.ajb-requirements li { margin-bottom: 6px; color: #374151; line-height: 1.5; }
.ajb-description { color: #374151; line-height: 1.7; font-size: 15px; }
.ajb-description p { margin: 0 0 14px; }
.ajb-company-box { background: #f6f7f9; border-radius: 10px; padding: 18px; }
.ajb-company-box h3 { margin-top: 0; }
.ajb-detail-empty { color: #9ca3af; text-align: center; padding: 80px 20px; font-size: 15px; }
.ajb-empty { padding: 40px 12px; text-align: center; color: #6b7280; font-size: 14px; }

/* ---------- Load more ---------- */
.ajb-load-more-wrap { padding: 12px; text-align: center; }
.ajb-load-more {
	background: #fff;
	border: 1px solid var(--ajb-primary);
	color: var(--ajb-primary);
	font-weight: 700;
	font-family: inherit;
	padding: 10px 24px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13.5px;
}
.ajb-load-more:hover { background: var(--ajb-primary); color: #fff; }
.ajb-load-more[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Single job page fallback ---------- */
.ajb-single-fallback .ajb-detail { height: auto; overflow: visible; border: 1px solid #e5e7eb; border-radius: 12px; padding: 28px 32px; }
.ajb-single-fallback .ajb-back-btn { display: none !important; }

/* ==========================================================
   Mobile responsive
   ========================================================== */
@media (max-width: 900px) {
	.ajb-split { grid-template-columns: 1fr; height: auto; }
	.ajb-list-col { height: var(--ajb-height); }
	.ajb-detail-col { display: none; height: var(--ajb-height); }

	/* When a job is opened on mobile, hide list & show detail full width */
	.ajb-wrap.ajb-mobile-open .ajb-list-col { display: none; }
	.ajb-wrap.ajb-mobile-open .ajb-detail-col { display: block; }

	.ajb-back-btn { display: inline-block; }
}

@media (max-width: 600px) {
	/* Mobile: filter bar switches from inline (row) to block (stacked) */
	.ajb-filters { display: block; }
	.ajb-search-box,
	.ajb-filter-select,
	.ajb-clear-btn {
		display: block;
		width: 100%;
		margin: 0 0 10px;
		text-align: left;
	}
	.ajb-clear-btn { text-align: center; margin-bottom: 0; }

	.ajb-detail { padding: 20px 18px; }
	.ajb-panel-title { font-size: 20px; }
	.ajb-panel-header { flex-wrap: wrap; }
}
