/* ============================================================
   ARC Profile — homepage theme redesign
   Restyles the plugin-arc common profiles (institution / author)
   to match the ARC homepage design system: mint dotted canvas,
   rounded white cards with soft shadows, teal headings, green +
   gold accents.

   NOTE: These rules logically belong in plugin-arc's plugin.css,
   but that directory is read-only in the current deployment, so
   they live in the theme and are enqueued globally. They are all
   scoped under .ar-common-profile, so they only affect profile
   pages. If plugin.css becomes writable, this block can be moved
   there verbatim and this file + its enqueue removed.
   ============================================================ */
.ar-common-profile {
	--arc-teal:        #0a3d47;
	--arc-teal-dark:   #072d35;
	--arc-green:       #79ba3a;
	--arc-green-dark:  #68a530;
	--arc-gold:        #e6b93a;
	--arc-red:         #c0392b;
	--arc-mint:        #eaf5f8;
	--arc-muted:       #6f8b93;
	--arc-card-radius: 18px;
	--arc-card-border: 1px solid rgba(10, 61, 71, 0.08);
	--arc-card-shadow: 0 10px 30px rgba(10, 61, 71, 0.08);
	--arc-card-shadow-hover: 0 16px 42px rgba(10, 61, 71, 0.15);
}

/* Full-width mint dotted canvas (homepage background) */
.ar-page-container:has(.ar-common-profile) {
	background-color: #ffffff;
	background-image: radial-gradient(rgba(10, 61, 71, 0.06) 1.3px, transparent 1.3px);
	background-size: 22px 22px;
	padding-top: 30px;
	padding-bottom: 56px;
}

/* Main profile card */
.ar-common-profile .profile-wrapper > .row {
	background: #fff !important;
	border: var(--arc-card-border) !important;
	border-radius: var(--arc-card-radius) !important;
	box-shadow: var(--arc-card-shadow);
	overflow: hidden;
}

