/* ============================================================
   Job Board Plugin Styles
   ============================================================ */

:root {
	--jb-navy:   #003478;
	--jb-orange: #e07528;
	--jb-card:   #ffffff;
	--jb-shadow: 0 3px 14px rgba(0, 20, 60, 0.28);
	--jb-muted:  rgba(255, 255, 255, 0.72);
}

.jb-post-form-wrap,
.jb-browse-wrap {
	max-width: 820px;
	margin: 0 auto;
	font-family: inherit;
}

/* ── Messages ─────────────────────────────────────────────── */
.jb-message {
	padding: 13px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
	line-height: 1.5;
}
.jb-message.jb-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.jb-message.jb-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Section cards (fieldsets styled as white cards) ──────── */
.jb-post-form-wrap fieldset {
	background: var(--jb-card);
	border: none;
	border-radius: 10px;
	box-shadow: var(--jb-shadow);
	padding: 26px 28px 22px;
	margin-bottom: 20px;
}

/* Float trick: makes legend flow as a normal block inside the card */
.jb-post-form-wrap legend {
	float: left;
	width: 100%;
	padding: 0 0 14px 0;
	margin-bottom: 4px;
	font-size: 1.1em;
	font-weight: 700;
	color: var(--jb-navy);
	border-bottom: 1px solid #e8edf4;
}
.jb-post-form-wrap legend + * { clear: left; }

/* ── Fields ───────────────────────────────────────────────── */
.jb-field { margin-bottom: 16px; }
.jb-field:last-child { margin-bottom: 0; }

.jb-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
	color: #333;
	font-size: 0.9em;
}

.jb-field input[type="text"],
.jb-field input[type="email"],
.jb-field input[type="tel"],
.jb-field input[type="url"],
.jb-field select,
.jb-field textarea {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid #d0d7e3;
	border-radius: 5px;
	font-size: 0.95em;
	box-sizing: border-box;
	background: #fff;
	color: #1a1a1a;
	transition: border-color 0.15s;
}
.jb-field input:focus,
.jb-field select:focus,
.jb-field textarea:focus {
	outline: none;
	border-color: var(--jb-navy);
	box-shadow: 0 0 0 3px rgba(0, 52, 120, 0.12);
}
.jb-field textarea { resize: vertical; min-height: 110px; }

.jb-field-row { display: flex; gap: 16px; }
.jb-field-row .jb-field { flex: 1; margin-bottom: 0; }

/* ── Checkboxes ───────────────────────────────────────────── */
.jb-checkboxes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
	gap: 10px;
	margin-top: 6px;
}
.jb-checkboxes label,
.jb-checkbox-field label {
	font-weight: normal;
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	color: #333;
	font-size: 0.92em;
}

.jb-required { color: #c0392b; }

/* ── Buttons ──────────────────────────────────────────────── */
.jb-btn {
	display: inline-block;
	padding: 10px 26px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.95em;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s;
	line-height: 1.4;
}
.jb-btn-primary          { background: var(--jb-orange); color: #fff; }
.jb-btn-primary:hover    { background: #c4631a; color: #fff; }
.jb-btn-primary:disabled { opacity: 0.6; cursor: default; }

.jb-submit { margin-top: 10px; }

/* ── Search form card ─────────────────────────────────────── */
.jb-search-form {
	background: var(--jb-card);
	border: none;
	border-radius: 10px;
	box-shadow: var(--jb-shadow);
	padding: 22px 26px;
	margin-bottom: 24px;
}
.jb-search-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
}
.jb-search-row .jb-field { margin-bottom: 0; flex: 1; min-width: 140px; }
.jb-search-submit { flex: 0 0 auto; }

.jb-search-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
	color: #333;
	font-size: 0.9em;
}
.jb-search-form input,
.jb-search-form select {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid #d0d7e3;
	border-radius: 5px;
	font-size: 0.95em;
	box-sizing: border-box;
	background: #fff;
	color: #1a1a1a;
}

/* ── Results ──────────────────────────────────────────────── */
.jb-loading      { color: var(--jb-muted); font-style: italic; padding: 20px 0; }
.jb-result-count { color: var(--jb-muted); font-size: 0.88em; margin-bottom: 14px; }
.jb-no-results   { color: var(--jb-muted); font-style: italic; padding: 30px 0; text-align: center; }

/* ── Job cards ────────────────────────────────────────────── */
.jb-job-card {
	background: var(--jb-card);
	border-radius: 10px;
	padding: 22px 24px;
	margin-bottom: 16px;
	box-shadow: var(--jb-shadow);
}
.jb-job-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 10px;
}
.jb-job-title {
	margin: 0 0 3px;
	font-size: 1.1em;
	font-weight: 700;
	color: var(--jb-navy);
	line-height: 1.3;
}
.jb-company { color: #555; font-size: 0.9em; }

.jb-job-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	flex-shrink: 0;
	text-align: right;
}
.jb-location, .jb-distance { font-size: 0.83em; color: #666; }

.jb-pay-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 12px;
	font-size: 0.72em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.jb-pay-badge.paid      { background: #d4edda; color: #155724; }
.jb-pay-badge.volunteer { background: #fff3cd; color: #856404; }

/* ── Tags ─────────────────────────────────────────────────── */
.jb-job-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.jb-tag      { background: #eef1f7; color: #334; padding: 3px 10px; border-radius: 12px; font-size: 0.78em; }
.jb-tag-type { background: #ddeeff; color: #003478; }
.jb-tag-pay  { background: #f0f0f0; color: #555; }

/* ── Card body ────────────────────────────────────────────── */
.jb-job-excerpt { color: #555; font-size: 0.9em; line-height: 1.55; margin-bottom: 10px; }

.jb-job-details {
	border-top: 1px solid #eef0f5;
	padding-top: 16px;
	margin-top: 8px;
}
.jb-section { margin-bottom: 16px; }
.jb-section h4 {
	margin: 0 0 6px;
	font-size: 0.82em;
	color: var(--jb-navy);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
}
.jb-section p  { margin: 3px 0; font-size: 0.9em; color: #444; line-height: 1.6; }
.jb-rich-text  { font-size: 0.9em; color: #444; line-height: 1.6; }
.jb-rich-text p { margin: 4px 0; }
.jb-section a  { color: var(--jb-navy); }
.jb-posted-date { color: #aaa; font-size: 0.82em; margin-top: 12px; }

/* ── Toggle button — hard reset so theme styles can't bleed in ── */
.jb-job-card .jb-toggle-btn {
	display: inline-block;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	color: var(--jb-navy) !important;
	cursor: pointer;
	font-size: 0.88em;
	font-weight: 600;
	padding: 6px 0 0 !important;
	margin: 0;
	text-decoration: underline;
	width: auto;
	line-height: 1.4;
}
.jb-job-card .jb-toggle-btn:hover {
	color: var(--jb-orange) !important;
	background: none !important;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
	.jb-post-form-wrap fieldset { padding: 20px 16px; }
	.jb-field-row  { flex-direction: column; }
	.jb-job-header { flex-direction: column; }
	.jb-job-meta   { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; }
	.jb-search-row { flex-direction: column; }
	.jb-search-row .jb-field { min-width: 100%; }
}
