/* UPMB Jobs & Tenders — frontend styles (namespaced .upmb-jt-) */

.upmb-jt {
	--upmb-brand: #1c4591;
	--upmb-brand-dark: #163574;
	--upmb-border: #e2e8f0;
	color: #1f2937;
	box-sizing: border-box;
}

.upmb-jt *,
.upmb-jt *::before,
.upmb-jt *::after {
	box-sizing: border-box;
}

/* Template wrapper (single + archive via theme shell) */
.upmb-jt-template-wrap {
	padding: 40px 16px;
}

.upmb-jt-container {
	max-width: 1080px;
	margin: 0 auto;
}

.upmb-jt-archive-title {
	color: #1c4591;
	margin-bottom: 24px;
}

/* Toolbar */
.upmb-jt-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 22px;
}

.upmb-jt-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.upmb-jt-pill {
	border: 1.5px solid var(--upmb-brand);
	background: #fff;
	color: var(--upmb-brand);
	border-radius: 999px;
	padding: 7px 16px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.upmb-jt-pill:hover,
.upmb-jt-pill.is-active {
	background: var(--upmb-brand);
	color: #fff;
}

.upmb-jt-search-input {
	border: 1.5px solid #d0d8e8;
	border-radius: 6px;
	padding: 9px 14px;
	font-size: 14px;
	min-width: 240px;
}

.upmb-jt-search-input:focus {
	border-color: var(--upmb-brand);
	outline: none;
}

/* Grid */
.upmb-jt-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.upmb-jt-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	border: 1px solid var(--upmb-border);
	border-radius: 8px;
	background: #fff;
	padding: 20px 22px;
	transition: box-shadow 0.2s, transform 0.2s;
}

.upmb-jt-card:hover {
	box-shadow: 0 4px 18px rgba(28, 69, 145, 0.10);
	transform: translateY(-2px);
}

.upmb-jt-card-title {
	margin: 0 0 6px;
	font-size: 19px;
	line-height: 1.3;
}

.upmb-jt-card-title a {
	color: var(--upmb-brand);
	text-decoration: none;
}

.upmb-jt-card-title a:hover {
	text-decoration: underline;
}

.upmb-jt-ref {
	margin: 0 0 10px;
	font-size: 13px;
	color: #64748b;
	letter-spacing: 0.02em;
}

.upmb-jt-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.upmb-jt-tag {
	display: inline-block;
	background: #eef2fb;
	color: var(--upmb-brand);
	border-radius: 5px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 600;
}

.upmb-jt-tag-type {
	background: var(--upmb-brand);
	color: #fff;
}

.upmb-jt-loc,
.upmb-jt-closing {
	margin: 4px 0;
	font-size: 14px;
	color: #475569;
}

.upmb-jt-card-foot {
	margin-top: 16px;
}

.upmb-jt-btn {
	display: inline-block;
	background: var(--upmb-brand);
	color: #fff !important;
	text-decoration: none;
	padding: 10px 20px;
	border-radius: 5px;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.15s;
	border: none;
	cursor: pointer;
}

.upmb-jt-btn:hover {
	background: var(--upmb-brand-dark);
}

.upmb-jt-btn-outline {
	background: #fff;
	color: var(--upmb-brand) !important;
	border: 1.5px solid var(--upmb-brand);
}

.upmb-jt-btn-outline:hover {
	background: #eef2fb;
}

.upmb-jt-badge-closed {
	display: inline-block;
	background: #f1f5f9;
	color: #64748b;
	padding: 8px 16px;
	border-radius: 5px;
	font-weight: 600;
	font-size: 14px;
}

.upmb-jt-empty,
.upmb-jt-noresults {
	padding: 30px;
	text-align: center;
	color: #94a3b8;
	font-style: italic;
	background: #f8fafc;
	border-radius: 8px;
}

/* Single view */
.upmb-jt-single-title {
	color: var(--upmb-brand);
	margin-bottom: 12px;
}

.upmb-jt-metabar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	padding: 14px 18px;
	background: #f4f7fc;
	border: 1px solid var(--upmb-border);
	border-radius: 8px;
	margin-bottom: 22px;
	font-size: 14px;
}

