/**
 * Header inline search (keyword + type + submit).
 */

.careerfy-header-search {
	margin-left: auto;
	flex: 0 1 420px;
	max-width: 480px;
	min-width: 300px;
}

.jobsearch-header-search-form {
	width: 100%;
}

.jobsearch-header-search-form .search-group,
.jobsearch-header-search-form .jobsearch-prof-sugg-wrap {
	display: flex;
	align-items: stretch;
	width: 100%;
	min-height: 42px;
	border: 0;
	border-radius: 0;
	background: transparent;
	overflow: hidden;
	box-shadow: none;
}

.jobsearch-header-search-form .search-group:focus-within,
.jobsearch-header-search-form .jobsearch-prof-sugg-wrap:focus-within {
	box-shadow: 0 0 0 3px rgba(10, 101, 252, 0.12);
	border-radius: 10px;
}

.jobsearch-header-search-form input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	height: 100%;
	min-height: 42px;
	line-height: 1.2;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-right: 0;
	border-radius: 10px 0 0 10px;
	background: #fff;
	outline: none;
	font-size: 14px;
	color: #334155;
	box-sizing: border-box;
}

.jobsearch-header-search-form .search-group:focus-within input[type="text"],
.jobsearch-header-search-form .jobsearch-prof-sugg-wrap:focus-within input[type="text"] {
	border-color: #93c5fd;
}

.jobsearch-header-search-form input[type="text"]::placeholder {
	color: #94a3b8;
}

/* Native select kept for form logic; UI rendered by JS */
.jobsearch-header-search-form .hdr-search-type-native {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.jobsearch-header-search-form .hdr-search-type {
	position: relative;
	flex: 0 0 auto;
	align-self: stretch;
	border: 0;
}

.jobsearch-header-search-form .hdr-search-type-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	min-width: 104px;
	max-width: 124px;
	height: 100%;
	min-height: 42px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid #e2e8f0;
	border-left: 0;
	border-right: 0;
	border-radius: 0;
	background: #f8fafc;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	color: #334155;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.jobsearch-header-search-form .search-group:focus-within .hdr-search-type-trigger,
.jobsearch-header-search-form .jobsearch-prof-sugg-wrap:focus-within .hdr-search-type-trigger {
	border-color: #93c5fd;
}

.jobsearch-header-search-form .hdr-search-type-trigger:hover,
.jobsearch-header-search-form .hdr-search-type.is-open .hdr-search-type-trigger {
	background: #f1f5f9;
}

.jobsearch-header-search-form .hdr-search-type-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jobsearch-header-search-form .hdr-search-type-chevron {
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	transition: transform 0.15s ease;
}

.jobsearch-header-search-form .hdr-search-type.is-open .hdr-search-type-chevron {
	transform: rotate(180deg);
}

.jobsearch-header-search-form .hdr-search-type-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 10050;
	min-width: 100%;
	width: max-content;
	margin: 0;
	padding: 4px;
	list-style: none !important;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
	box-sizing: border-box;
}

.jobsearch-header-search-form .hdr-search-type-menu[hidden] {
	display: none !important;
}

.jobsearch-header-search-form .hdr-search-type-menu > li {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.jobsearch-header-search-form .hdr-search-type-option {
	display: block;
	width: 100%;
	min-width: 132px;
	padding: 8px 12px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	text-align: left;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	color: #334155;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.jobsearch-header-search-form .hdr-search-type-option:hover,
.jobsearch-header-search-form .hdr-search-type-option:focus {
	background: #f1f5f9;
	color: #1a202c;
	outline: none;
}

.jobsearch-header-search-form .hdr-search-type-option[aria-selected="true"] {
	background: #eff6ff;
	color: var(--cfy-primary, #0a65fc);
}

.jobsearch-header-search-form .search-group.is-type-open,
.jobsearch-header-search-form .jobsearch-prof-sugg-wrap.is-type-open {
	overflow: visible;
	z-index: 30;
}

/* Legacy native select (before JS enhancement) */
.jobsearch-header-search-form .post-type-select:not(.hdr-search-type-native) {
	flex: 0 0 auto;
	width: auto;
	min-width: 104px;
	max-width: 124px;
	height: 40px;
	line-height: 40px;
	margin: 0;
	padding: 0 26px 0 10px;
	border: 0;
	border-left: 1px solid #e2e8f0;
	border-radius: 0;
	background-color: #f8fafc;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 8px center;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	font-size: 13px;
	font-weight: 500;
	color: #334155;
	cursor: pointer;
}

.jobsearch-header-search-form .post-type-select:focus {
	background-color: #f1f5f9;
}

.jobsearch-header-search-form button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	gap: 6px;
	flex: 0 0 44px;
	width: 44px;
	min-width: 44px;
	height: 100%;
	min-height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--cfy-primary, #0a65fc);
	border-left: 0;
	border-radius: 0 10px 10px 0 !important;
	background: var(--cfy-primary, #0a65fc);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.jobsearch-header-search-form .search-group:focus-within button[type="submit"],
.jobsearch-header-search-form .jobsearch-prof-sugg-wrap:focus-within button[type="submit"] {
	border-color: #0854d4;
}

.jobsearch-header-search-form button[type="submit"]:hover,
.jobsearch-header-search-form button[type="submit"]:focus,
.jobsearch-header-search-form .search-group.is-type-open > button[type="submit"],
.jobsearch-header-search-form .jobsearch-prof-sugg-wrap.is-type-open > button[type="submit"] {
	border-radius: 0 10px 10px 0 !important;
}
.jobsearch-header-search-form button[type="submit"]:hover,
.jobsearch-header-search-form button[type="submit"]:focus {
	background: #0854d4;
}

.jobsearch-header-search-form button[type="submit"] i {
	font-size: 15px;
	line-height: 1;
}

.jobsearch-header-search-form .hdr-search-submit-label {
	display: none;
	white-space: nowrap;
}

@media (min-width: 1281px) {
	.careerfy-header-search {
		flex-basis: 460px;
		max-width: 520px;
	}

	.jobsearch-header-search-form button[type="submit"] {
		flex: 0 0 auto;
		width: auto;
		min-width: 44px;
		padding: 0 14px;
	}

	.jobsearch-header-search-form .hdr-search-submit-label {
		display: inline;
	}
}

@media (max-width: 1200px) {
	.careerfy-header-search {
		flex-basis: 360px;
		max-width: 420px;
		min-width: 280px;
	}
}

@media (max-width: 1199px) {
	.careerfy-header-search {
		flex-basis: 320px;
		max-width: 380px;
		min-width: 260px;
	}
}

@media (max-width: 992px) {
	.careerfy-header-search {
		order: 3;
		width: 100%;
		margin-left: 0;
		flex: 1 1 100%;
		max-width: 100%;
	}

	.jobsearch-header-search-form .hdr-search-type-trigger {
		min-width: 96px;
		max-width: 112px;
	}
}

@media (max-width: 768px) {
	.careerfy-header-search {
		margin-top: 6px;
	}

	.jobsearch-header-search-form .search-group,
	.jobsearch-header-search-form .jobsearch-prof-sugg-wrap {
		min-height: 44px;
	}

	.jobsearch-header-search-form input[type="text"],
	.jobsearch-header-search-form .hdr-search-type-trigger,
	.jobsearch-header-search-form .post-type-select:not(.hdr-search-type-native),
	.jobsearch-header-search-form button[type="submit"] {
		min-height: 44px;
	}

	.jobsearch-header-search-form button[type="submit"] {
		flex-basis: 48px;
		width: 48px;
		min-width: 48px;
	}
}
