/**
 * Search with Typesense — Instant Search Popup (.cmswt-InstantSearchPopup)
 * Ported from buddyboss-theme-child/assets/css/custom.css (MyMahotsav / Utsav Venues)
 */

/* ── Popup shell ─────────────────────────────────────────────────────────── */
.cmswt-InstantSearchPopup--active {
	z-index: 999999;
	scrollbar-width: none;
}

.cmswt-InstantSearchPopup--results {
	background: #f7f7f7;
}

.cmswt-InstantSearchPopup.cmswt-InstantSearchPopup--active {
	padding: 0;
}

/* ── Search box ──────────────────────────────────────────────────────────── */
.cmswt-InstantSearchPopup .cmswt-InstantSearch .ais-SearchBox-input {
	background: #fff;
}

.cmswt-InstantSearchPopup .ais-SearchBox-form input.ais-SearchBox-input {
	border: 1px solid #e5e5e5 !important;
}

.cmswt-InstantSearchPopup .ais-SearchBox-form input.ais-SearchBox-input:focus {
	border: 1px solid #e3634f !important;
}

.cmswt-InstantSearchPopup .cmswt-InstantSearch .ais-SearchBox-input::placeholder {
	color: #7a7a7a !important;
}

.cmswt-InstantSearchPopup .cmswt-InstantSearch .ais-Panel-collapseButton,
.cmswt-InstantSearchPopup .cmswt-InstantSearch .ais-Panel-collapseButton:focus {
	box-shadow: none !important;
}

/* ── Filters ───────────────────────────────────────────────────────────────── */
.cmswt-InstantSearchPopup .cmswt-FilterPanel {
	padding-right: 20px;
}

.cmswt-InstantSearchPopup .cmswt-FilterPanel-itemsContent {
	background: #ffe6e4;
	padding: 15px;
	border-radius: 10px;
}

/* ── Results grid & cards ─────────────────────────────────────────────────── */
.cmswt-InstantSearchPopup .cmswt-Results img {
	border-radius: 6px;
}

.cmswt-InstantSearchPopup .cmswt-Results .hit-content {
	margin-top: 12px;
}

.cmswt-InstantSearchPopup .cmswt-MainPanel .cmswt-Results .hit-contentLink .title {
	font-size: 16px !important;
	margin-bottom: 0 !important;
}

.cmswt-InstantSearchPopup .cmswt-Results .hit-description {
	line-height: 18px;
}

.cmswt-InstantSearchPopup .ais-InfiniteHits-item {
	background: #fff;
	padding: 8px;
}

.cmswt-InstantSearchPopup .ais-InfiniteHits-item:hover {
	box-shadow: 0 6px 24px 0 rgba(18, 43, 70, 0.12);
}

.cmswt-InstantSearchPopup .cmswt-Results .ais-InfiniteHits-list .hit-header a {
	position: relative;
	display: block;
	overflow: hidden;
}

.cmswt-InstantSearchPopup .cmswt-Results .ais-InfiniteHits-list .hit-header a::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(77, 50, 50, 0.4);
	z-index: 1;
	pointer-events: none;
	transition: opacity 0.3s ease;
	opacity: 1;
	border-radius: 6px;
}

.cmswt-InstantSearchPopup .cmswt-Results .ais-InfiniteHits-list .ais-InfiniteHits-item:hover .hit-header a::before {
	opacity: 0;
}

.cmswt-InstantSearchPopup .cmswt-Results .ais-InfiniteHits-list .hit-header a img {
	display: block;
	width: 100%;
	position: relative;
	z-index: 0;
}

.cmswt-InstantSearchPopup .cmswt-Results .ais-InfiniteHits-list img {
	height: 100px;
}

.cmswt-InstantSearchPopup .cmswt-Results .cmswt-Result-hits_product_schema .ais-InfiniteHits-list .hit-header a img {
	height: 155px;
}

.cmswt-InstantSearchPopup .cmswt-Results .cmswt-Result-hits_resume .hit-header img {
	height: 140px;
	object-position: center top;
}

