/* Nobel Journals — search & researcher discovery (sidebar + main layout) */

body.nobel_theme.pkp_page_search .pkp_structure_content,
body.nobel_theme.pkp_page_search .pkp_structure_main,
body.nobel_theme.pkp_page_search .pkp_structure_main:first-child:last-child {
	width: 100% !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
	float: none !important;
}

body.nobel_theme.pkp_page_search .pkp_structure_content {
	display: block;
}

body.nobel_theme.pkp_page_search,
body.nobel_theme.pkp_page_search .pkp_structure_page {
	background: #eef1f6;
}

.nobel-search-page {
	--nobel-search-radius: 10px;
	--nobel-search-max: var(--nobel-max, 1440px);
	--nobel-search-sidebar: 360px;
	max-width: none;
	margin: 0;
	padding: 0 0 28px;
	background: transparent;
}

.nobel-search-page .publisher_page_header,
.nobel-search-page .publisher_search_panel,
.nobel-search-page .publisher_search_intro,
.nobel-search-page .publisher_search_results {
	display: none;
}

/* ── Shell: sidebar flush left, hero touches sidebar ── */
.nobel-search-shell {
	display: grid;
	grid-template-columns: var(--nobel-search-sidebar) minmax(0, 1fr);
	gap: 0;
	align-items: start;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* ── Filters sidebar ── */
.nobel-search-filters {
	position: sticky;
	top: 0;
	padding: 14px 24px 28px;
	border-radius: 0;
	border: none;
	border-right: 1px solid #dde4ee;
	background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
	box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.6);
	align-self: stretch;
	min-height: calc(100vh - 57px);
}

.nobel-search-filters__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e8edf3;
}

.nobel-search-filters__title {
	position: relative;
	margin: 0;
	padding-left: 14px;
	font-family: var(--nobel-serif, "Playfair Display", serif);
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--nobel-navy, #0d1b3e);
	line-height: 1.25;
}

.nobel-search-filters__title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	bottom: 0.15em;
	width: 3px;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--nobel-burgundy, #7a1f28), #a83240);
}

.nobel-search-filters__close {
	display: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f5f9;
	color: #475569;
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}

