/* =============================================================
   ARC publications search / research page (/research/)

   Redesigns the plugin-rendered search UI to match the supplied
   mockup, using the site's teal/green tokens so it stays cohesive
   with the paper & profile pages:
     · clean rounded search bar (icon · input · reset · search)
     · light toolbar (AI + export icon buttons, per-page, count)
     · editorial result rows (Fraunces title, green hover bar,
       muted excerpt/meta) with a calm "Add to Analysis" button.

   The page lives inside #widget-common-profile.ar-common-profile, so
   rules are scoped there to outrank research.php's inline <style>
   (which is later in source order). Markup is plugin-owned/read-only.
   ============================================================= */

/* ── Page header ────────────────────────────────────────────── */
#search_header h2.title {
	font-family: "Fraunces", Georgia, serif;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--arc-teal, #0a3d47);
}
#search_header h6.title {
	color: var(--arc-muted, #5c6b66);
	font-weight: 500;
}

/* ── Search bar ─────────────────────────────────────────────── */
.ar-common-profile .ar-search-box .input-group {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid rgba(10, 61, 71, 0.10);
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(16, 48, 46, 0.05);
	padding: 7px 7px 7px 6px;
}
/* input fills, no inner chrome */
.ar-common-profile .ar-search-input,
.ar-common-profile .ar-search-input:focus {
	flex: 1 1 auto;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	font-size: 15px;
	color: var(--arc-teal, #0a3d47);
	min-width: 0;
}
.ar-common-profile .ar-search-box .input-group .position-relative.flex-grow-1 {
	flex: 1 1 auto;
	min-width: 0;
}
/* search icon prefix */
.ar-common-profile .ar-search-box .fa-search.text-muted {
	color: var(--arc-muted-2, #97a49b) !important;
}

/* reset button → subtle icon button */
.ar-common-profile .ar-search-box .btn_restart {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: inline-grid;
	place-items: center;
	border: 1px solid rgba(10, 61, 71, 0.10) !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--arc-muted, #5c6b66) !important;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ar-common-profile .ar-search-box .btn_restart:hover {
	background: #edf5e2 !important;
	color: var(--arc-green-dark, #5c9a30) !important;
	border-color: #cfe0bd !important;
}
/* search button → teal pill */
.ar-common-profile .ar-search-box .btn_search {
	flex: 0 0 auto;
	height: 40px;
	padding: 0 18px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--arc-teal, #0a3d47) !important;
	color: #fff !important;
	font-weight: 600;
	transition: background 0.15s;
}
.ar-common-profile .ar-search-box .btn_search:hover {
	background: var(--arc-teal-dark, #072d35) !important;
}

/* ── Toolbar ────────────────────────────────────────────────── */
.ar-common-profile .ar-results-top-row {
	border-top: 0 !important;
	border-bottom: 1px solid rgba(10, 61, 71, 0.10) !important;
	margin-top: 1.5rem !important;
}
.ar-common-profile .ar-results-top-row .btn-group {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
/* icon buttons (robot / excel / csv / per-page) */
.ar-common-profile .ar-results-top-row .btn-group > .btn,
.ar-common-profile .ar-results-top-row .export-pub-action,
.ar-common-profile .ar-results-top-row #btn_per_page {
	margin: 0 !important;
	height: 38px;
	border: 1px solid rgba(10, 61, 71, 0.10) !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--arc-muted, #5c6b66) !important;
	font-size: 13px;
	font-weight: 600;
	box-shadow: none !important;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ar-common-profile .ar-results-top-row .export-pub-action:hover,
.ar-common-profile .ar-results-top-row #btn_per_page:hover {
	background: #f4f8ee !important;
	border-color: #cfe0bd !important;
	color: var(--arc-green-dark, #5c9a30) !important;
}
/* the AI / generate-analysis button gets the green-tint accent treatment */
.ar-common-profile .ar-results-top-row .arc-generate-analysis {
	background: #edf5e2 !important;
	border-color: #cfe0bd !important;
	color: var(--arc-green-dark, #5c9a30) !important;
}
.ar-common-profile .ar-results-top-row .arc-generate-analysis i,
.ar-common-profile .ar-results-top-row .arc-generate-analysis:hover {
	color: var(--arc-green-dark, #5c9a30) !important;
}
.ar-common-profile .ar-results-top-row .arc-generate-analysis:hover {
	background: #e3efd0 !important;
}
.ar-common-profile .ar-results-count {
	font-size: 13.5px;
	color: var(--arc-muted, #5c6b66);
}
.ar-common-profile .ar-results-count #search-results-count {
	color: var(--arc-teal, #0a3d47);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* ── Result rows ────────────────────────────────────────────── */
/* Reset the Bootstrap .alert look the plugin uses for each row. */
.ar-common-profile .results-container .ar-search-result {
	position: relative;
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(10, 61, 71, 0.08) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 20px 11rem 20px 18px !important;   /* keep room for the action button */
	transition: background 0.16s ease;
}
.ar-common-profile .results-container .ar-search-result::before {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	bottom: 10px;
	width: 3px;
	border-radius: 3px;
	background: var(--arc-green, #79ba3a);
	transform: scaleY(0);
	transition: transform 0.2s ease;
}
.ar-common-profile .results-container .ar-search-result:hover {
	background: #fafcf7 !important;
}
.ar-common-profile .results-container .ar-search-result:hover::before {
	transform: scaleY(1);
}
/* selected rows → green accent (overrides the plugin's blue !important) */
.ar-common-profile .results-container .ar-search-result.arc-analysis-selected {
	background: #edf5e2 !important;
	border-left: 0 !important;
}
.ar-common-profile .results-container .ar-search-result.arc-analysis-selected::before {
	transform: scaleY(1);
}

/* title */
.ar-common-profile .ar-search-result .ar-title {
	font-family: "Fraunces", Georgia, serif;
	font-weight: 600;
	font-size: 19px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 0 0 8px;
}
.ar-common-profile .ar-search-result .ar-title a {
	color: var(--arc-teal, #0a3d47) !important;
	text-decoration: none;
	transition: color 0.16s;
}
.ar-common-profile .ar-search-result .ar-title a:hover {
	color: var(--arc-green-dark, #5c9a30) !important;
}

/* excerpt + search-term highlights */
.ar-common-profile .ar-search-result .ar-excerpt {
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--arc-muted, #5c6b66);
	margin: 0 0 12px;
}
.ar-common-profile .ar-search-result .ar-title mark,
.ar-common-profile .ar-search-result .ar-excerpt mark,
.ar-common-profile .ar-search-result .ar-excerpt em {
	background: #fbf0c2;
	color: inherit;
	font-style: normal;
	font-weight: 600;
	padding: 0 2px;
	border-radius: 3px;
}

/* meta line (venue | year | authors | citations) — split into pills by
   arc-research-theme.js into .ar-meta-venue / -item / -dot / -tag spans */
.ar-common-profile .ar-search-result .ar-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	font-size: 12.5px;
	color: var(--arc-muted, #5c6b66);
}
.ar-common-profile .ar-search-result .ar-meta-venue {
	font-weight: 600;
	color: var(--arc-green-dark, #5c9a30);
}
.ar-common-profile .ar-search-result .ar-meta-item {
	color: var(--arc-muted, #5c6b66);
}
.ar-common-profile .ar-search-result .ar-meta-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #c6d0c7;
	flex: 0 0 auto;
}
.ar-common-profile .ar-search-result .ar-meta-tag {
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 6px;
	letter-spacing: 0.02em;
}
.ar-common-profile .ar-search-result .ar-meta-tag.cite {
	background: #f3efe3;
	color: #9a7b1f;
}
.ar-common-profile .ar-search-result .ar-meta-tag.oa {
	background: #edf5e2;
	color: var(--arc-green-dark, #5c9a30);
}
.ar-common-profile .ar-search-result .ar-meta-tag.type {
	background: #eef1ec;
	color: var(--arc-muted, #5c6b66);
}

/* ── "Add to Analysis" button ───────────────────────────────── */
.ar-common-profile .ar-search-result .arc-add-to-analysis {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 2;
	border: 1px solid rgba(10, 61, 71, 0.12) !important;
	border-radius: 9px !important;
	background: #fff !important;
	color: var(--arc-muted, #5c6b66) !important;
	font-weight: 600 !important;
	white-space: nowrap;
	transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.ar-common-profile .ar-search-result:hover .arc-add-to-analysis {
	border-color: #cfe0bd !important;
	color: var(--arc-green-dark, #5c9a30) !important;
	background: #edf5e2 !important;
}
/* selected / added state → solid green */
.ar-common-profile .ar-search-result .arc-add-to-analysis.btn-primary,
.ar-common-profile .ar-search-result.arc-analysis-selected .arc-add-to-analysis {
	background: var(--arc-green, #79ba3a) !important;
	border-color: var(--arc-green, #79ba3a) !important;
	color: #fff !important;
}

/* ── Load more ──────────────────────────────────────────────── */
.ar-common-profile #load-more-btn {
	border: 1px solid rgba(10, 61, 71, 0.12) !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--arc-teal, #0a3d47) !important;
	font-weight: 600 !important;
	padding: 11px 26px !important;
	transition: background 0.16s, border-color 0.16s;
}
.ar-common-profile #load-more-btn:hover:not(:disabled) {
	background: #edf5e2 !important;
	border-color: #cfe0bd !important;
}
.ar-common-profile #load-more-btn:disabled {
	opacity: 0.6;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.ar-common-profile .results-container .ar-search-result {
		padding: 18px 16px !important;
	}
	.ar-common-profile .ar-search-result .arc-add-to-analysis {
		position: static;
		display: inline-flex;
		margin-bottom: 0.75rem;
	}
}
