/**
 * Cedra Parts — "Find a part" search panel (Option 2 design)
 *
 * Scoped entirely to the .cedra-findpart* classes and the
 * .cedra-toolbar--end modifier, so no other section is affected.
 *
 * @package CedraParts
 */

.cedra-findpart {
	background: var(--cedra-surface-lavender, #F3EDF9);
	border-radius: 12px;
	padding: 28px 28px 22px;
	margin-bottom: 20px;
}

.cedra-findpart__title {
	display: block;
	margin: 0 0 4px;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.3;
	color: var(--cedra-navy, #0B1C2C);
}

.cedra-findpart__desc {
	margin: 0 0 16px;
	color: var(--cedra-ink-body, #3D4652);
	font-size: 14px;
}

.cedra-findpart__form {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 64px;
	margin: 0;
	padding: 0 8px 0 20px;
	border: 2px solid var(--cedra-navy, #0B1C2C);
	border-radius: 10px;
	background: #FFFFFF;
	box-shadow: 0 6px 18px -12px rgba(11, 28, 44, 0.45);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cedra-findpart__form:focus-within {
	border-color: var(--cedra-accent, #7024AB);
	box-shadow: 0 0 0 1px var(--cedra-accent, #7024AB), 0 6px 18px -12px rgba(11, 28, 44, 0.45);
}

.cedra-findpart__icon {
	flex: 0 0 auto;
}

.cedra-findpart__input {
	flex: 1;
	min-width: 0;
	height: 56px;
	padding: 0;
	margin: 0;
	border: 0;
	outline: none;
	box-shadow: none;
	border-radius: 0;
	background: transparent;
	font: inherit;
	font-size: 18px;
	color: var(--cedra-navy, #0B1C2C);
	-webkit-appearance: none;
	appearance: none;
}

.cedra-findpart__input:focus,
.cedra-findpart__input:focus-visible {
	outline: none;
	box-shadow: none;
	border: 0;
}

.cedra-findpart__input::placeholder {
	color: #8A9099;
	opacity: 1;
}

.cedra-findpart__input::-webkit-search-cancel-button,
.cedra-findpart__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.cedra-findpart__clear {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var(--cedra-surface-neutral, #F5F5F3);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background 0.15s ease;
}

.cedra-findpart__clear:hover {
	background: #EAEAE6;
}

.cedra-findpart__submit {
	flex: 0 0 auto;
	height: 48px;
	padding: 0 24px;
	border: 0;
	border-radius: 8px;
	background: var(--cedra-accent, #7024AB);
	color: #FFFFFF;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}

.cedra-findpart__submit:hover {
	background: var(--cedra-accent-hover, #4E1880);
}

.cedra-findpart__popular {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.cedra-findpart__popular-label {
	margin-right: 2px;
	font-size: 13px;
	color: var(--cedra-ink-body, #3D4652);
}

.cedra-findpart__chip {
	height: 32px;
	padding: 0 12px;
	border: 1px solid #CDBFE0;
	border-radius: 16px;
	background: #FFFFFF;
	color: var(--cedra-navy, #0B1C2C);
	font: inherit;
	font-family: var(--cedra-font-mono, 'Geist Mono', ui-monospace, monospace);
	font-size: 12px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.cedra-findpart__chip:hover {
	border-color: var(--cedra-accent, #7024AB);
	background: #FBF8FE;
}

/* Toolbar under the panel now only holds Filters (mobile) + Sort, right-aligned. */
.cedra-toolbar--end {
	justify-content: flex-end;
}

@media (max-width: 760px) {
	.cedra-findpart {
		padding: 20px 16px 18px;
	}

	.cedra-findpart__title {
		font-size: 20px;
	}

	.cedra-findpart__form {
		height: 56px;
		padding: 0 6px 0 14px;
		gap: 8px;
	}

	.cedra-findpart__input {
		height: 48px;
		font-size: 16px; /* prevents iOS zoom on focus */
	}

	.cedra-findpart__submit {
		height: 42px;
		padding: 0 16px;
	}

	.cedra-toolbar--end {
		justify-content: space-between;
	}
}
