/* =====================================================
   Instant Careers — Frontend Styles
   CSS variables are injected via wp_add_inline_style
   ===================================================== */

/* ---- Base ---- */
.icrn-careers-wrap,
.icrn-single-job-wrap {
	font-family: var(--icrn-font, system-ui, sans-serif);
	color: #1e293b;
	line-height: 1.6;
}

/* =====================================================
   CAREERS LISTING PAGE
   ===================================================== */

.icrn-careers-header {
	text-align: center;
	margin-bottom: 40px;
}
.icrn-careers-title {
	font-size: 2rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 8px;
}
.icrn-careers-subtitle {
	font-size: 1.05rem;
	color: #64748b;
	margin: 0;
}

.icrn-no-jobs {
	text-align: center;
	padding: 60px 20px;
	color: #94a3b8;
	font-size: 1rem;
	border: 2px dashed #e2e8f0;
	border-radius: 12px;
}

.icrn-jobs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

/* ---- Job Card ---- */
.icrn-job-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: var(--icrn-radius, 6px);
	box-shadow: var(--icrn-shadow, 0 2px 8px rgba(0,0,0,.08));
	text-decoration: none;
	color: inherit;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	overflow: hidden;
}
.icrn-job-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	border-color: var(--icrn-primary, #2563eb);
	color: inherit;
	text-decoration: none;
}
.icrn-job-card-body   { padding: 24px 24px 16px; flex: 1; }
.icrn-job-title       { font-size: 1.1rem; font-weight: 600; margin: 0 0 12px; color: #0f172a; }
.icrn-job-card-footer { padding: 12px 24px 16px; border-top: 1px solid #f1f5f9; }
.icrn-apply-link {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--icrn-primary, #2563eb);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* =====================================================
   JOB TAGS (shared)
   ===================================================== */

.icrn-job-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.icrn-job-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.78rem;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 20px;
}
.icrn-tag-location { background: #eff6ff; color: #1d4ed8; }
.icrn-tag-type     { background: #f0fdf4; color: #15803d; }
.icrn-tag-dept     { background: #faf5ff; color: #7e22ce; }
.icrn-tag-deadline { background: #fff7ed; color: #c2410c; }

/* =====================================================
   SINGLE JOB PAGE
   ===================================================== */

.icrn-single-job-wrap { max-width: 800px; margin: 0 auto; }

/* ── Hero ── */
.icrn-job-hero {
	padding: 36px 0 28px;
	border-bottom: 1px solid #e2e8f0;
	margin-bottom: 32px;
}
.icrn-job-hero-title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 16px;
	line-height: 1.25;
	letter-spacing: -0.02em;
}
.icrn-single-meta { margin-top: 4px; }

/* ── Description ── */
.icrn-job-description-wrap {
	margin-bottom: 32px;
}
.icrn-job-description {
	font-size: 0.975rem;
	line-height: 1.8;
	color: #334155;
}
.icrn-job-description h1,
.icrn-job-description h2,
.icrn-job-description h3,
.icrn-job-description h4 {
	color: #0f172a;
	font-weight: 700;
	margin-top: 1.5em;
	margin-bottom: 0.5em;
}
.icrn-job-description ul,
.icrn-job-description ol {
	padding-left: 1.4em;
}
.icrn-job-description li {
	margin-bottom: 6px;
}
.icrn-job-description p { margin-bottom: 1em; }

/* ── Details Grid (custom fields) ── */
.icrn-details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1px;
	background: #e2e8f0;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 40px;
}
.icrn-detail-item {
	background: #f8fafc;
	padding: 14px 18px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.icrn-detail-key {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #94a3b8;
}
.icrn-detail-value {
	font-size: 0.9rem;
	font-weight: 600;
	color: #1e293b;
}

/* ── Apply Section ── */
.icrn-apply-section {
	margin-top: 48px;
	background: linear-gradient(135deg, #f0f7ff 0%, #f8faff 100%);
	border: 1px solid #bfdbfe;
	border-radius: 14px;
	padding: 36px 40px 40px;
	position: relative;
	overflow: hidden;
}
.icrn-apply-section::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: var(--icrn-primary, #2563eb);
	border-radius: 14px 0 0 14px;
}
@media ( max-width: 600px ) {
	.icrn-apply-section { padding: 24px 20px 28px; }
}

.icrn-apply-section-header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid #dbeafe;
}
.icrn-apply-section-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	background: var(--icrn-primary, #2563eb);
	color: #fff;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.icrn-apply-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 4px;
	line-height: 1.3;
}
.icrn-apply-subtitle {
	font-size: 0.875rem;
	color: #64748b;
	margin: 0;
}

/* =====================================================
   APPLICATION FORM
   ===================================================== */

.icrn-application-form { max-width: 580px; }
.icrn-apply-form-wrap  { }

.icrn-two-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media ( max-width: 560px ) { .icrn-two-fields { grid-template-columns: 1fr; } }

.icrn-form-field { margin-bottom: 20px; }
.icrn-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: 7px;
}
.icrn-required { color: #dc2626; font-weight: 700; }
.icrn-optional { font-size: 0.75rem; font-weight: 400; color: #94a3b8; }

.icrn-input,
.icrn-textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid #cbd5e1;
	border-radius: var(--icrn-radius, 6px);
	font-size: 0.9rem;
	font-family: var(--icrn-font, system-ui, sans-serif);
	color: #1e293b;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}
.icrn-input:focus,
.icrn-textarea:focus {
	outline: none;
	border-color: var(--icrn-primary, #2563eb);
	box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.icrn-input.icrn-has-error,
.icrn-file-upload-area.icrn-has-error .icrn-file-ui {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}
.icrn-textarea { resize: vertical; min-height: 120px; }

/* ---- File Upload ---- */
.icrn-file-upload-area { position: relative; }
.icrn-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
	z-index: 2;
}
.icrn-file-ui {
	border: 2px dashed #cbd5e1;
	border-radius: var(--icrn-radius, 6px);
	padding: 28px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background .15s;
	background: #fafafa;
}
.icrn-file-upload-area:hover .icrn-file-ui,
.icrn-file-upload-area.drag-over .icrn-file-ui {
	border-color: var(--icrn-primary, #2563eb);
	background: #eff6ff;
}
.icrn-file-ui svg    { color: #94a3b8; display: block; margin: 0 auto 10px; }
.icrn-file-ui-text   { font-size: 0.9rem; color: #64748b; margin: 0 0 4px; }
.icrn-file-browse    { color: var(--icrn-primary, #2563eb); font-weight: 600; text-decoration: underline; }
.icrn-file-hint      { font-size: 0.78rem; color: #94a3b8; margin: 0; }

.icrn-file-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	background: #f0fdf4;
	border: 1px solid #86efac;
	border-radius: 6px;
	font-size: 0.875rem;
	color: #15803d;
}
.icrn-file-name   { flex: 1; word-break: break-all; }
.icrn-file-remove { background: none; border: none; cursor: pointer; color: #94a3b8; padding: 0; display: flex; }
.icrn-file-remove:hover { color: #dc2626; }

/* ---- Field Error ---- */
.icrn-field-error {
	display: block;
	font-size: 0.8rem;
	color: #dc2626;
	margin-top: 5px;
}

/* ---- Submit Button ---- */
.icrn-form-submit { margin-top: 8px; }
.icrn-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 28px;
	border-radius: var(--icrn-radius, 6px);
	font-family: var(--icrn-font, system-ui, sans-serif);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background .15s, transform .1s, opacity .15s;
}
.icrn-btn-primary {
	background: var(--icrn-primary, #2563eb);
	color: var(--icrn-btn-color, #fff);
}
.icrn-btn-primary:hover  { background: var(--icrn-accent, #1e40af); }
.icrn-btn-primary:active { transform: scale(.98); }

.icrn-submit-btn { min-width: 160px; }
.icrn-submit-btn:disabled { opacity: .65; cursor: not-allowed; }

@keyframes icrn-spin { to { transform: rotate(360deg); } }
.icrn-spin { animation: icrn-spin .8s linear infinite; }

/* ---- Success / Error Messages ---- */
.icrn-form-success {
	margin-top: 16px;
	padding: 14px 18px;
	background: #f0fdf4;
	border: 1px solid #86efac;
	border-left: 4px solid #22c55e;
	border-radius: 8px;
	color: #15803d;
	font-size: 0.9rem;
	font-weight: 500;
}
.icrn-form-error {
	margin-top: 16px;
	padding: 14px 18px;
	background: #fef2f2;
	border: 1px solid #fca5a5;
	border-left: 4px solid #ef4444;
	border-radius: 8px;
	color: #dc2626;
	font-size: 0.9rem;
}

/* =====================================================
   CLOSED JOB PAGE
   ===================================================== */

.icrn-closed-notice {
	text-align: center;
	padding: 64px 24px;
	max-width: 560px;
	margin: 0 auto;
}
.icrn-closed-icon        { color: #94a3b8; margin-bottom: 20px; }
.icrn-closed-title       { font-size: 1.6rem; font-weight: 700; margin: 0 0 12px; color: #0f172a; }
.icrn-closed-text        { color: #64748b; margin: 0 0 32px; }
.icrn-closed-explore-title {
	font-weight: 600;
	font-size: 0.85rem;
	color: #374151;
	margin-bottom: 12px;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.icrn-closed-jobs { display: flex; flex-direction: column; gap: 8px; }
.icrn-closed-job-link {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	text-decoration: none;
	color: #1e293b;
	font-weight: 500;
	transition: border-color .15s, background .15s;
}
.icrn-closed-job-link:hover {
	border-color: var(--icrn-primary, #2563eb);
	background: #eff6ff;
	color: var(--icrn-primary, #2563eb);
	text-decoration: none;
}
