/* =========================================================
   AJAX Search Results — filters bar + result grid
   Author: Masud Rana

   SPECIFICITY NOTE:
   Every selector chains ".mr-asr" three times
   (".mr-asr.mr-asr.mr-asr") for the same reason documented in
   ajax-search.css — a reliable, !important-free way to outrank
   Elementor's own default/global styles for these widgets.
   ========================================================= */

.mr-asr.mr-asr.mr-asr {
	--mr-accent: #111827;
	--mr-text: #111827;
	--mr-muted: #9ca3af;
	--mr-border: #e9e9ef;
	--mr-surface: #ffffff;
	--mr-surface-muted: #f7f7f9;
	width: 100%;
	font-family: inherit;
	color: var(--mr-text);
}

.mr-asr.mr-asr.mr-asr .mr-asr__bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.mr-asr.mr-asr.mr-asr .mr-asr__field {
	max-width: none;
}

.mr-asr.mr-asr.mr-asr .mr-asr__kbd {
	position: absolute;
	right: 14px;
	font-family: inherit;
	font-size: 12px;
	color: var(--mr-muted);
	background: var(--mr-surface-muted);
	border: 1px solid var(--mr-border);
	border-radius: 6px;
	padding: 3px 7px;
}

/* Reuse the shared field visuals for the top bar */
.mr-asr.mr-asr.mr-asr .mr-ajax-search__field {
	flex: 1;
	background: var(--mr-surface);
	border: 1px solid var(--mr-border);
	border-radius: 999px;
	box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05);
}

.mr-asr.mr-asr.mr-asr .mr-ajax-search__field:focus-within {
	border-color: rgba(17, 24, 39, 0.18);
}

/* ---------- Filters ---------- */
.mr-asr.mr-asr.mr-asr .mr-asr__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 14px 4px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--mr-border);
}

.mr-asr.mr-asr.mr-asr .mr-asr__filters-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mr-text);
	margin-right: 4px;
}

.mr-asr.mr-asr.mr-asr .mr-asr__filters-icon {
	width: 15px;
	height: 15px;
	background: no-repeat center / contain;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'%3E%3C/polygon%3E%3C/svg%3E");
}

.mr-asr.mr-asr.mr-asr .mr-asr__select-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: var(--mr-surface-muted);
	border: 1px solid var(--mr-border);
	border-radius: 999px;
	cursor: pointer;
}

.mr-asr.mr-asr.mr-asr .mr-asr__select-label {
	font-size: 13.5px;
	color: var(--mr-muted);
	font-weight: 500;
	white-space: nowrap;
}

.mr-asr.mr-asr.mr-asr .mr-asr__select {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right center / 12px;
	padding-right: 16px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mr-text);
	outline: none;
	cursor: pointer;
}

/* ---------- Meta / results count ---------- */
.mr-asr.mr-asr.mr-asr .mr-asr__meta {
	padding: 4px 4px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--mr-text);
}

/* ---------- Grid ---------- */
.mr-asr.mr-asr.mr-asr .mr-asr__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

@media (max-width: 900px) {
	.mr-asr.mr-asr.mr-asr .mr-asr__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.mr-asr.mr-asr.mr-asr .mr-asr__grid {
		grid-template-columns: 1fr;
	}

	.mr-asr.mr-asr.mr-asr .mr-asr__bar {
		flex-wrap: wrap;
	}

	.mr-asr.mr-asr.mr-asr .mr-asr__field {
		flex-basis: 100%;
	}

	.mr-asr.mr-asr.mr-asr .mr-asr__submit {
		flex: 1;
		justify-content: center;
	}
}

/* ---------- Card ---------- */
.mr-asr.mr-asr.mr-asr .mr-asr__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px;
	background: var(--mr-surface);
	border: 1px solid var(--mr-border);
	border-radius: 16px;
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 32px rgba(17, 24, 39, 0.1);
	border-color: #dcdce3;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card-open {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 15px;
	height: 15px;
	opacity: 0.35;
	background: no-repeat center / contain;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='7' y1='17' x2='17' y2='7'%3E%3C/line%3E%3Cpolyline points='7 7 17 7 17 17'%3E%3C/polyline%3E%3C/svg%3E");
	transition: opacity 0.15s ease;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card:hover .mr-asr__card-open {
	opacity: 0.8;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card-top {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-right: 20px;
}

.mr-asr.mr-asr.mr-asr .mr-asr__avatar {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 700;
	color: var(--mr-text);
	background: var(--mr-surface-muted);
	border-radius: 50%;
	overflow: hidden;
}

.mr-asr.mr-asr.mr-asr .mr-asr__avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card-heading {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card-title {
	font-size: 15.5px;
	font-weight: 700;
	color: var(--mr-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card-meta {
	font-size: 13px;
	color: var(--mr-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card-excerpt {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: #6b7280;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 6px;
}

.mr-asr.mr-asr.mr-asr .mr-asr__card-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: var(--mr-muted);
}

.mr-asr.mr-asr.mr-asr .mr-asr__clock {
	width: 12px;
	height: 12px;
	background: no-repeat center / contain;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ---------- Skeleton loading state ---------- */
.mr-asr.mr-asr.mr-asr .mr-asr__card--skeleton {
	pointer-events: none;
	cursor: default;
}

.mr-asr.mr-asr.mr-asr .mr-asr__skel-circle,
.mr-asr.mr-asr.mr-asr .mr-asr__skel-line {
	background: linear-gradient(90deg, #eef0f3 25%, #f7f7f9 37%, #eef0f3 63%);
	background-size: 400% 100%;
	animation: mr-asr-shimmer 1.4s ease infinite;
	border-radius: 8px;
}

.mr-asr.mr-asr.mr-asr .mr-asr__skel-circle {
	width: 42px;
	height: 42px;
	border-radius: 50%;
}

.mr-asr.mr-asr.mr-asr .mr-asr__skel-line {
	display: block;
	height: 12px;
	width: 100%;
	margin-top: 8px;
}

.mr-asr.mr-asr.mr-asr .mr-asr__skel-line--title {
	width: 70%;
	height: 13px;
	margin-top: 0;
}

.mr-asr.mr-asr.mr-asr .mr-asr__skel-line--meta {
	width: 45%;
	height: 10px;
}

.mr-asr.mr-asr.mr-asr .mr-asr__skel-line--short {
	width: 60%;
}

@keyframes mr-asr-shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}

/* ---------- Empty state ---------- */
.mr-asr.mr-asr.mr-asr .mr-asr__empty {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 64px 20px;
	color: var(--mr-muted);
}

.mr-asr.mr-asr.mr-asr .mr-asr__empty-icon {
	width: 46px;
	height: 46px;
	margin-bottom: 16px;
	opacity: 0.5;
	background: no-repeat center / contain;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}

.mr-asr.mr-asr.mr-asr .mr-asr__empty h3 {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	color: var(--mr-text);
}

.mr-asr.mr-asr.mr-asr .mr-asr__empty p {
	margin: 0;
	font-size: 14px;
}

/* ---------- Pagination ---------- */
.mr-asr.mr-asr.mr-asr .mr-asr__pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 28px;
}

.mr-asr.mr-asr.mr-asr .mr-asr__page {
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mr-text);
	background: var(--mr-surface);
	border: 1px solid var(--mr-border);
	border-radius: 10px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mr-asr.mr-asr.mr-asr .mr-asr__page:hover {
	background-color: var(--mr-surface-muted);
}

.mr-asr.mr-asr.mr-asr .mr-asr__page.is-active {
	background-color: var(--mr-accent);
	border-color: var(--mr-accent);
	color: #ffffff;
}