/* Left sidebar (stats) */
.ar-common-profile .left-profile {
	background: linear-gradient(180deg, #f4fafb 0%, #eaf5f8 100%) !important;
	border-right: 1px solid rgba(10, 61, 71, 0.07);
}
.ar-common-profile .left-profile .carta-info-row {
	border-bottom: 1px solid rgba(10, 61, 71, 0.08);
	padding-bottom: 0.65rem;
	margin-bottom: 0.75rem !important;
	font-size: 1.1rem !important;
	font-weight: 700;
	color: var(--arc-teal);
}
.ar-common-profile .left-profile .carta-info-row:last-child {
	border-bottom: none;
}
.ar-common-profile .left-profile .carta-info-row b {
	color: var(--arc-muted) !important;
	font-size: 0.66rem !important;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}
.ar-common-profile .left-profile a {
	color: var(--arc-green-dark) !important;
	font-weight: 700;
}
.ar-common-profile .left-profile a:hover {
	color: var(--arc-teal) !important;
}

/* Institution / author name */
.ar-common-profile .right-profile h2 {
	color: var(--arc-teal) !important;
	font-weight: 800 !important;
	font-size: 1.95rem !important;
	line-height: 1.15;
}
.ar-common-profile .right-profile .userlocation {
	color: var(--arc-muted) !important;
	font-weight: 600;
}

/* Badges (Institution + share) */
.ar-common-profile .badge-label {
	background: var(--arc-gold) !important;
	color: #3a2e05 !important;
	border-radius: 50px !important;
	padding: 0.46em 0.95em !important;
	letter-spacing: 0.02em;
}
.ar-common-profile .badge-share {
	background: var(--arc-teal) !important;
	border-radius: 50px !important;
	padding: 0.46em 0.7em !important;
}
.ar-common-profile .badge-share:hover {
	background: var(--arc-teal-dark) !important;
}

/* Section headings (AI About, Publications, etc.) */
.ar-common-profile .right-profile .profile h5 {
	color: var(--arc-teal) !important;
	font-size: 1rem !important;
	font-weight: 800 !important;
	letter-spacing: 0.01em !important;
	text-transform: none !important;
	display: flex;
	align-items: center;
	gap: 0.55rem;
}
.ar-common-profile .right-profile .profile h5::before {
	content: "";
	flex: 0 0 auto;
	width: 6px;
	height: 18px;
	border-radius: 3px;
	background: var(--arc-green);
}

/* AI badge pill */
.ar-common-profile .ai-badge {
	background: var(--arc-green) !important;
	color: #fff !important;
	border-radius: 50px;
	padding: 0.12em 0.55em;
	font-size: 0.58rem !important;
	font-weight: 700;
	letter-spacing: 0.04em;
	vertical-align: middle;
	top: 0;
}

/* AI summary body text */
.ar-common-profile .ai-about-text,
.ar-common-profile .right-profile .profile .desc {
	color: #2c4148 !important;
	line-height: 1.65;
}

/* Latest publications -> cards */
.ar-common-profile .lpapers .list {
	list-style: none;
	padding-left: 0;
}
.ar-common-profile .lpapers-row {
	background: #fff;
	border: var(--arc-card-border);
	border-radius: 14px;
	padding: 0.95rem 1.1rem;
	box-shadow: 0 2px 8px rgba(10, 61, 71, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ar-common-profile .lpapers-row:hover {
	transform: translateY(-2px);
	box-shadow: var(--arc-card-shadow);
	border-color: rgba(121, 186, 58, 0.45);
}
.ar-common-profile .info-lpaper-title a {
	color: var(--arc-teal) !important;
	font-weight: 700;
	text-decoration: none;
}
.ar-common-profile .info-lpaper-title a:hover {
	color: var(--arc-green-dark) !important;
}
.ar-common-profile .info-lpaper-pubmeta {
	color: var(--arc-muted) !important;
	font-size: 0.85rem;
}

/* Chart cards */
.ar-common-profile .ar-chart-wrapper > .bg-white.border {
	border: var(--arc-card-border) !important;
	border-radius: var(--arc-card-radius) !important;
	box-shadow: var(--arc-card-shadow);
	transition: box-shadow 0.2s ease;
}
.ar-common-profile .ar-chart-wrapper > .bg-white.border:hover {
	box-shadow: var(--arc-card-shadow-hover);
}

/* Info alert -> mint/teal */
.ar-common-profile .alert-info {
	background: #eaf5f8 !important;
	border: 1px solid rgba(10, 61, 71, 0.14) !important;
	color: var(--arc-teal) !important;
	border-radius: 12px !important;
}

/* RRAT widget card */
.ar-common-profile .rrat-profile-card {
	border-radius: var(--arc-card-radius) !important;
	box-shadow: var(--arc-card-shadow) !important;
	border: var(--arc-card-border) !important;
	overflow: hidden;
}
.ar-common-profile .rrat-profile-card-header {
	background: var(--arc-teal) !important;
	color: #fff !important;
}
.ar-common-profile .rrat-profile-card-header h3 {
	color: #fff !important;
}

/* Primary buttons -> green pill */
.ar-common-profile .btn-primary {
	background: var(--arc-green) !important;
	border-color: var(--arc-green) !important;
	border-radius: 50px !important;
	font-weight: 700;
}
.ar-common-profile .btn-primary:hover {
	background: var(--arc-green-dark) !important;
	border-color: var(--arc-green-dark) !important;
}

/* Active country flag -> green ring */
.ar-common-profile .arc-field-flag-active {
	box-shadow: 0 0 0 2px var(--arc-green);
	border-radius: 4px;
}

/* NOTE: A sticky stats sidebar was trialled here but disabled — it required
   lifting .left-profile into a new column via JS, which conflicted with the
   plugin appending its chart cards to .maincol asynchronously (charts ended
   up in a horizontal row / disappeared). The sidebar stays in its normal
   in-card position. See arc-profile-theme.js (now a no-op) for details. */

/* ── Extra polish ──────────────────────────────────────────── */

/* Comfortable measure for the AI summary */
.ar-common-profile .ai-about-text {
	max-width: 68ch;
	font-size: 1.02rem;
}

/* Chart cards lift slightly on hover (motion-safe) */
@media (prefers-reduced-motion: no-preference) {
	.ar-common-profile .ar-chart-wrapper > .bg-white.border {
		transition: transform 0.2s ease, box-shadow 0.2s ease;
	}
	.ar-common-profile .ar-chart-wrapper > .bg-white.border:hover {
		transform: translateY(-3px);
	}
}
