/* Search results loading */
.nb-search-results-wrap {
	position: relative;
	min-height: 160px;
}

.nb-search-loading {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 48px;
	background: rgba(255, 255, 255, 0.82);
	font-weight: 600;
	color: var(--primary-200, #159f9b);
}

.nb-search-loading[hidden] {
	display: none !important;
}

.nb-search-is-loading .nb-search-results-inner {
	opacity: 0.5;
	pointer-events: none;
}

/* Custom checkbox (theme hides native input with display:none !important) */
[data-nb-search-root] .nb-search-filter-item {
	display: flex !important;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	justify-content: right;
}

[data-nb-search-root] .nb-search-filter-item input[type="checkbox"] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	opacity: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	pointer-events: none !important;
}

[data-nb-search-root] .nb-search-filter-item::before {
	content: "";
	display: block;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border: 2px solid var(--gray-300, #dbdbdb);
	border-radius: 4px;
	background: #fff;
	box-sizing: border-box;
	transition: background 0.15s ease, border-color 0.15s ease;
}

[data-nb-search-root] .nb-search-filter-item-active::before,
[data-nb-search-root] .nb-search-filter-item:has(input:checked)::before {
	border-color: var(--primary-100, #1dbab5);
	background-color: var(--primary-100, #1dbab5);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 10px;
}

[data-nb-search-root] .nb-search-filter-item-text {
	flex: 1;
}

/* Filter search field inside widget */
.nb-search-filter-widget .nb-filter-list__search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 0;
	border-radius: 12px;
	background: #fff;
	font-size: 0.875rem;
	color: var(--input-text, #383838);
	margin-bottom: 4px;
}

.nb-search-filter-widget .nb-filter-list__search-input:focus {
	outline: 2px solid var(--primary-100-36, rgba(29, 186, 181, 0.36));
}

.nb-filter-item--collapsed {
	display: none !important;
}

.drplus-specialities-filter.is-expanded .nb-filter-item--collapsed:not(.nb-filter-item--search-hidden) {
	display: flex !important;
}

.nb-filter-item--search-hidden {
	display: none !important;
}

.nb-filter-list__toggle {
	display: block;
	width: 100%;
	margin: 0;
	padding: 4px 0 0;
	border: 0;
	background: none;
	color: var(--primary-200, #159f9b);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}

.nb-filter-list__toggle:hover {
	color: var(--primary-100, #1dbab5);
}

.nb-search-filter-widget[hidden] {
	display: none !important;
}

/* Overview: exactly 3 items in a clean row (no slider / no overlap) */
.nb-search-overview.search-section {
	margin-bottom: 48px;
	clear: both;
}

.nb-search-overview .wrapper.desktop-columns,
.nb-search-overview .wrapper.tablet-columns,
.nb-search-overview .wrapper.mobile-columns {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 16px !important;
	overflow: visible !important;
}

.nb-search-overview .wrapper > .slider-slide,
.nb-search-overview .wrapper > .specialist {
	width: auto !important;
	max-width: none !important;
	min-width: 0;
}

@media (max-width: 991px) {
	.nb-search-overview .wrapper.desktop-columns,
	.nb-search-overview .wrapper.tablet-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 575px) {
	.nb-search-overview .wrapper {
		grid-template-columns: 1fr !important;
	}
}

/* Focused mode: full grid */
.nb-search-focused.search-section {
	margin-bottom: 40px;
}

.nb-search-focused .wrapper.desktop-columns,
.nb-search-focused .wrapper.specialists.desktop-columns {
	display: grid !important;
}

.nb-search-focused .wrapper.desktop-columns > .slider-slide,
.nb-search-focused .wrapper.specialists.desktop-columns > .slider-slide {
	width: auto;
	height: auto;
}

@media (max-width: 767px) {
	.content-area-with-sidebar #search-results {
		order: 1;
	}
	.content-area-with-sidebar #sidebar {
		order: 2;
	}
}
