/**
 * ReadiSorb Research Library — Front-end styles
 * Provides baseline layout for research blocks.
 * Override in your theme as needed.
 */

/* ── Layout: sidebar + content ───────────────────────── */
.rs-research-columns {
	align-items: flex-start !important;
	gap: 3em !important;
}

/* Force 30/70 split — override theme's equal-column default */
.rs-research-columns .rs-research-sidebar {
	flex-basis: 30% !important;
	flex-grow: 0 !important;
	flex-shrink: 0 !important;
	min-width: 0;
}

.rs-research-columns .rs-research-content {
	flex-basis: 70% !important;
	flex-grow: 0 !important;
	flex-shrink: 1 !important;
	min-width: 0;
}

/* On mobile the columns stack — sidebar sits above content */
@media (max-width: 767px) {
	.rs-research-columns {
		gap: 1.5em !important;
	}

	.rs-research-columns .rs-research-sidebar,
	.rs-research-columns .rs-research-content {
		flex-basis: 100% !important;
	}
}

/* ── Shared ──────────────────────────────────────────── */
.rs-research-citation {
	font-size: 1em;
	color: inherit;
	opacity: 0.8;
	margin-bottom: 0.5em;
	line-height: 1.68;
	letter-spacing: -0.015em;
}

.rs-research-year {
	font-size: 1em;
	font-weight: 600;
	margin-bottom: 0.5em;
	line-height: 1.68;
}

.rs-research-pmid {
	font-size: 1em;
	margin-bottom: 0.5em;
	line-height: 1.68;
}

/* ── research-meta block (single post view) ──────────── */
.rs-research-meta {
	margin-top: 1.5em;
}

.rs-research-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 0.75em;
}

/* ── research-card-meta block (listing / query loops) ── */
.rs-research-card-meta {
	margin-top: 0.4em;
}

.rs-research-excerpt {
	font-size: 1.04em;
	margin-bottom: 0.5em;
	line-height: 1.72;
	letter-spacing: -0.015em;
}

.rs-research-fulltext,
.rs-research-full-article {
	font-size: 1em;
	margin-top: 0.25em;
	line-height: 1.62;
	letter-spacing: -0.015em;
}