.cmswt-InstantSearchPopup .cmswt-Results .cmswt-Result-hits_member .hit-header {
	width: 100%;
	overflow: hidden;
}

.cmswt-InstantSearchPopup .cmswt-Results .cmswt-Result-hits_member .hit-header img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center top;
	width: 100%;
	height: auto !important;
}

/* ── Infinite hits / load more ───────────────────────────────────────────── */
.cmswt-InstantSearchPopup .ais-InfiniteHits .ais-InfiniteHits-list .ais-InfiniteHits-item {
	padding-bottom: 30px;
	position: relative;
}

.cmswt-InstantSearchPopup .ais-InfiniteHits .ais-InfiniteHits-list .ais-InfiniteHits-item .hit-link {
	position: absolute;
	bottom: 5px;
}

.cmswt-InstantSearchPopup .ais-InfiniteHits {
	text-align: center;
}

.cmswt-InstantSearchPopup .ais-InfiniteHits .ais-InfiniteHits-list {
	text-align: left;
}

.cmswt-InstantSearchPopup .ais-InfiniteHits-loadMore {
	font-size: 18px;
	margin-top: 30px;
}

.cmswt-InstantSearchPopup .cmswt-Results .ais-InfiniteHits .ais-InfiniteHits-loadMore,
.cmswt-InstantSearchPopup .cmswt-Results .ais-InfiniteHits .ais-InfiniteHits-loadMore button {
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* ── Index switcher ────────────────────────────────────────────────────────── */
.cmswt-InstantSearchPopup .cmswt-IndexSwitcher-link .counter-value {
	color: #7a7a7a;
	font-size: 13px;
}

.cmswt-InstantSearchPopup .hit-cats .title {
	color: #7a7a7a !important;
}

/* ── Desktop grid ─────────────────────────────────────────────────────────── */
@media only screen and (min-width: 991px) {
	.cmswt-InstantSearchPopup .cmswt-Results .cm-col-4 {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.cmswt-InstantSearchPopup .cmswt-InstantSearch .ais-SortBy-select {
		padding: 5px 15px;
	}
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.cmswt-InstantSearchPopup .cmswt-CollectionMenu,
	.cmswt-InstantSearchPopup .cmswt-FilterPanel-toggle {
		background: #fff;
	}

	.cmswt-InstantSearchPopup .cmswt-FilterPanel-toggle,
	.cmswt-InstantSearchPopup .cmswt-CollectionMenu-current {
		border: 1px solid #e5e5e5 !important;
	}

	.cmswt-InstantSearchPopup .cmswt-CollectionMenu ul.cmswt-IndexSwitcher.cmswt-IndexSwitcher--block {
		display: flex;
		flex-direction: column;
	}

	.cmswt-InstantSearchPopup .cmswt-FilterPanel-itemsContent {
		background: transparent;
		padding: 15px;
		border-radius: 0;
	}
}

/* ── Embedded speed-search page (iframe) ───────────────────────────────────── */
body.utsav-speed-search .cmswt-InstantSearchPopup--closeIcon {
	display: none;
}

body.utsav-speed-search .cmswt-InstantSearchPopup--results {
	width: 100%;
	max-width: 100%;
}

body.utsav-speed-search .cmswt-InstantSearchPopup.cmswt-InstantSearchPopup--active {
	padding: 0;
}

[class^="ais-"]{
	font-size: 1.5rem;
}

.cmswt-Results .hit-cats,
.ais-HierarchicalMenu-count, 
.ais-Menu-count, 
.ais-RefinementList-count, 
.ais-ToggleRefinement-count{
	font-size: 1.2rem;
}

.cmswt-Results .hit-cats{
	margin-top: 5px;
}

.cmswt-Results .posted-on,
.cmswt-Results .posted-by{
	font-size: 14px;
}

.cmswt-Results .hit-description{
	font-size: 15px;
}

.cmswt-InstantSearchPopup .ais-InfiniteHits-loadMore {
	background-color: #E3634F;
}

.cmswt-InstantSearchPopup .ais-InfiniteHits-loadMore:hover {
  background-color: #B21F02;
  border-radius: 5px 5px 5px 5px;
}