/* Job Post & Planner — Frontend Styles (mobile-first) */

.jpp-job-grid-wrapper {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	display: block;
}

.jpp-job-grid-wrapper * { box-sizing: border-box; }

.jpp-filter-empty-hint {
	font-size: 12px;
	color: #999;
	margin: 4px 0 0;
}

/* ---------- Filters ---------- */
.jpp-job-filters {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: clamp(16px, 3vw, 28px);
}

.jpp-filter-field { width: 100%; }

.jpp-job-filters input[type="text"],
.jpp-job-filters select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d5d5;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
	min-height: 44px;
}

.jpp-filter-actions {
	display: flex;
	gap: 10px;
}

@media (min-width: 768px) {
	.jpp-job-filters {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
	}
	.jpp-filter-field { flex: 1 1 200px; width: auto; }
	.jpp-filter-actions { flex: 0 0 auto; }
}

.jpp-job-filters.is-loading { opacity: 0.6; pointer-events: none; }

/* ---------- Grid ---------- */
.jpp-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

@media (min-width: 600px) {
	.jpp-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.jpp-grid { gap: 16px; }
}

.jpp-no-jobs {
	text-align: center;
	padding: 32px 16px;
	color: #666;
}

/* ---------- Pagination ---------- */
.jpp-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 28px;
}

.jpp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0 10px;
	border-radius: 6px;
	background: #f4f4f4;
	color: #1B3A20;
	text-decoration: none;
	font-size: 14px;
}

.jpp-pagination .page-numbers.current {
	background: #1B3A20;
	color: #fff;
}

.jpp-pagination .page-numbers:hover:not(.current) { background: #e2e2e2; }

/* ---------- Job Card ---------- */
.jpp-job-card {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	padding: clamp(16px, 2.5vw, 24px);
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 100%;
	overflow-wrap: break-word;
}

.jpp-job-card__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
	flex-wrap: wrap;
}

.jpp-job-card__title {
	margin: 0;
	font-size: clamp(17px, 2vw, 20px);
	line-height: 1.3;
}

.jpp-job-card__title a { color: #1B3A20; text-decoration: none; }
.jpp-job-card__title a:hover { text-decoration: underline; }

.jpp-job-card__ref {
	font-size: 12px;
	color: #888;
	background: #f4f4f4;
	padding: 3px 8px;
	border-radius: 20px;
	white-space: nowrap;
}

.jpp-job-card__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	font-size: 13px;
	color: #555;
}

.jpp-job-card__meta .jpp-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.jpp-job-card__meta .jpp-icon {
	width: 13px;
	height: 13px;
	color: #888;
}

.jpp-meta-label { font-weight: 600; color: #333; }

.jpp-job-card__excerpt {
	font-size: 14px;
	color: #555;
	line-height: 1.6;
	margin: 0;
}

.jpp-job-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
}

/* ---------- Buttons ---------- */
.jpp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	text-decoration: none;
	min-height: 44px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.jpp-btn-icon {
	display: inline-flex;
	align-items: center;
	color: inherit;
}

.jpp-btn-icon--before { margin-right: 8px; }
.jpp-btn-icon--after { margin-left: 8px; }

.jpp-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: inherit;
}

