/* Search Overlay - panel content styles only (drawer chrome is in ds-drawer.css) */

/* Search box (header inside panel) */
.search_box {
	position: absolute;
	top: 0;
	left: 0;
	right: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	border-bottom: 1px solid black;
	background: #fff;
}

/* Input styles */
.search_box input[type="search"] {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	outline: none;
	background: transparent;
	width: 100%;
	max-width: 100%;
	height: 42px;
	line-height: 42px;
	padding: 0 8px;
	font-size: 12px;
}

/* Results area scrolls within the panel */
.search_results {
	position: absolute;
	top: 42px;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 5%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.search_results::-webkit-scrollbar { width: 0; background: transparent; }

/* Admin bar offset on mobile */

/* Product grid inside search overlay: force mobile layout at all sizes */
.search_overlay .woocommerce ul.products { font-size: 0; }
.search_overlay .woocommerce ul.products > li.product {
	display: inline-block;
	vertical-align: top;
	width: 48%;
	margin: 7px 4% 8px 0;
}
.search_overlay .woocommerce ul.products > li.product:nth-child(even) { margin: 7px 0 8px 0; }
.search_overlay .woocommerce ul.products li.product img { margin: 0 !important; }

/* Tag suggestions above search results */
.search_results .ds-search-tag-suggestions { margin: 0 0 10px 0; }
.search_results .ds-tag-suggestion { display: inline-block; margin: 5px 15px; font-size: 10px; text-transform: uppercase; }
.search_results .ds-tag-suggestion:hover { font-weight: bold; }

/* Pulse spinner on search input when searching */
.search_box.is-searching::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 25px;
	height: 25px;
	background-image: url('Pulse@1x-1.0s-25px-25px.svg');
	background-repeat: no-repeat;
	background-size: 25px 25px;
	background-position: center;
	pointer-events: none;
}
.search_box.is-searching input[type="search"] { padding-right: 36px; }


/* Ensure search box spans full width of the panel */
.search_box { right: 0; }



/* WP Admin Bar: position search header below admin bar and push results accordingly */
body.admin-bar .search_overlay .search_box {
  top: var(--wp-admin--admin-bar--height, 32px) !important;
}
body.admin-bar .search_overlay .search_results {
  top: calc(42px + var(--wp-admin--admin-bar--height, 32px)) !important;
}

/* Search Overlay - panel content styles only (drawer chrome is in ds-drawer.css) */

/* Search box (header inside panel) */
.search_box {
	position: absolute;
	top: 0;
	left: 0;
	right: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	border-bottom: 1px solid black;
	background: #fff;
}

/* Input styles */
.search_box input[type="search"] {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	outline: none;
	background: transparent;
	width: 100%;
	max-width: 100%;
	height: 42px;
	line-height: 42px;
	padding: 0 8px;
	font-size: 12px;
}

/* Results area scrolls within the panel */
.search_results {
	position: absolute;
	top: 42px;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 5%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.search_results::-webkit-scrollbar { width: 0; background: transparent; }

/* Admin bar offset on mobile */

/* Product grid inside search overlay: force mobile layout at all sizes */
.search_overlay .woocommerce ul.products { font-size: 0; }
.search_overlay .woocommerce ul.products > li.product {
	display: inline-block;
	vertical-align: top;
	width: 48%;
	margin: 7px 4% 8px 0;
}
.search_overlay .woocommerce ul.products > li.product:nth-child(even) { margin: 7px 0 8px 0; }
.search_overlay .woocommerce ul.products li.product img { margin: 0 !important; }

/* Tag suggestions above search results */
.search_results .ds-search-tag-suggestions { margin: 0 0 10px 0; }
.search_results .ds-tag-suggestion { display: inline-block; margin: 5px 15px; font-size: 10px; text-transform: uppercase; }
.search_results .ds-tag-suggestion:hover { font-weight: bold; }

/* Pulse spinner on search input when searching */
.search_box.is-searching::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 25px;
	height: 25px;
	background-image: url('Pulse@1x-1.0s-25px-25px.svg');
	background-repeat: no-repeat;
	background-size: 25px 25px;
	background-position: center;
	pointer-events: none;
}
.search_box.is-searching input[type="search"] { padding-right: 36px; }


/* Ensure search box spans full width of the panel */
.search_box { right: 0; }



/* WP Admin Bar: position search header below admin bar and push results accordingly */
body.admin-bar .search_overlay .search_box {
  top: var(--wp-admin--admin-bar--height, 32px) !important;
}
body.admin-bar .search_overlay .search_results {
  top: calc(42px + var(--wp-admin--admin-bar--height, 32px)) !important;
}

/* Prevent cart page container styles from affecting the search drawer */
.woocommerce-cart #ds-search-drawer .woocommerce {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}