/* Sunshine Search */

.sunshine-search {
	position: relative;
	width: 100%;
	max-width: 640px;
	font-family: inherit;
}

.sunshine-search__form {
	display: flex;
	gap: 8px;
	align-items: center;
	width: 100%;
}

.sunshine-search__input {
	flex: 1 1 auto;
	width: 100%;
	padding: 12px 16px;
	font-size: 1rem;
	line-height: 1.4;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sunshine-search__input:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.sunshine-search__submit {
	padding: 12px 20px;
	font-size: 1rem;
	border: 0;
	border-radius: 8px;
	background: #111827;
	color: #fff;
	cursor: pointer;
}

.sunshine-search__submit:hover {
	background: #1f2937;
}

/* Autocomplete dropdown */
.sunshine-search__dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	max-height: 70vh;
	overflow-y: auto;
}

.sunshine-search__dropdown[hidden] {
	display: none;
}

.sunshine-search__item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 16px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f3f4f6;
	transition: background-color 0.12s ease;
}

.sunshine-search__item:last-child {
	border-bottom: 0;
}

.sunshine-search__item:hover,
.sunshine-search__item:focus {
	background: #f9fafb;
}

.sunshine-search__thumb {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 6px;
	background: #f3f4f6;
}

.sunshine-search__thumb--lg {
	width: 72px;
	height: 72px;
}

.sunshine-search__item-text {
	flex: 1 1 auto;
	min-width: 0;
}

.sunshine-search__item-title {
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sunshine-search__item-snippet {
	font-size: 0.85rem;
	color: #6b7280;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sunshine-search__empty {
	padding: 16px;
	text-align: center;
	color: #6b7280;
	font-size: 0.9rem;
}

.sunshine-search mark {
	background: #fef08a;
	color: inherit;
	padding: 0 2px;
	border-radius: 2px;
}

/* Results page */
.sunshine-search--page .sunshine-search__summary {
	margin: 16px 0 12px;
	color: #4b5563;
	font-size: 0.95rem;
}

.sunshine-search__results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sunshine-search__result a {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sunshine-search__result a:hover {
	border-color: #6366f1;
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.sunshine-search__result-title {
	margin: 0 0 6px;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
}

.sunshine-search__result-snippet {
	margin: 0;
	color: #4b5563;
	font-size: 0.95rem;
	line-height: 1.5;
}

.sunshine-search__pagination {
	margin-top: 24px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.sunshine-search__pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	font-size: 0.9rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	background: #fff;
}

.sunshine-search__pagination a.is-current {
	background: #111827;
	color: #fff;
	border-color: #111827;
}
