/**
 * WP Job Portal Public Stylesheet
 *
 * @package WP_Job_Portal
 */

/* Main Container */
.wp-job-portal-container,
.wp-job-portal-detail-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	box-sizing: border-box;
}

/* ==========================================
   1. Filter & Search Section
   ========================================== */
.job-filter-form {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 30px;
	border: 1px solid #e9ecef;
}

.filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

.filter-group {
	flex: 1;
	min-width: 200px;
}

.filter-group.search-group {
	flex: 2;
	min-width: 250px;
}

.filter-group input[type="text"],
.filter-group select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ced4da;
	border-radius: 6px;
	font-size: 14px;
	background-color: #ffffff;
	box-sizing: border-box;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 1px #2271b1;
}

/* Loading & No Jobs Found */
.job-loading-spinner,
.no-jobs-found {
	text-align: center;
	padding: 30px;
	font-size: 16px;
	color: #6c757d;
}

/* ==========================================
   2. Job Cards Grid Layout
   ========================================== */
.job-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
}

.job-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 24px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.job-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
	border-color: #cbd5e1;
}

.job-card-title {
	margin: 0 0 12px 0;
	font-size: 20px;
	line-height: 1.3;
}

.job-card-title a {
	color: #1e293b;
	text-decoration: none;
}

.job-card-title a:hover {
	color: #2563eb;
}

.job-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.job-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	background: #f1f5f9;
	color: #475569;
}

.job-badge.type {
	background: #e0f2fe;
	color: #0369a1;
}

.job-badge.location {
	background: #fef3c7;
	color: #b45309;
}

.job-card-excerpt {
	color: #64748b;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 20px;
}

.job-card-action .apply-btn {
	display: inline-block;
	width: 100%;
	text-align: center;
	padding: 10px 0;
	background: #2563eb;
	color: #ffffff;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 500;
	font-size: 14px;
	transition: background 0.2s ease;
}

.job-card-action .apply-btn:hover {
	background: #1d4ed8;
}

/* ==========================================
   3. Job Detail & Application Form Page
   ========================================== */
.job-detail-header {
	margin-bottom: 24px;
}

.job-detail-title {
	font-size: 32px;
	color: #0f172a;
	margin-bottom: 12px;
}

.job-detail-meta .meta-item {
	margin-right: 20px;
	font-size: 14px;
	color: #475569;
}

.job-detail-content {
	line-height: 1.7;
	color: #334155;
	font-size: 16px;
	margin-bottom: 40px;
}

.job-detail-divider {
	border: 0;
	border-top: 1px solid #e2e8f0;
	margin: 40px 0;
}

/* Application Form */
.job-application-form-wrapper {
	background: #f8fafc;
	padding: 32px;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
}

.job-application-form-wrapper h2 {
	margin-top: 0;
	margin-bottom: 24px;
	font-size: 24px;
	color: #0f172a;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	font-size: 14px;
	color: #334155;
}

.form-group label .required {
	color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group input[type="file"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
	background: #ffffff;
}

.form-group textarea {
	resize: vertical;
}

.form-submit button {
	padding: 12px 28px;
	background: #2563eb;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.form-submit button:hover {
	background: #1d4ed8;
}

.form-submit button:disabled {
	background: #94a3b8;
	cursor: not-allowed;
}

/* Response Message Box */
.form-response-message {
	padding: 14px 18px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 14px;
}

.form-response-message.success {
	background-color: #dcfce7;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.form-response-message.error {
	background-color: #fee2e2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

/* ==========================================
   4. Responsive Styles
   ========================================== */
@media (max-width: 768px) {
	.filter-row {
		flex-direction: column;
	}
	
	.filter-group,
	.filter-group.search-group {
		width: 100%;
	}

	.job-application-form-wrapper {
		padding: 20px;
	}
}

/* ==========================================
   5. Success Modal Popup
   ========================================== */
.job-portal-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.job-portal-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
}

.job-portal-modal-content {
	position: relative;
	background: #ffffff;
	padding: 40px 32px;
	border-radius: 16px;
	max-width: 480px;
	width: 90%;
	text-align: center;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	z-index: 1;
	animation: jobPortalModalFadeIn 0.3s ease-out;
}

.job-portal-modal-icon {
	margin-bottom: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	background: #f0fdf4;
	border-radius: 50%;
}

.job-portal-modal-content h2 {
	margin: 0 0 12px 0;
	font-size: 22px;
	color: #0f172a;
}

.job-portal-modal-content p {
	margin: 0 0 28px 0;
	font-size: 15px;
	color: #475569;
	line-height: 1.6;
}

.job-portal-modal-btn {
	padding: 12px 36px;
	background: #2563eb;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.job-portal-modal-btn:hover {
	background: #1d4ed8;
}

@keyframes jobPortalModalFadeIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}