/* ========================================================================
   Divi Ajax Filter — frontend.css
   ======================================================================== */

/* ---- Container ---- */
.daf-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: center;
}

/* ---- Search ---- */
.daf-search-wrap {
	position: relative;
	flex: 1 1 240px;
	min-width: 200px;
}

.daf-search-input {
	display: block;
	width: 100%;
	padding: 10px 40px 10px 14px;
	font-size: 0.95em;
	border: 1px solid #d0d0d0;
	border-radius: 6px;
	background: #fff;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.daf-search-input:focus {
	border-color: #8282c0;
	box-shadow: 0 0 0 3px rgba(130, 130, 192, 0.18);
}

.daf-search-icon {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #999;
	pointer-events: none;
	display: flex;
	align-items: center;
}

/* ---- Filter button groups ---- */
.daf-filter-group {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

/* ---- Buttons ---- */
.daf-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 7px 16px;
	font-size: 0.875em;
	font-weight: 500;
	line-height: 1;
	border: 1px solid #d0d0d0;
	border-radius: 99px;
	background: #fff;
	color: #444;
	cursor: pointer;
	transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
	white-space: nowrap;
}

.daf-filter-btn:hover {
	border-color: #8282c0;
	color: #5b5bab;
}

.daf-filter-btn.is-active {
	background: #5b5bab;
	border-color: #5b5bab;
	color: #fff;
}

.daf-filter-btn.is-active .daf-count {
	opacity: 0.75;
}

.daf-count {
	font-size: 0.85em;
	opacity: 0.55;
}

/* ---- Loading state on target section ---- */
.daf-is-loading {
	position: relative;
	pointer-events: none;
}

.daf-loading {
	font-size: 0.875em;
	color: #888;
	align-self: center;
}

/* ---- Translucent overlay while loading ---- */
.daf-is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.55);
	z-index: 100;
	border-radius: inherit;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
	.daf-filter-form {
		flex-direction: column;
		align-items: stretch;
	}

	.daf-search-wrap {
		flex: none;
	}
}
