/**
 * Search form styled like cmc/creche-search block.
 *
 * Applied via the "is-style-creche-search" class on the wp:search block.
 */

.wp-block-search.is-style-creche-search {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.wp-block-search.is-style-creche-search .wp-block-search__inside-wrapper {
	display: flex;
	align-items: center;
	gap: 1rem;
	border: 2px solid var(--wp--preset--color--gray, #e0e0e0);
	border-radius: 16px;
	background: var(--wp--preset--color--white);
	padding: 1rem 1.5rem;
}

.wp-block-search.is-style-creche-search .wp-block-search__input {
	flex: 1;
	padding: 1rem 1.5rem;
	border: 1px solid var(--wp--preset--color--gray, #e0e0e0);
	border-radius: 999px;
	font-size: 1rem;
	font-family: var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--white);
}

.wp-block-search.is-style-creche-search .wp-block-search__input:focus {
	outline: none;
	border-color: var(--wp--preset--color--secondary);
}

.wp-block-search.is-style-creche-search .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 2.5rem;
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--white);
	border: none;
	border-radius: 999px;
	font-size: 1rem;
	font-weight: 600;
	font-family: var(--wp--preset--font-family--body);
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease;
}

.wp-block-search.is-style-creche-search .wp-block-search__button:hover {
	background: var(--wp--preset--color--primary);
}

@media (max-width: 782px) {
	.wp-block-search.is-style-creche-search .wp-block-search__inside-wrapper {
		flex-direction: column;
	}

	.wp-block-search.is-style-creche-search .wp-block-search__button {
		width: 100%;
	}
}
