/**
 * Job Search Form widget — seamless horizontal bar.
 */

.cjp-jsf {
	--cjp-jsf-primary: #2563eb;
	--cjp-jsf-primary-hover: #1d4ed8;
	--cjp-jsf-border: #e8edf5;
	--cjp-jsf-divider: #e5e7eb;
	--cjp-jsf-muted: #94a3b8;
	--cjp-jsf-text: #1e293b;
	--cjp-jsf-radius: 18px;
	--cjp-jsf-btn-radius: 999px;
}

.cjp-jsf__form {
	margin: 0;
}

.cjp-jsf__bar {
	display: flex;
	align-items: center;
	gap: 15px;
	background: #ffffff;
	border: 1px solid var(--cjp-jsf-border);
	border-radius: var(--cjp-jsf-radius);
	padding: 8px 8px 8px 6px;
	box-shadow: 0 8px 28px rgba(37, 99, 235, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
	box-sizing: border-box;
}

.cjp-jsf__field {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 0;
	min-width: 0;
	background: transparent;
	border: 0;
	border-radius: 12px;
	padding: 0 18px;
	min-height: 54px;
	box-sizing: border-box;
	transition: background 0.2s ease;
}

.cjp-jsf__field + .cjp-jsf__field {
	border-left: 1px solid var(--cjp-jsf-divider);
}

.cjp-jsf__field:focus-within {
	background: #f8fafc;
}

.cjp-jsf__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-right: 12px;
	color: var(--cjp-jsf-primary);
	opacity: 0.85;
	line-height: 0;
}

.cjp-jsf__icon svg {
	width: 18px;
	height: 18px;
}

.cjp-jsf__control {
	flex: 1;
	min-width: 0;
	width: 100%;
	border: 0;
	background: transparent;
	color: var(--cjp-jsf-text);
	font-size: 0.9375rem;
	line-height: 1.4;
	outline: none;
	padding: 12px 0;
}

.cjp-jsf__control::placeholder {
	color: var(--cjp-jsf-muted);
	opacity: 1;
}

.cjp-jsf__field--select {
	padding-right: 12px;
}

.cjp-jsf__select-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.cjp-jsf__select-native {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cjp-jsf__select-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	border: 0;
	background: transparent;
	color: var(--cjp-jsf-text);
	font-size: 0.9375rem;
	line-height: 1.4;
	padding: 12px 0;
	cursor: pointer;
	text-align: left;
}

.cjp-jsf__select-btn.is-placeholder .cjp-jsf__select-text {
	color: var(--cjp-jsf-muted);
}

.cjp-jsf__select-text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cjp-jsf__chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--cjp-jsf-muted);
	line-height: 0;
	transition: transform 0.2s ease;
}

.cjp-jsf__chevron svg {
	width: 14px;
	height: 14px;
}

.cjp-jsf__field.is-open .cjp-jsf__chevron {
	transform: rotate(180deg);
}

.cjp-jsf__menu {
	position: absolute;
	top: calc(100% + 8px);
	left: -18px;
	right: -12px;
	z-index: 40;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #ffffff;
	border: 1px solid var(--cjp-jsf-border);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
	max-height: 260px;
	overflow-y: auto;
}

.cjp-jsf__menu[hidden] {
	display: none;
}

.cjp-jsf__option {
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 0.875rem;
	color: var(--cjp-jsf-text);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.cjp-jsf__option:hover,
.cjp-jsf__option.is-active {
	background: var(--cjp-jsf-primary);
	color: #ffffff;
}

.cjp-jsf__submit {
	flex: 0 0 auto;
	border: 0;
	border-radius: var(--cjp-jsf-btn-radius);
	background: var(--cjp-jsf-primary);
	color: #ffffff;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1;
	padding: 0 32px;
	min-height: 54px;
	margin-left: 8px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.cjp-jsf__submit:hover {
	background: var(--cjp-jsf-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

@media (max-width: 992px) {
	.cjp-jsf__bar {
		flex-wrap: wrap;
		padding: 10px;
		gap: 0;
	}

	.cjp-jsf__field {
		flex: 1 1 100%;
		width: 100%;
		border-left: 0 !important;
		border-top: 1px solid var(--cjp-jsf-divider);
		padding: 0 14px;
	}

	.cjp-jsf__field:first-child {
		border-top: 0;
	}

	.cjp-jsf__submit {
		flex: 1 1 100%;
		width: 100%;
		margin-left: 0;
		margin-top: 8px;
		border-radius: 12px;
	}

	.cjp-jsf__menu {
		left: 0;
		right: 0;
	}
}

@media (max-width: 640px) {
	.cjp-jsf__bar {
		border-radius: 14px;
	}

	.cjp-jsf__field,
	.cjp-jsf__submit {
		min-height: 50px;
	}
}