/* ── Card action buttons (PMID + Read the Article) ───── */
.rs-research-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.rs-research-btn {
	display: inline-block;
	background-color: var(--rs-text, #111111);
	background-image: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.12) 0%,
		rgba(255, 255, 255, 0.00) 48%,
		rgba(0, 0, 0, 0.14) 100%
	);
	color: #fff;
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
	border: 1px solid color-mix(in srgb, var(--rs-text, #111111) 76%, #000);
	box-shadow:
		0 2px 0 rgba(0, 0, 0, 0.15),
		0 4px 10px rgba(0, 0, 0, 0.08);
	transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.rs-research-btn:hover,
.rs-research-btn:focus {
	color: #fff;
	text-decoration: none;
	filter: brightness(0.92);
	transform: translateY(1px);
	box-shadow:
		0 1px 0 rgba(0, 0, 0, 0.15),
		0 3px 8px rgba(0, 0, 0, 0.08);
}

/* ── Legacy featured research shortcode ───────────────── */
.rs-featured-research-shortcode {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.rs-featured-research-shortcode > li + li {
	margin-top: 2em !important;
}

html body .rs-featured-research-shortcode a {
	text-decoration: none !important;
}

html body .rs-featured-research-title,
html body .rs-featured-research-title a {
	font-size: 1em !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	margin: 0 0 0.15em !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	color: #5a5a5a !important;
}

/* ── Paper badge ─────────────────────────────────────── */
.rs-research-paper-badge {
	display: inline-block;
	background: transparent;
	color: var(--rs-text, #111111);
	border: 1.5px solid var(--rs-text, #111111);
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 0;
	margin-bottom: 0.5em;
	vertical-align: middle;
	text-decoration: none;
	cursor: pointer;
}
.rs-research-paper-badge:hover,
.rs-research-paper-badge:focus {
	background: var(--rs-text, #111111);
	color: #fff;
}

/* ── Bibliography (single paper view) ────────────────── */
.rs-research-bibliography {
	margin-top: 2.5em;
	padding-top: 1.5em;
	border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.rs-research-bibliography__heading {
	font-size: 1em;
	font-weight: 700;
	margin-bottom: 1em;
}

.rs-research-bibliography__list {
	padding-left: 1.5em;
	margin: 0;
}

.rs-research-bibliography__entry {
	font-size: 1em;
	line-height: 1.74;
	margin-bottom: 0.75em;
	color: inherit;
	letter-spacing: -0.015em;
}

.rs-research-bibliography__entry a {
	color: var(--rs-text, #111111);
	text-decoration: underline;
}

/* ── research-accordion block ────────────────────────── */
.rs-research-accordion {
	margin: 1.5em 0;
}

.rs-research-accordion__item {
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.rs-research-accordion__item:first-child {
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.rs-research-accordion__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.9em 0;
	cursor: pointer;
	font-weight: 600;
	font-size: 1em;
	list-style: none;
	user-select: none;
}

.rs-research-accordion__summary::-webkit-details-marker {
	display: none;
}

.rs-research-accordion__summary::after {
	content: '+';
	font-size: 1.25em;
	font-weight: 300;
	color: var(--rs-text, #111111);
	flex-shrink: 0;
	margin-left: 1em;
	transition: transform 0.2s ease;
}

.rs-research-accordion__item[open] > .rs-research-accordion__summary::after {
	content: '−';
}

.rs-research-accordion__summary span {
	color: var(--rs-text, #111111);
}

.rs-research-accordion__body {
	padding: 0.25em 0 1.25em;
}

.rs-research-accordion__description {
	font-size: 1.04em;
	opacity: 0.7;
	margin-bottom: 1em;
	line-height: 1.72;
	letter-spacing: -0.015em;
}

.rs-research-accordion__list {
	padding-left: 1.25em;
	margin: 0;
}

.rs-research-accordion__entry {
	margin-bottom: 1.25em;
}

.rs-research-accordion__entry:last-child {
	margin-bottom: 0;
}

.rs-research-accordion__title {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	color: var(--rs-text, #111111);
	text-decoration: none;
}

.rs-research-accordion__title:hover {
	text-decoration: underline;
}

.rs-research-accordion__excerpt {
	font-size: 1em;
	line-height: 1.7;
	margin: 0.25em 0;
	opacity: 0.85;
	letter-spacing: -0.015em;
}

.rs-research-accordion__pmid {
	font-size: 0.8em;
	color: var(--rs-text, #111111);
	text-decoration: none;
	opacity: 0.8;
}

.rs-research-accordion__pmid:hover {
	text-decoration: underline;
}

/* ── research-filter block (legacy — kept for compatibility) ── */
.rs-research-filter {
	margin: 1.5em 0;
}

.rs-research-filter__group {
	margin-bottom: 1.5em;
}

.rs-research-filter__label {
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
	opacity: 0.55;
	margin: 0 0 0.65em;
}

.rs-research-filter__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.rs-research-filter__btn {
	display: inline-block;
	background-color: var(--rs-text, #111111);
	background-image: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.12) 0%,
		rgba(255, 255, 255, 0.00) 48%,
		rgba(0, 0, 0, 0.14) 100%
	);
	color: #fff;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 0.875em;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.20);
	border: 1px solid color-mix(in srgb, var(--rs-text, #111111) 76%, #000);
	box-shadow:
		0 2px 0 rgba(0, 0, 0, 0.18),
		0 8px 16px rgba(0, 0, 0, 0.10);
	transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.rs-research-filter__btn:hover,
.rs-research-filter__btn:focus {
	color: #fff;
	text-decoration: none;
	filter: brightness(0.92);
	transform: translateY(1px);
	box-shadow:
		0 1px 0 rgba(0, 0, 0, 0.18),
		0 6px 12px rgba(0, 0, 0, 0.10);
}

.rs-research-filter__btn:active {
	transform: translateY(2px);
	box-shadow:
		0 0 0 rgba(0, 0, 0, 0),
		0 3px 8px rgba(0, 0, 0, 0.10);
}