.upmb-jt-metabar span strong {
	color: var(--upmb-brand);
}

.upmb-jt-content {
	line-height: 1.7;
	margin-bottom: 18px;
}

.upmb-jt-divider {
	border: none;
	border-top: 1px solid var(--upmb-border);
	margin: 28px 0;
}

.upmb-jt-docdownload {
	margin: 16px 0;
}

.upmb-jt-notice {
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #9a3412;
	border-radius: 8px;
	padding: 16px 20px;
	font-weight: 600;
}

/* Form */
.upmb-jt-form-title {
	color: var(--upmb-brand);
	margin-bottom: 16px;
}

.upmb-jt-form {
	max-width: 640px;
}

.upmb-jt-field {
	margin-bottom: 18px;
}

.upmb-jt-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #334155;
}

.upmb-jt-req {
	color: #dc2626;
}

.upmb-jt-field input[type="text"],
.upmb-jt-field input[type="email"],
.upmb-jt-field input[type="tel"],
.upmb-jt-field textarea {
	width: 100%;
	border: 1.5px solid #d0d8e8;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 15px;
	font-family: inherit;
}

.upmb-jt-field input:focus,
.upmb-jt-field textarea:focus {
	border-color: var(--upmb-brand);
	outline: none;
	box-shadow: 0 0 0 3px rgba(28, 69, 145, 0.08);
}

.upmb-jt-field.upmb-field-invalid input,
.upmb-jt-field.upmb-field-invalid textarea {
	border-color: #dc2626;
}

/* Dropzone */
.upmb-jt-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 2px dashed var(--upmb-brand);
	background: #f0f4ff;
	border-radius: 8px;
	padding: 26px 20px;
	cursor: pointer;
	text-align: center;
	transition: background 0.15s;
}

.upmb-jt-dropzone:hover,
.upmb-jt-dropzone.is-dragover {
	background: #e4ecff;
}

.upmb-jt-dz-icon {
	font-size: 28px;
	color: var(--upmb-brand);
	line-height: 1;
}

.upmb-jt-dz-text {
	font-weight: 600;
	color: var(--upmb-brand);
}

.upmb-jt-dz-hint {
	font-size: 12px;
	color: #64748b;
}

.upmb-jt-dz-filename {
	font-size: 13px;
	color: #16a34a;
	font-weight: 600;
}

.upmb-jt-dropzone input[type="file"] {
	display: none;
}

/* Consent */
.upmb-jt-consent label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.5;
}

.upmb-jt-consent input {
	margin-top: 3px;
}

/* Honeypot */
.upmb-jt-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	height: 0;
	overflow: hidden;
}

/* Errors */
.upmb-jt-error {
	display: block;
	color: #dc2626;
	font-size: 13px;
	margin-top: 4px;
	min-height: 1px;
}

.upmb-jt-form-error {
	color: #dc2626;
	font-weight: 600;
	margin-top: 10px;
}

/* Submit + spinner */
.upmb-jt-submit {
	position: relative;
	background: var(--upmb-brand);
	color: #fff;
	border: none;
	border-radius: 5px;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
	min-width: 180px;
}

.upmb-jt-submit:hover {
	background: var(--upmb-brand-dark);
}

.upmb-jt-submit:disabled {
	opacity: 0.85;
	cursor: default;
}

.upmb-jt-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: upmb-spin 0.7s linear infinite;
	margin: 0 auto;
}

.upmb-jt-submit.is-loading .upmb-jt-submit-text {
	visibility: hidden;
}

.upmb-jt-submit.is-loading .upmb-jt-spinner {
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

@keyframes upmb-spin {
	to { transform: rotate(360deg); }
}

/* Success */
.upmb-jt-success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
	border-radius: 8px;
	padding: 22px 24px;
	font-size: 16px;
	line-height: 1.6;
}

/* Responsive */
@media screen and (max-width: 600px) {
	.upmb-jt-grid {
		grid-template-columns: 1fr;
	}
	.upmb-jt-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
	.upmb-jt-search-input {
		width: 100%;
	}
}
