/**
 * InstantSearch for WP — front-end UI overrides (ConsensusDocs).
 *
 * Client-requested tweaks to the built-in InstantSearch overlay. Every rule is
 * scoped to #isfwp-site-search so nothing leaks outside the search experience.
 * Selectors are the plugin's scaffold classes + standard InstantSearch.js widget
 * classes (.ais-*). The #id scope also gives us the specificity to win the cascade
 * over the plugin's stylesheet without !important.
 *
 * Enqueued by search-ui.php.
 */

/* --- Brand: swap the "ConsensusDocs" site-name text for the logo, aligned to the
   same left gutter as the search input and filters column so it lines up with the
   Search and Filter headings. The scaffold prints the site name as text (no
   custom_logo is set), so we hide that text and paint the logo via ::before.
   Logo is 444x106; 160x38 keeps its aspect ratio. --- */
#isfwp-site-search .site-search-brand {
	font-size: 0; /* Hide the site-name text node (kept in the DOM for screen readers). */
	line-height: 0;
}
#isfwp-site-search .site-search-brand img {
	display: none; /* Guard: if a custom_logo is ever set, don't render two logos. */
}
#isfwp-site-search .site-search-brand::before {
	content: "";
	display: inline-block;
	width: 160px;
	height: 38px;
	background: url("../images/condocs-logo@2x.png") no-repeat left center;
	background-size: contain;
}

/* --- Remove the divider lines directly above and below the search input. --- */
#isfwp-site-search .isfwp-site-search-topbar,
#isfwp-site-search .isfwp-site-search-header {
	border-bottom: 0;
}

/* --- Remove the "Show More" toggle on filters (it reveals nothing on this site). --- */
#isfwp-site-search .ais-RefinementList-showMore,
#isfwp-site-search .ais-Menu-showMore,
#isfwp-site-search .ais-HierarchicalMenu-showMore {
	display: none;
}

/* --- "Clear All Filters" hover: match the site's button feel — blue (#2A71A9)
   settling to orange (#DA4D08) on hover with white text and a smooth transition.
   The plugin's base button is transparent, so we give it button-shaped padding and
   radius for the hover fill to read as a button. --- */
#isfwp-site-search .ais-ClearRefinements-button {
	padding: 6px 14px;
	border-radius: var(--isfwp-radius-sm, 4px);
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
#isfwp-site-search .ais-ClearRefinements-button:hover:not([disabled]),
#isfwp-site-search .ais-ClearRefinements-button:focus:not([disabled]) {
	background-color: #da4d08;
	border-color: #da4d08;
	color: #fff;
}