.jpp-btn-view {
	background: #f0f0f0;
	color: #1B3A20;
}
.jpp-btn-view:hover { background: #e2e2e2; }

.jpp-btn-apply,
.jpp-btn-submit,
.jpp-btn-search {
	background: #1B3A20;
	color: #fff;
}
.jpp-btn-apply:hover,
.jpp-btn-submit:hover,
.jpp-btn-search:hover { background: #14301a; }

.jpp-btn-reset {
	background: transparent;
	color: #1B3A20;
	border: 1px solid #1B3A20;
}
.jpp-btn-reset:hover { background: #f0f0f0; }

.jpp-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Single Job ---------- */
.jpp-single-job {
	max-width: 900px;
	margin: 0 auto;
	padding: clamp(16px, 3vw, 32px);
}

.jpp-breadcrumb {
	font-size: 13px;
	color: #777;
	margin-bottom: 16px;
}
.jpp-breadcrumb a { color: #1B3A20; text-decoration: none; }
.jpp-breadcrumb a:hover { text-decoration: underline; }

.jpp-single-job__title {
	font-size: clamp(24px, 4vw, 34px);
	margin: 0 0 12px;
	line-height: 1.25;
}

.jpp-single-job__meta {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	font-size: 14px;
	color: #555;
}

.jpp-single-job__ref {
	background: #f4f4f4;
	padding: 3px 10px;
	border-radius: 20px;
}

.jpp-single-job__section { margin-bottom: 28px; }
.jpp-single-job__section h2 {
	font-size: clamp(18px, 2.5vw, 22px);
	margin: 0 0 10px;
}
.jpp-single-job__content { font-size: 15px; line-height: 1.7; color: #333; }
.jpp-single-job__content :is(ul, ol) { padding-left: 20px; }

.jpp-single-job__apply { margin-top: 20px; }

/* ---------- Apply Popup ---------- */
.jpp-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	z-index: 100000;
	animation: jpp-fade-in 0.15s ease;
}

.jpp-popup-overlay[hidden] { display: none; }

@keyframes jpp-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes jpp-pop-in {
	from { opacity: 0; transform: translateY(8px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.jpp-popup {
	background: #fff;
	border-radius: 12px;
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	padding: clamp(20px, 4vw, 32px);
	position: relative;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	animation: jpp-pop-in 0.2s ease;
}

.jpp-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: transparent;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #555;
	min-width: 40px;
	min-height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease;
}
.jpp-popup__close:hover { background: #f2f2f2; }

.jpp-popup__title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 20px;
	padding-right: 34px;
}

.jpp-hp-wrap {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.jpp-form-field { margin-bottom: 16px; }
.jpp-form-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #333;
}
.jpp-required { color: #b3261e; }

.jpp-form-field input[type="text"],
.jpp-form-field input[type="email"],
.jpp-form-field input[type="tel"],
.jpp-form-field input[type="file"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d5d5;
	border-radius: 6px;
	font-size: 14px;
	min-height: 44px;
	transition: border-color 0.15s ease;
}

.jpp-form-field input[type="text"]:focus,
.jpp-form-field input[type="email"]:focus,
.jpp-form-field input[type="tel"]:focus,
.jpp-form-field input[type="file"]:focus {
	border-color: #1B3A20;
	outline: 2px solid rgba(27, 58, 32, 0.15);
	outline-offset: 1px;
}

.jpp-form-hint {
	font-size: 12px;
	color: #777;
	margin: 6px 0 0;
}

.jpp-form-message {
	font-size: 14px;
	padding: 10px 12px;
	border-radius: 6px;
	margin-bottom: 12px;
	display: none;
}
.jpp-form-message.is-success { display: block; background: #e6f4ea; color: #1e4620; }
.jpp-form-message.is-error { display: block; background: #fdecea; color: #611a15; }

/* ---------- Standalone Apply Button widget ---------- */
.jpp-apply-btn-wrap { width: 100%; }

.jpp-editor-placeholder {
	padding: 16px;
	border: 1px dashed #ccc;
	border-radius: 8px;
	color: #777;
	font-size: 13px;
	text-align: center;
}


.jpp-form-actions { margin-top: 8px; }
.jpp-form-actions .jpp-btn { width: 100%; }

/* ---------- Inline Application Form widget ---------- */
.jpp-inline-apply-form {
	width: 100%;
	max-width: 480px;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	padding: clamp(18px, 3vw, 28px);
}

.jpp-inline-apply-form .jpp-form-message { margin-bottom: 16px; }

@media (max-width: 360px) {
	.jpp-popup { padding: 18px; }
}
