/**
 * Plant Search Bar Styles
 */

div.plant-search-bar {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 24px;
	width: 100%;
	max-width: 300px;
	min-width: 0;
	overflow-wrap: anywhere;
	box-sizing: border-box;
}

.plant-search-bar-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.plant-search-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.plant-search-field label {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.plant-search-text input[type="search"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
	box-sizing: border-box;
}

.plant-search-text input[type="search"]:focus {
	border-color: #4caf50;
	outline: none;
	box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.plant-search-select select[multiple] {
	width: 100%;
	padding: 2px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
	box-sizing: border-box;
	background: #fff;
	min-height: 80px;
}

.plant-search-select select[multiple]:focus {
	border-color: #4caf50;
	outline: none;
	box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.plant-search-select select[multiple] option {
	padding: 3px 6px;
}

.plant-search-select select[multiple] option:checked {
	background: #4caf50 linear-gradient(0deg, #4caf50 0%, #4caf50 100%);
	color: #fff;
}

.plant-search-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 4px;
	flex-wrap: wrap;
}

.plant-search-actions .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
}

.plant-search-submit {
	background-color: #4caf50;
	color: #fff;
}

.plant-search-submit:hover {
	background-color: #45a049;
	transform: translateY(-1px);
}

.plant-search-clear {
	background-color: #f0f0f0;
	color: #666;
}

.plant-search-clear:hover {
	background-color: #e0e0e0;
	color: #333;
}

.plant-search-bar-empty,
.plant-search-bar-no-page {
	padding: 12px 16px;
	background: #fff3cd;
	border: 1px solid #ffeeba;
	border-radius: 4px;
	color: #856404;
	font-size: 14px;
}

@media (min-width: 768px) {

	div.plant-search-bar {
		max-width: 300px;
	}
}

.plant-search-bar,
.plant-search-bar * {
	box-sizing: border-box;
}


.plant-search-disclosure {
	display: block;
}

.plant-search-disclosure summary {
	cursor: pointer;
	padding: 0.4rem 0.5rem;
	font-weight: 600;
}

.plant-search-disclosure fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	max-height: min(14rem, 40vh);
	overflow-y: auto;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
}

.plant-search-disclosure fieldset label {
	display: flex;
	align-items: flex-start;
	gap: 0.375rem;
	margin: 0;
	padding: 0.25rem 0.5rem;
	line-height: 1.35;
	text-transform: none;
	letter-spacing: normal;
	font-weight: 400;
	background: #fff;
}

.plant-search-disclosure input[type="checkbox"] {
	flex: 0 0 auto;
	width: auto;
	height: auto;
	margin: 0.15rem 0 0;
}

.plant-search-bar :focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 3px;
}


[data-search-status]:empty {
	display: none;
}

/* Alternating option rows keep long selectors easy to scan. */
.plant-search-disclosure fieldset label:nth-of-type(even),
.plant-search-select select[multiple] option:nth-child(even):not(:checked) {
	background: #f0f4f0;
}

.plant-search-select select[multiple] option:nth-child(odd):not(:checked) {
	background: #fff;
}

.plant-search-disclosure fieldset label:hover,
.plant-search-disclosure fieldset label:focus-within {
	background: #e1eae1;
}
