/**
 * Recherche archive produit — composant générique.
 *
 * @package Annexe_Customizations
 */

.aco-archive-search .screen-reader-text,
.aco-archive-search-bar .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.aco-archive-search-bar,
.aco-pizza-filters__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	width: 100%;
}

.aco-archive-search-bar--standalone {
	margin: 0 0 1.5rem;
}

.aco-archive-search {
	--aco-search-border: #c4b8a8;
	--aco-search-focus: #c45c26;
	--aco-search-text: #2b2118;

	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 14rem;
	min-width: min(100%, 14rem);
	max-width: 22rem;
	margin-left: auto;
}

.aco-archive-search-bar--standalone .aco-archive-search {
	flex: 1 1 100%;
	max-width: 28rem;
	margin-left: 0;
}

.aco-archive-search__icon {
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6b6156;
	pointer-events: none;
}

/*
 * Component-scoped selector must beat Astra
 * `input[type="search"] { padding: 0.75em }` (0,1,1).
 * Specificity here: 0,3,1 — keeps left padding for the absolute icon.
 */
.aco-archive-search input.aco-archive-search__input[type="search"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	/* 16px : évite le zoom iOS. */
	font-size: 16px;
	line-height: 1.3;
	font-weight: 500;
	color: var(--aco-search-text);
	background: #fff;
	border: 1px solid var(--aco-search-border);
	border-radius: 999px;
	padding: 0.55rem 1rem 0.55rem 2.5rem;
	appearance: none;
	-webkit-appearance: none;
}

.aco-archive-search__input::placeholder {
	color: #8a8176;
	opacity: 1;
}

.aco-archive-search__input:hover {
	border-color: var(--aco-search-focus);
}

.aco-archive-search__input:focus {
	outline: none;
	border-color: var(--aco-search-focus);
	box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.25);
}

.aco-archive-search__input::-webkit-search-decoration,
.aco-archive-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.aco-archive-search__empty {
	flex: 1 1 100%;
	margin: 0.5rem 0 0;
	padding: 0.5rem 0 0;
	font-size: 0.95rem;
	color: #5c534a;
}

.aco-archive-card.is-aco-filtered-out,
.product.is-aco-filtered-out {
	display: none !important;
}

@media (max-width: 767px) {
	.aco-pizza-filters__bar .aco-archive-search,
	.aco-archive-search-bar:not(.aco-archive-search-bar--standalone) .aco-archive-search {
		flex: 1 1 100%;
		max-width: none;
		margin-left: 0;
		order: 2;
	}

	.aco-pizza-filters__bar .aco-pizza-filters__track {
		flex: 1 1 100%;
		order: 1;
	}
}

@media (min-width: 768px) {
	.aco-pizza-filters__bar .aco-archive-search,
	.aco-archive-search-bar .aco-archive-search {
		flex: 0 1 18rem;
	}
}
