/* JSD Better Search */

.jsd-search-form {
	position: relative;
	width: 100%;
	max-width: 600px;
	margin: 0 auto;
}

.jsd-search-wrap {
	position: relative;
}

.jsd-search-input {
	width: 100%;
	padding: 14px 52px 14px 18px;
	font-size: 16px;
	border: 2px solid #e0e0e0;
	border-radius: 12px;
	outline: none;
	background: #fff;
	color: #333;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.jsd-search-input:focus {
	border-color: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.jsd-search-input::placeholder {
	color: #999;
}

.jsd-search-btn {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	background: #22c55e;
	color: #fff;
	border: none;
	border-radius: 8px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s;
}

.jsd-search-btn:hover {
	background: #16a34a;
}

/* Live search dropdown */
.jsd-search-results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
	z-index: 99999;
	max-height: 480px;
	overflow-y: auto;
}

.jsd-search-results:empty {
	display: none !important;
}

.jsd-result-item {
	display: block;
	padding: 14px 18px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: #333;
	transition: background 0.15s;
}

.jsd-result-item:last-child {
	border-bottom: none;
}

.jsd-result-item:hover,
.jsd-result-item.jsd-active {
	background: #f0fdf4;
	text-decoration: none;
}

.jsd-result-title {
	font-size: 15px;
	font-weight: 700;
	color: #1a1a2e;
	margin-bottom: 4px;
	line-height: 1.3;
}

.jsd-result-excerpt {
	font-size: 13px;
	color: #666;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.jsd-result-type {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 2px 8px;
	border-radius: 4px;
	margin-bottom: 4px;
}

.jsd-result-type-page {
	background: #e0f2fe;
	color: #0369a1;
}

.jsd-result-type-post {
	background: #fef3c7;
	color: #92400e;
}

.jsd-result-item mark {
	background: #bbf7d0;
	color: inherit;
	padding: 0 2px;
	border-radius: 2px;
}

.jsd-no-results {
	padding: 24px 18px;
	text-align: center;
	color: #999;
	font-size: 14px;
}

.jsd-search-loading {
	padding: 20px;
	text-align: center;
	color: #999;
	font-size: 14px;
}

.jsd-search-footer {
	padding: 12px 18px;
	text-align: center;
	border-top: 1px solid #f0f0f0;
	font-size: 13px;
}

.jsd-search-footer a {
	color: #22c55e;
	font-weight: 600;
	text-decoration: none;
}

.jsd-search-footer a:hover {
	text-decoration: underline;
}

/* Keyboard navigation indicator */
.jsd-result-item:focus {
	outline: 2px solid #22c55e;
	outline-offset: -2px;
}

/* Search results page highlight */
.search-results .entry-content mark,
.search-results .entry-summary mark,
.search-results .entry-title mark {
	background: #bbf7d0;
	color: inherit;
	padding: 0 2px;
	border-radius: 2px;
}