.nobel-search-filters__close:hover,
.nobel-search-filters__close:focus-visible {
	background: #e2e8f0;
	color: var(--nobel-navy, #0d1b3e);
}

body.nobel_theme.pkp_page_search .nobel-search-filters__body {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.nobel-search-filters__section + .nobel-search-filters__section {
	margin-top: 20px;
}

.nobel-search-filters__section--dates {
	padding: 16px 16px 14px;
	border-radius: 12px;
	border: 1px solid #e4eaf1;
	background: #f4f7fa;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.nobel-search-filters__group + .nobel-search-filters__group {
	margin-top: 16px;
}

.nobel-search-filters__group--journal {
	padding-top: 16px;
	border-top: 1px dashed #e2e8f0;
}

.nobel-search-filters__group--dates {
	margin-top: 0;
}

.nobel-search-filters__group--dates .nobel-search-filters__label {
	margin-bottom: 10px;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--nobel-navy, #0d1b3e);
}

.nobel-search-filters__label,
.nobel-search-filters__sublabel {
	display: block;
	margin: 0 0 7px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-transform: none;
	color: #475569;
}

.nobel-search-filters__sublabel {
	margin-bottom: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #64748b;
}

.nobel-search-filters__input,
.nobel-search-filters__select {
	display: block;
	width: 100%;
	height: 42px;
	padding: 0 13px;
	border: 1px solid #dce3ec;
	border-radius: 9px;
	background: #fff;
	font-family: var(--nobel-font, "Source Sans 3", sans-serif);
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--nobel-ink, #14203a);
	box-shadow: 0 1px 2px rgba(13, 27, 62, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nobel-search-filters__section--dates .nobel-search-filters__select {
	background: #fff;
}

.nobel-search-filters__input::placeholder {
	color: #94a3b8;
}

.nobel-search-filters__input:hover,
.nobel-search-filters__select:hover {
	border-color: #c8d2e0;
}

.nobel-search-filters__select {
	padding-right: 30px;
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23475569' d='M1.2 1.3L6 6.1l4.8-4.8 1.1 1.1L6 8.3 0.1 2.4z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

.nobel-search-filters__input:focus,
.nobel-search-filters__select:focus {
	outline: none;
	border-color: var(--nobel-burgundy, #7a1f28);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(122, 31, 40, 0.1);
}

.nobel-search-filters__chips {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
	margin-bottom: 14px;
}

.nobel-search-filters__chip {
	appearance: none;
	margin: 0;
	padding: 7px 8px;
	border: 1px solid #d4dce8;
	border-radius: 999px;
	background: #fff;
	color: #475569;
	font-size: 0.72rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	text-align: center;
	box-shadow: 0 1px 2px rgba(13, 27, 62, 0.05);
	transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.nobel-search-filters__chip:hover,
.nobel-search-filters__chip:focus-visible {
	border-color: #b8c4d4;
	color: var(--nobel-navy, #0d1b3e);
	box-shadow: 0 2px 4px rgba(13, 27, 62, 0.06);
}

.nobel-search-filters__chip.is-active {
	border-color: var(--nobel-burgundy, #7a1f28);
	background: var(--nobel-burgundy, #7a1f28);
	color: #fff;
	box-shadow: 0 2px 8px rgba(122, 31, 40, 0.28);
}

.nobel-search-filters__years {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding-top: 2px;
}

.nobel-search-filters__group--sort {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e8edf3;
}

.nobel-search-filters__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid #e8edf3;
}

.nobel-search-filters__apply {
	width: 100%;
	height: 44px;
	border: 0;
	border-radius: 9px;
	background: linear-gradient(180deg, #0f2248 0%, var(--nobel-navy, #0d1b3e) 100%);
	color: #fff;
	font-size: 0.84rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(13, 27, 62, 0.22);
	transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.nobel-search-filters__apply:hover,
.nobel-search-filters__apply:focus {
	background: linear-gradient(180deg, #142850 0%, #14203a 100%);
	box-shadow: 0 4px 12px rgba(13, 27, 62, 0.28);
}

.nobel-search-filters__apply:active {
	transform: translateY(1px);
}

.nobel-search-filters__clear {
	display: inline-block;
	padding: 4px 0;
	text-align: center;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #64748b;
	text-decoration: none;
	transition: color 0.12s ease;
}

.nobel-search-filters__clear:hover,
.nobel-search-filters__clear:focus {
	color: var(--nobel-burgundy, #7a1f28);
}

/* ── Main column ── */
.nobel-search-main {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
	width: 100%;
	max-width: none;
	height: auto;
	min-height: 0;
	align-self: stretch;
}

/* Hero — flush against sidebar (no left gap) */
.nobel-search-hero {
	position: relative;
	padding: 22px 28px 24px;
	overflow: hidden;
	border-radius: 0;
	background: linear-gradient(118deg, #0d1b3e 0%, #1a2d52 42%, #6b1c28 100%);
	color: #fff;
}

.nobel-search-hero__glow {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 12% 40%, rgba(122, 31, 40, 0.32), transparent 50%),
		radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.07), transparent 42%);
	pointer-events: none;
}

.nobel-search-hero__inner {
	position: relative;
	z-index: 1;
}

.nobel-search-tabs {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	margin-bottom: 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.22);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.nobel-search-tabs__item,
.nobel-search-tabs__item:visited,
body.nobel_theme .pkp_structure_main a.nobel-search-tabs__item,
body.nobel_theme .pkp_structure_main a.nobel-search-tabs__item:visited {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 15px;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.85) !important;
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 600;
	transition: background 0.15s ease, color 0.15s ease;
}

.nobel-search-tabs__item svg {
	opacity: 0.9;
	stroke: currentColor;
	flex-shrink: 0;
}

.nobel-search-tabs__item:hover,
.nobel-search-tabs__item:focus,
body.nobel_theme .pkp_structure_main a.nobel-search-tabs__item:hover,
body.nobel_theme .pkp_structure_main a.nobel-search-tabs__item:focus {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.1);
}

.nobel-search-tabs__item.is-active,
.nobel-search-tabs__item.is-active:visited,
body.nobel_theme .pkp_structure_main a.nobel-search-tabs__item.is-active,
body.nobel_theme .pkp_structure_main a.nobel-search-tabs__item.is-active:visited {
	background: #fff !important;
	color: var(--nobel-burgundy, #7a1f28) !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.nobel-search-hero__copy h1 {
	margin: 0;
	font-family: var(--nobel-serif, "Playfair Display", serif);
	font-size: clamp(1.65rem, 2.5vw, 2.1rem);
	font-weight: 700;
	line-height: 1.15;
	color: #fff;
}

.nobel-search-hero__lead {
	margin: 6px 0 0;
	max-width: 520px;
	font-size: 0.875rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.76);
}

.nobel-search-bar {
	margin-top: 16px;
}

.nobel-search-bar__inner {
	display: flex;
	align-items: stretch;
	gap: 0;
	padding: 5px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(7, 11, 22, 0.14);
}

.nobel-search-bar__field {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	gap: 10px;
	padding: 0 6px 0 16px;
}

.nobel-search-bar__icon {
	flex-shrink: 0;
	color: #94a3b8;
}

.nobel-search-bar__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: var(--nobel-font, "Source Sans 3", sans-serif);
	font-size: 0.95rem;
	color: var(--nobel-ink, #14203a);
	outline: none;
}

.nobel-search-bar__input::placeholder {
	color: #94a3b8;
}

.nobel-search-bar__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	flex: 0 0 auto;
	min-width: 118px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: var(--nobel-burgundy, #7a1f28);
	color: #fff;
	font-family: var(--nobel-font, "Source Sans 3", sans-serif);
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.12s ease;
}

.nobel-search-bar__submit:hover,
.nobel-search-bar__submit:focus {
	background: var(--nobel-burgundy-dark, #641820);
}

.nobel-search-content {
	min-width: 0;
	flex: 0 0 auto;
	height: auto;
	padding: 20px 28px 28px 24px;
}

.nobel-search-content:has(.nobel-search-results) {
	padding: 8px 28px 24px 24px;
}

.nobel-search-main__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

@media (min-width: 981px) {
	.nobel-search-main__toolbar--mobile-only {
		display: none !important;
		margin: 0 !important;
		padding: 0 !important;
		height: 0 !important;
		overflow: hidden;
	}

	.nobel-search-main__toolbar .nobel-search-main__filters-toggle {
		display: none;
	}
}

.nobel-search-main__filters-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border: 1px solid #d4dce8;
	border-radius: 999px;
	background: #fff;
	color: var(--nobel-navy, #0d1b3e);
	font-size: 0.84rem;
	font-weight: 700;
	cursor: pointer;
}

.nobel-search-main__filters-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--nobel-burgundy, #7a1f28);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 800;
}

/* Active filters — override `.pkp_structure_main ul { margin: 1.43rem 0 }` */
body.nobel_theme.pkp_page_search .nobel-search-active {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}

.nobel-search-active__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #dde4ee;
	font-size: 0.78rem;
}

.nobel-search-active__key {
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.62rem;
	color: #64748b;
}

.nobel-search-active__val {
	color: var(--nobel-ink, #14203a);
	font-weight: 600;
}

/* Results */
.nobel-search-results__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Override OJS defaults: `.page_search .search_results`, `.pkp_structure_main ul` */
body.nobel_theme.pkp_page_search .nobel-search-page .search_results,
body.nobel_theme.pkp_page_search .nobel-search-results__list {
	margin: 0;
	padding: 0;
}

body.nobel_theme.pkp_page_search .nobel-search-page .search_results .obj_article_summary {
	margin: 0;
}

.nobel-search-results__item {
	border: 1px solid #dde4ee;
	border-radius: var(--nobel-search-radius);
	background: #fff;
	overflow: visible;
}

.nobel-search-page .publisher_article_card--list {
	margin: 0;
	padding: 18px 20px;
	border-left: 3px solid var(--nobel-burgundy, #7a1f28);
}

.nobel-search-page .publisher_article_card__journal a {
	display: inline-flex;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(122, 31, 40, 0.08);
	color: var(--nobel-burgundy, #7a1f28) !important;
	font-size: 0.65rem;
	font-weight: 700;
	text-decoration: none !important;
	text-transform: uppercase;
}

.nobel-search-page .publisher_article_card--list .title {
	font-family: var(--nobel-serif, "Playfair Display", serif);
	font-size: 1.02rem;
	line-height: 1.35;
}

.nobel-search-page .publisher_article_card--list .title a {
	color: var(--nobel-navy, #0d1b3e) !important;
	text-decoration: none !important;
}

.nobel-search-page .publisher_article_card--list .title a:hover {
	color: var(--nobel-burgundy, #7a1f28) !important;
}

.nobel-search-page .journal_article_link {
	color: var(--nobel-burgundy, #7a1f28) !important;
	font-weight: 700;
}

/* Empty state */
.nobel-search-empty {
	padding: 36px 24px;
	text-align: center;
	border: 1px dashed #d4dce8;
	border-radius: var(--nobel-search-radius);
	background: #fff;
}

.nobel-search-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: rgba(122, 31, 40, 0.08);
	color: var(--nobel-burgundy, #7a1f28);
}

.nobel-search-empty__title {
	margin: 0 0 6px;
	font-family: var(--nobel-serif, "Playfair Display", serif);
	font-size: 1.1rem;
	color: var(--nobel-navy, #0d1b3e);
}

.nobel-search-empty__query {
	margin: 0 0 6px;
	font-weight: 700;
	color: var(--nobel-burgundy, #7a1f28);
}

.nobel-search-empty__hint {
	margin: 0;
	font-size: 0.85rem;
	color: #64748b;
}

/* Intro cards */
.nobel-search-intro__title {
	margin: 0 0 12px;
	font-family: var(--nobel-serif, "Playfair Display", serif);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--nobel-navy, #0d1b3e);
}

.nobel-search-intro__grid {
	display: grid;
	gap: 12px;
}

.nobel-search-page--researchers .nobel-search-intro__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nobel-search-page:not(.nobel-search-page--researchers) .nobel-search-intro__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nobel-search-intro__card {
	padding: 16px 14px;
	border-radius: var(--nobel-search-radius);
	border: 1px solid #dde4ee;
	background: #fff;
	box-shadow: 0 1px 2px rgba(13, 27, 62, 0.03);
}

.nobel-search-intro__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin-bottom: 8px;
	border-radius: 6px;
	background: rgba(122, 31, 40, 0.09);
	color: var(--nobel-burgundy, #7a1f28);
	font-size: 0.65rem;
	font-weight: 800;
}

.nobel-search-intro__card h3 {
	margin: 0 0 5px;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--nobel-navy, #0d1b3e);
}

.nobel-search-intro__card p {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.5;
	color: #64748b;
}

.nobel-search-pagination {
	margin-top: 20px;
	padding-top: 14px;
	border-top: 1px solid #dde4ee;
	font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
	.nobel-search-page--researchers .nobel-search-intro__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 980px) {
	.nobel-search-shell {
		grid-template-columns: 1fr;
		gap: 0;
		padding: 0;
	}

	.nobel-search-filters {
		display: none;
		min-height: 0;
		border-left: 1px solid #dde4ee;
		border-radius: 0;
	}

	.nobel-search-main {
		gap: 0;
		max-width: none;
	}

	.nobel-search-hero {
		border-radius: 0;
		padding: 24px 20px;
	}

	.nobel-search-content {
		padding: 16px 16px 0;
	}

	.nobel-search-content:has(.nobel-search-results) {
		padding: 8px 16px 16px;
	}

	.nobel-search-main__filters-toggle {
		display: inline-flex;
	}

	.nobel-search-filters.is-open {
		display: block;
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 60;
		width: min(360px, 90vw);
		max-height: 100vh;
		overflow: auto;
		margin: 0;
		border-radius: 0;
		box-shadow: 16px 0 40px rgba(13, 27, 62, 0.2);
	}

	.nobel-search-filters.is-open .nobel-search-filters__close {
		display: inline-flex;
	}

	body.nobel-search-filters-open::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 55;
		background: rgba(7, 11, 22, 0.45);
	}

	.nobel-search-page:not(.nobel-search-page--researchers) .nobel-search-intro__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.nobel-search-bar__inner {
		flex-direction: column;
		border-radius: var(--nobel-search-radius);
		padding: 8px;
	}

	.nobel-search-bar__field {
		padding: 0 10px;
	}

	.nobel-search-bar__submit {
		width: 100%;
		min-height: 44px;
		border-radius: 8px;
	}

	.nobel-search-main__toolbar {
		flex-wrap: wrap;
	}
}

body:not(.nobel_theme) .nobel-search-page {
	background: #f9fafb;
}
