/* MuseumPlus Legacy Connector – frontend */

.mplc-collection {
	max-width: none;
	margin: 0;
	padding-left: 1rem;
	padding-right: 1rem;
}

/*
 * Normal width mode: constrain to 1200px so there is a visible difference
 * from Full Width. The bleed track (when active) still expands via negative
 * margin to reach the full viewport regardless of this constraint.
 */
.mplc-collection:not([data-fullwidth="1"]) {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

/*
 * Grid + gallery full-bleed: object list + pagination (not search / controls).
 * Inner track breaks out to the viewport width.
 */
.mplc-gallery-bleed {
	width: 100%;
	max-width: 100%;
}

.mplc-gallery-bleed-track {
	/* 100vw often exceeds the layout width when a vertical scrollbar is present → horizontal scroll. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-left: max(1rem, env(safe-area-inset-left, 0px));
	padding-right: max(1rem, env(safe-area-inset-right, 0px));
	box-sizing: border-box;
}

@supports (width: 100dvw) {
	.mplc-gallery-bleed-track {
		width: 100dvw;
		max-width: 100dvw;
		margin-left: calc(50% - 50dvw);
		margin-right: calc(50% - 50dvw);
	}
}

/*
 * Elementor boxed container (or legacy boxed section): keep the object grid inside
 * the parent content column. Viewport bleed (100vw) only applies in full-width layouts.
 */
.e-con-boxed .mplc-gallery-bleed,
.elementor-section-boxed .mplc-gallery-bleed {
	width: 100%;
	max-width: 100%;
}

.e-con-boxed .mplc-gallery-bleed-track,
.elementor-section-boxed .mplc-gallery-bleed-track {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
	padding-left: 0;
	padding-right: 0;
}

.e-con-boxed .mplc-collection[data-fullwidth="1"],
.elementor-section-boxed .mplc-collection[data-fullwidth="1"] {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.mplc-gallery-bleed-track .mplc-object-list {
	width: 100%;
	box-sizing: border-box;
}

.mplc-collection-toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: stretch;
	margin-bottom: 1.5rem;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.mplc-collection-sort-only {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
	margin: 0 0 1.25rem;
}

.mplc-collection-sort-only .mplc-toolbar-select {
	min-width: 12rem;
}

.mplc-collection-toolbar > .mplc-toolbar-card--filters,
.mplc-collection-toolbar > .mplc-toolbar-aside {
	min-width: 0;
	max-width: 100%;
}

.mplc-toolbar-aside {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	width: 100%;
	box-sizing: border-box;
}

.mplc-toolbar-aside .mplc-toolbar-card {
	width: 100%;
	box-sizing: border-box;
	flex: 1 1 auto;
	min-height: 0;
}

.mplc-toolbar-aside .mplc-toolbar-card--layout {
	flex: 1 1 auto;
}

.mplc-toolbar-aside .mplc-segmented,
.mplc-toolbar-aside .mplc-segmented--compact {
	max-width: 100%;
	width: 100%;
}

.mplc-toolbar-card--filters {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

@media (max-width: 960px) {
	.mplc-collection-toolbar {
		grid-template-columns: minmax(0, 1fr);
	}
}

.mplc-toolbar-card {
	background: var(--mplc-coll-toolbar-bg, #f8fafc);
	border: 1px solid var(--mplc-coll-toolbar-border, #e2e8f0);
	border-radius: 12px;
	padding: 1.25rem 1.375rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mplc-toolbar-card-head {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
	margin: 0 0 0.875rem;
	line-height: 1.4;
	min-height: auto;
	display: block;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--mplc-coll-toolbar-border, #e2e8f0);
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.mplc-toolbar-form--filters {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
}

/* One column = full width of the filters card (avoids truncated Greek labels / select text) */
.mplc-toolbar-filters-body {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	flex: 1 1 auto;
	min-width: 0;
	align-content: start;
	width: 100%;
}

.mplc-toolbar-field--grow {
	width: 100%;
}

.mplc-toolbar-field {
	min-width: 0;
	width: 100%;
}

.mplc-toolbar-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
	margin-bottom: 0.45rem;
	line-height: 1.35;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
}

.mplc-toolbar-label--block {
	margin-bottom: 0.5rem;
}

.mplc-toolbar-input,
.mplc-toolbar-select {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 3rem;
	padding: 0.625rem 0.875rem;
	border: 1px solid var(--mplc-coll-input-border, #cbd5e1);
	border-radius: 8px;
	font-size: 1rem;
	line-height: 1.4;
	background: #fff;
	color: #0f172a;
	box-sizing: border-box;
	overflow: visible;
	text-overflow: clip;
}

.mplc-toolbar-select {
	cursor: pointer;
}

.mplc-toolbar-form--filters > .mplc-btn--primary {
	width: 100%;
	max-width: none;
	flex-shrink: 0;
}

.mplc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.625rem 1.35rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, box-shadow 0.15s ease;
	font-family: inherit;
	line-height: 1.35;
	white-space: normal;
	text-align: center;
}

.mplc-btn--primary {
	background: var(--mplc-coll-btn-bg, #0f766e);
	color: var(--mplc-coll-btn-text, #fff);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.mplc-btn--primary:hover {
	background: var(--mplc-coll-btn-bg-hover, #0d9488);
	color: var(--mplc-coll-btn-text, #fff);
}

.mplc-segmented {
	display: flex;
	width: 100%;
	max-width: 26rem;
	border-radius: 10px;
	border: 1px solid var(--mplc-coll-input-border, #cbd5e1);
	overflow: hidden;
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mplc-toolbar-card--layout .mplc-segment {
	padding-top: 0.85rem;
	padding-bottom: 0.85rem;
	min-height: 3.1rem;
}

.mplc-segmented--compact {
	max-width: 20rem;
}

.mplc-segment {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0.75rem 0.65rem;
	min-height: 3rem;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	color: #475569;
	background: #fff;
	border: none;
	border-right: 1px solid #e2e8f0;
	transition: background 0.15s ease, color 0.15s ease;
	line-height: 1.35;
}

/* View switcher: never hyphenate / break words mid-label */
.mplc-toolbar-card--views .mplc-segment {
	white-space: nowrap;
	hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
	padding: 0.85rem 0.75rem;
	min-height: 3.1rem;
}

@media (max-width: 400px) {
	.mplc-toolbar-card--views .mplc-segment {
		white-space: normal;
		padding: 0.65rem 0.5rem;
		font-size: 0.8125rem;
	}
}

.mplc-segmented .mplc-segment:last-child {
	border-right: none;
}

.mplc-segment:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.mplc-segment.is-active {
	background: var(--mplc-coll-btn-bg, #0f766e);
	color: var(--mplc-coll-btn-text, #fff);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.mplc-segment.is-active:hover {
	color: var(--mplc-coll-btn-text, #fff);
	background: var(--mplc-coll-btn-bg-hover, #0d9488);
}

.mplc-toolbar-layout-row {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	align-items: stretch;
}

.mplc-toolbar-form--layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem 1.25rem;
	margin: 0;
}

.mplc-toolbar-form--layout > .mplc-toolbar-field--inline {
	flex: 1 1 calc(50% - 0.625rem);
	min-width: min(100%, 12.5rem);
	max-width: 100%;
}

.mplc-toolbar-field--inline {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mplc-toolbar-field--fullwidth {
	display: flex;
	flex-direction: column;
	min-width: 0;
	width: 100%;
}

@media (max-width: 520px) {
	.mplc-toolbar-form--layout > .mplc-toolbar-field--inline {
		flex: 1 1 100%;
		min-width: 0;
	}
}

.mplc-object-list {
	display: grid;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/*
 * Grid: target column count via --mplc-grid-columns, but never squeeze below ~10.5rem per card.
 * In a narrow content column, auto-fill shows fewer columns instead of ultra-thin strips.
 */
.mplc-collection[data-view="grid"] .mplc-object-list {
	--mplc-grid-gap: 1.5rem;
	grid-template-columns: repeat(
		auto-fill,
		minmax(
			max(
				10.5rem,
				min(
					100%,
					calc(
						(100% - (var(--mplc-grid-columns, 3) - 1) * var(--mplc-grid-gap)) /
							var(--mplc-grid-columns, 3)
					)
				)
			),
			1fr
		)
	);
}

.mplc-collection[data-view="grid"] .mplc-object-item {
	min-width: 0;
}

/* One frame per object: image + title + mapped fields read as a single unit */
.mplc-collection .mplc-object-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	font-size: var(--mplc-coll-font-size, 1rem);
	color: var(--mplc-coll-text-color, #1e293b);
	border-width: var(--mplc-coll-card-border-width, 1px);
	border-style: solid;
	border-color: var(--mplc-coll-card-border-color, #d8dce3);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.mplc-collection .mplc-object-item:hover .mplc-object-card,
.mplc-collection .mplc-object-card:focus-within {
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
	border-color: var(--mplc-coll-card-border-hover, #c5cad4);
}

.mplc-collection .mplc-object-card .mplc-object-link {
	color: inherit;
}

.mplc-collection .mplc-object-link {
	display: block;
	text-decoration: none;
	color: inherit;
	border: none;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
	flex: 0 0 auto;
}

.mplc-collection .mplc-object-link:hover {
	box-shadow: none;
}

/* contain = full photo visible (tall artifacts); neutral fill in letterboxing */
.mplc-collection[data-view="grid"] .mplc-object-item a.mplc-object-link > img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	object-position: center;
	background: var(--mplc-coll-photo-bg, #f0f0f0);
}

.mplc-collection[data-view="grid"] .mplc-no-image {
	height: auto;
	aspect-ratio: 4 / 3;
	min-height: 9rem;
}

@media (max-width: 768px) {
	.mplc-object-list { grid-template-columns: 1fr !important; }
}

/* Default card image (e.g. list view): contain inside fixed band — no vertical “zoom crop” */
.mplc-collection .mplc-object-item img {
	width: 100%;
	height: 220px;
	object-fit: contain;
	object-position: center;
	background: var(--mplc-coll-photo-bg, #f0f0f0);
	display: block;
}

/* Additional images on single / embedded object */
.mplc-object-extra-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	margin: 1rem 0 1.5rem;
}

.mplc-object-extra-gallery__item {
	display: block;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.mplc-object-extra-gallery__item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.mplc-object-extra-gallery__item img {
	width: 100%;
	height: auto;
	vertical-align: middle;
	display: block;
}

/* Gallery: same idea as grid — min track width so cards stay usable inside narrow themes */
.mplc-collection[data-view="gallery"] .mplc-object-list {
	--mplc-gallery-gap: 1.5rem;
	grid-template-columns: repeat(
		auto-fill,
		minmax(
			max(
				10.5rem,
				min(
					100%,
					calc(
						(100% - (var(--mplc-gallery-columns, 6) - 1) * var(--mplc-gallery-gap)) /
							var(--mplc-gallery-columns, 6)
					)
				)
			),
			1fr
		)
	) !important;
}

.mplc-collection[data-view="gallery"] .mplc-object-item a.mplc-object-link > img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	object-position: center;
	background: var(--mplc-coll-photo-bg, #f0f0f0);
}

.mplc-collection[data-view="gallery"] .mplc-no-image {
	height: auto;
	aspect-ratio: 4 / 3;
	min-height: 9rem;
}

.mplc-collection[data-view="list"] .mplc-object-item a.mplc-object-link > img {
	height: 220px;
	width: 100%;
	object-fit: contain;
	object-position: center;
	background: var(--mplc-coll-photo-bg, #f0f0f0);
}

/* List view layout --------------------------------------------------------- */
/* Without explicit grid-template-columns, implicit auto tracks collapse to   */
/* zero width when children use width:100%. Force a single 1fr column.       */
.mplc-collection[data-view="list"] .mplc-object-list {
	grid-template-columns: 1fr;
}

.mplc-collection[data-view="list"] .mplc-object-item {
	min-width: 0;
}

/* Horizontal card: thumbnail on the left, fields on the right */
.mplc-collection[data-view="list"] .mplc-object-card {
	flex-direction: row;
	align-items: stretch;
	height: auto;
	min-height: 120px;
}

.mplc-collection[data-view="list"] .mplc-object-link {
	flex: 0 0 180px;
	width: 180px;
	max-width: 180px;
}

/* Override the generic 220px fixed height – fill the row height instead */
.mplc-collection[data-view="list"] .mplc-object-item a.mplc-object-link > img {
	height: 100%;
	min-height: 120px;
	width: 100%;
	object-fit: contain;
	object-position: center;
	background: var(--mplc-coll-photo-bg, #f0f0f0);
}

.mplc-collection[data-view="list"] .mplc-no-image {
	height: 100%;
	min-height: 120px;
	width: 100%;
}

.mplc-collection[data-view="list"] .mplc-list-content {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	border-left: 1px solid #e8eaef;
	background: #fafbfc;
}

.mplc-collection[data-view="list"] .mplc-list-heading-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.mplc-collection[data-view="list"] .mplc-list-heading-link .mplc-title {
	padding: 0.85rem 1rem 0.35rem;
}

.mplc-collection[data-view="list"] .mplc-list-heading-link:hover .mplc-title {
	text-decoration: underline;
}

.mplc-collection[data-view="list"] .mplc-card-fields,
.mplc-collection[data-view="list"] .mplc-card-fields--list {
	flex: 1 1 auto;
	min-width: 0;
	border-top: none;
	border-left: none;
}
/* -------------------------------------------------------------------------- */

/* Mapped fields sit inside the same card as the photo (list + gallery) */
.mplc-collection .mplc-card-fields {
	flex: 1 1 auto;
	padding: 0.75rem 1rem 1rem;
	background: #fafbfc;
	border-top: 1px solid #e8eaef;
}

.mplc-collection .mplc-card-fields .mplc-meta {
	margin-top: 0;
	display: block;
}

.mplc-collection .mplc-card-fields .mplc-meta dt,
.mplc-collection .mplc-card-fields .mplc-meta dd {
	display: block;
	margin: 0;
}

.mplc-collection .mplc-card-fields .mplc-meta dt {
	margin-bottom: 0.15rem;
	font-size: var(--mplc-coll-key-label-size, 1em);
}

.mplc-collection .mplc-object-card .mplc-meta-section-heading {
	font-size: var(--mplc-coll-section-title-size, 1.05em);
}

.mplc-collection .mplc-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 220px;
	background: var(--mplc-coll-photo-bg, #e8ecf0);
}

.mplc-collection .mplc-no-image::after {
	content: '';
	display: block;
	width: 3rem;
	height: 3rem;
	opacity: 0.25;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='1.5'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='7.5' r='1'/%3E%3C/svg%3E") center/contain no-repeat;
}

.mplc-no-image {
	display: block;
	width: 100%;
	height: 220px;
	background: #e8ecf0;
}

.mplc-collection .mplc-title,
.mplc-single-object .mplc-title {
	display: block;
	padding: 0.75rem 1rem;
	font-weight: 600;
	font-size: 1em;
	line-height: 1.35;
}

.mplc-collection .mplc-title {
	font-size: var(--mplc-coll-title-size, 1em);
}

.mplc-pagination {
	margin-top: 2rem;
	text-align: center;
}

.mplc-pagination .page-numbers {
	display: inline-block;
	padding: 0.5rem 0.75rem;
	margin: 0 2px;
	text-decoration: none;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.mplc-pagination .page-numbers.current {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.mplc-no-results {
	padding: 2rem;
	text-align: center;
	color: #666;
}

/*
 * Single object featured image: show full photo (contain) but cap size so tall originals
 * do not fill the entire viewport. Override in child theme: --mplc-single-image-max-h / --mplc-single-image-max-w
 */
body.single-museum_object,
body.post-type-museum_object.single {
	/* Defaults match “Medium” preset; single object pages also get inline overrides from Settings. */
	--mplc-single-image-max-h: min(58vh, 560px);
	--mplc-single-image-max-w: min(100%, 680px);
}

/* Single object: use content width (many themes leave a large empty margin) */
.single-museum_object .mplc-single,
.mplc-single.site-main {
	width: 100%;
	max-width: min(100%, 960px);
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
}

.mplc-single .museum-object .entry-content {
	width: 100%;
	max-width: none;
}

.mplc-single .museum-object .mplc-back,
body.single-museum_object .mplc-archive-link-wrap .mplc-back,
body.post-type-museum_object.single .mplc-archive-link-wrap .mplc-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
	min-height: 2.5rem;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	background: var(--mplc-coll-btn-bg, #0f766e);
	color: var(--mplc-coll-btn-text, #fff);
	text-decoration: none;
	font-weight: 600;
	line-height: 1.3;
}

.mplc-single .museum-object .mplc-back:hover,
.mplc-single .museum-object .mplc-back:focus,
body.single-museum_object .mplc-archive-link-wrap .mplc-back:hover,
body.single-museum_object .mplc-archive-link-wrap .mplc-back:focus,
body.post-type-museum_object.single .mplc-archive-link-wrap .mplc-back:hover,
body.post-type-museum_object.single .mplc-archive-link-wrap .mplc-back:focus {
	background: var(--mplc-coll-btn-bg-hover, #0d9488);
	color: var(--mplc-coll-btn-text, #fff);
}

.mplc-single .mplc-featured-image {
	margin: 0 0 1.5rem;
	background: #f5f5f5;
	text-align: center;
	overflow: visible;
	aspect-ratio: unset;
	max-height: none;
}

.mplc-single .mplc-featured-image img {
	display: block;
	width: auto;
	max-width: var(--mplc-single-image-max-w, min(100%, 680px));
	height: auto;
	max-height: var(--mplc-single-image-max-h, min(58vh, 560px));
	margin-left: auto;
	margin-right: auto;
	object-fit: contain;
	object-position: center;
	vertical-align: middle;
}

/*
 * FSE: the block wrapper often gets a fixed aspect-ratio + overflow:hidden + img cover,
 * which crops portrait photos at top/bottom. Reset the container, not only the img.
 */
body.single-museum_object .wp-block-post-featured-image,
body.post-type-museum_object.single .wp-block-post-featured-image,
.single-museum_object .wp-block-post-featured-image,
.post-type-museum_object.single .wp-block-post-featured-image {
	overflow: visible !important;
	aspect-ratio: unset !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	width: 100% !important;
	max-width: 100% !important;
	text-align: center !important;
}

/* Core block: .wp-block-post-featured-image a { height: 100% } stretches into fixed-aspect parents → portrait crop */
body.single-museum_object .wp-block-post-featured-image > a,
body.post-type-museum_object.single .wp-block-post-featured-image > a,
.single-museum_object .wp-block-post-featured-image > a,
.post-type-museum_object.single .wp-block-post-featured-image > a {
	display: inline-block;
	max-width: 100%;
	height: auto !important;
	min-height: 0 !important;
	overflow: visible !important;
	aspect-ratio: unset !important;
	vertical-align: middle;
}

body.single-museum_object .wp-block-post-featured-image img,
body.post-type-museum_object.single .wp-block-post-featured-image img,
.single-museum_object .wp-block-post-featured-image img,
.post-type-museum_object.single .wp-block-post-featured-image img {
	object-fit: contain !important;
	object-position: center !important;
	display: block !important;
	width: auto !important;
	max-width: var(--mplc-single-image-max-w, min(100%, 680px)) !important;
	height: auto !important;
	max-height: var(--mplc-single-image-max-h, min(58vh, 560px)) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	aspect-ratio: unset !important;
}

/* Shortcode / embedded single object card */
.mplc-single-object .mplc-image {
	background: #f5f5f5;
	text-align: center;
}

.mplc-single-object .mplc-image img {
	width: auto;
	max-width: var(--mplc-single-image-max-w, min(100%, 680px));
	height: auto;
	max-height: var(--mplc-single-image-max-h, min(58vh, 560px));
	object-fit: contain;
	object-position: center;
	display: block;
	margin-left: auto;
	margin-right: auto;
	vertical-align: middle;
}

/* Theme-rendered single (e.g. Avada): plugin-injected featured image before post content */
body.single-museum_object .mplc-theme-single-featured,
body.post-type-museum_object.single .mplc-theme-single-featured {
	margin: 0 0 1.5rem;
	background: #f5f5f5;
	text-align: center;
}

body.single-museum_object .mplc-theme-single-featured img,
body.post-type-museum_object.single .mplc-theme-single-featured img {
	width: auto;
	max-width: var(--mplc-single-image-max-w, min(100%, 680px));
	height: auto;
	max-height: var(--mplc-single-image-max-h, min(58vh, 560px));
	object-fit: contain;
	object-position: center;
	display: block;
	margin-left: auto;
	margin-right: auto;
	vertical-align: middle;
}

/* Theme-rendered single: keep each section visually distinct (description, donor/member, etc.). */
body.single-museum_object .mplc-theme-single-section,
body.post-type-museum_object.single .mplc-theme-single-section {
	margin: 1rem 0 1.25rem;
	padding: 0.9rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fafbfc;
}

body.single-museum_object .mplc-theme-single-section__title,
body.post-type-museum_object.single .mplc-theme-single-section__title {
	margin: 0 0 0.55rem;
	font-size: 1.02rem;
	line-height: 1.3;
	font-weight: 650;
}

body.single-museum_object .mplc-theme-single-section__body > :first-child,
body.post-type-museum_object.single .mplc-theme-single-section__body > :first-child {
	margin-top: 0;
}

body.single-museum_object .mplc-theme-single-section__body > :last-child,
body.post-type-museum_object.single .mplc-theme-single-section__body > :last-child {
	margin-bottom: 0;
}

body.single-museum_object .mplc-theme-single-section--gallery .mplc-object-extra-gallery,
body.post-type-museum_object.single .mplc-theme-single-section--gallery .mplc-object-extra-gallery {
	margin: 0;
}

/* Theme single: Global Field Mapping block (same h3/dl structure as collection cards). */
body.single-museum_object .mplc-theme-single-section--gfm .mplc-meta,
body.post-type-museum_object.single .mplc-theme-single-section--gfm .mplc-meta {
	margin-top: 0;
}

/* Each GFM subsection (single view): same boxed look as donor/creator theme sections. */
body.single-museum_object .mplc-theme-single-section--gfm .mplc-theme-single-section--gfm-sub,
body.post-type-museum_object.single .mplc-theme-single-section--gfm .mplc-theme-single-section--gfm-sub {
	margin: 0.65rem 0;
}

body.single-museum_object .mplc-theme-single-section--gfm .mplc-theme-single-section--gfm-sub:first-of-type,
body.post-type-museum_object.single .mplc-theme-single-section--gfm .mplc-theme-single-section--gfm-sub:first-of-type {
	margin-top: 0;
}

.mplc-meta-section-heading {
	font-size: 1.05rem;
	font-weight: 650;
	margin: 1.25rem 0 0.35rem;
	line-height: 1.3;
	color: inherit;
}

.mplc-meta-section-heading:first-child {
	margin-top: 0;
}

.mplc-meta-section-heading + .mplc-meta {
	margin-top: 0.35rem;
}

.mplc-meta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 1.5rem;
	margin-top: 1.5rem;
}

.mplc-meta dt {
	font-weight: 600;
}

/* First field in a section: hide duplicate label when it matches the section h3 (keep sr-only dt for semantics). */
.mplc-meta dt.mplc-dt-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mplc-meta dt.mplc-dt-sr-only + dd {
	grid-column: 1 / -1;
}

.mplc-meta dd {
	margin: 0;
	white-space: pre-line;
}

.mplc-meta--legacy-supplement {
	margin-top: 1.25rem;
}

.mplc-creator-card {
	margin-top: 1.25rem;
	padding: 1rem 1.125rem;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #f8fafc;
}

body.single-museum_object .mplc-creator-card,
body.post-type-museum_object.single .mplc-creator-card {
	margin: 1rem 0 1.25rem;
	padding: 0.9rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fafbfc;
}

.mplc-creator-card--embedded {
	margin-top: 1rem;
}

.mplc-creator-card__title {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	line-height: 1.35;
	color: #0f172a;
}

body.single-museum_object .mplc-creator-card__title,
body.post-type-museum_object.single .mplc-creator-card__title {
	margin: 0 0 0.55rem;
	font-size: 1.02rem;
	line-height: 1.3;
	font-weight: 650;
	color: inherit;
}

.mplc-meta--creator {
	margin-top: 0;
}

/* Single-object image lightbox (zoom + rotate). */
body.single-museum_object .mplc-featured-image img,
body.single-museum_object .mplc-theme-single-featured img,
body.single-museum_object .mplc-object-extra-gallery__item img,
body.post-type-museum_object.single .mplc-featured-image img,
body.post-type-museum_object.single .mplc-theme-single-featured img,
body.post-type-museum_object.single .mplc-object-extra-gallery__item img {
	cursor: zoom-in;
}

.mplc-lightbox-open {
	overflow: hidden;
}

.mplc-lightbox-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
}

.mplc-lightbox-modal.is-open {
	display: block;
}

.mplc-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 24, 0.84);
}

.mplc-lightbox-panel {
	position: relative;
	width: min(96vw, 1300px);
	height: min(92vh, 900px);
	margin: 3vh auto;
	background: rgba(16, 23, 31, 0.82);
	border-radius: 14px;
	border: 1px solid rgba(226, 232, 240, 0.22);
	overflow: hidden;
}

.mplc-lightbox-toolbar {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	background: rgba(2, 6, 23, 0.56);
	border-bottom: 1px solid rgba(226, 232, 240, 0.22);
}

.mplc-lightbox-btn {
	min-width: 36px;
	height: 36px;
	border: 1px solid rgba(226, 232, 240, 0.38);
	background: rgba(255, 255, 255, 0.06);
	color: #f8fafc;
	border-radius: 8px;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
}

.mplc-lightbox-btn--close {
	margin-left: auto;
}

.mplc-lightbox-image-wrap {
	height: calc(100% - 58px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow: auto;
}

.mplc-lightbox-image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	transform-origin: center center;
	transition: transform 0.12s ease-out;
}

.mplc-theme-single-section--model .mplc-theme-single-section__body {
	padding-top: 10px;
}

.mplc-model-viewer-wrap {
	position: relative;
	width: 100%;
	max-width: min(100%, 900px);
	margin: 0 auto;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	background: #f8fafc;
}

.mplc-model-viewer {
	display: block;
	width: 100%;
	height: min(70vh, 640px);
	background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.mplc-model-viewer-status {
	margin-top: 8px;
	font-size: 13px;
	color: #334155;
}

.mplc-model-viewer-status.is-error {
	color: #b42318;
	font-weight: 600;
}

.mplc-model-viewer-link {
	margin: 8px 0 0;
	font-size: 13px;
}

.mplc-model-viewer-toolbar {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 8px;
}

.mplc-model-viewer-fullscreen {
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #0f172a;
	border-radius: 8px;
	padding: 6px 10px;
	cursor: pointer;
}

.mplc-single-media-tabs {
	display: inline-flex;
	gap: 8px;
	margin: 0 0 12px;
}

.mplc-single-media-tab {
	border: 1px solid #cbd5e1;
	background: #f8fafc;
	color: #0f172a;
	border-radius: 999px;
	padding: 7px 14px;
	cursor: pointer;
}

.mplc-single-media-tab.is-active {
	background: #0f172a;
	color: #fff;
	border-color: #0f172a;
}

