/* Media Cover Viewer — Arcviewpost Custom Widget */

.arcviewpost-media-cover-viewer,
.arcviewpost-media-cover-viewer *,
.arcviewpost-media-cover-viewer *::before,
.arcviewpost-media-cover-viewer *::after {
	box-sizing: border-box;
}

.arcviewpost-media-cover-viewer {
	display: block;
	max-width: 100%;
}

.arcviewpost-mcv-placeholder {
	padding: 1.5rem;
	text-align: center;
	color: #666;
	border: 1px dashed #ccc;
}

.arcviewpost-mcv-trigger {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	text-align: inherit;
	font: inherit;
	color: inherit;
	-webkit-appearance: none;
	appearance: none;
}

.arcviewpost-mcv-trigger:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 2px;
}

.arcviewpost-mcv-cover {
	position: relative;
	display: block;
	overflow: hidden;
	max-width: 100%;
}

.arcviewpost-mcv-cover img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
}

.arcviewpost-mcv-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition-property: opacity;
	transition-timing-function: ease;
	pointer-events: none;
}

.arcviewpost-mcv-label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition-property: opacity;
	transition-timing-function: ease;
	pointer-events: none;
	z-index: 1;
}

.arcviewpost-mcv-label-inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	line-height: 1.2;
}

.arcviewpost-mcv-label-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.arcviewpost-mcv-label-icon svg {
	display: block;
}

.arcviewpost-mcv-label-text {
	line-height: 1.2;
}

/* Label position modifiers */
.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-center-center {
	align-items: center;
	justify-content: center;
}

.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-top-center {
	align-items: flex-start;
	justify-content: center;
	padding-top: 1.5rem;
}

.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-bottom-center {
	align-items: flex-end;
	justify-content: center;
	padding-bottom: 1.5rem;
}

.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-center-left {
	align-items: center;
	justify-content: flex-start;
	padding-left: 1.5rem;
}

.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-center-right {
	align-items: center;
	justify-content: flex-end;
	padding-right: 1.5rem;
}

.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-top-left {
	align-items: flex-start;
	justify-content: flex-start;
	padding: 1.5rem 0 0 1.5rem;
}

.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-top-right {
	align-items: flex-start;
	justify-content: flex-end;
	padding: 1.5rem 1.5rem 0 0;
}

.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-bottom-left {
	align-items: flex-end;
	justify-content: flex-start;
	padding: 0 0 1.5rem 1.5rem;
}

.arcviewpost-mcv-label.arcviewpost-mcv-label-pos-bottom-right {
	align-items: flex-end;
	justify-content: flex-end;
	padding: 0 1.5rem 1.5rem 0;
}

.arcviewpost-mcv-trigger:hover .arcviewpost-mcv-overlay,
.arcviewpost-mcv-trigger:focus-visible .arcviewpost-mcv-overlay,
.arcviewpost-mcv-trigger:hover .arcviewpost-mcv-label,
.arcviewpost-mcv-trigger:focus-visible .arcviewpost-mcv-label {
	opacity: 1;
}

/* Tablet & mobile: always show overlay and label (no hover required). */
@media (max-width: 1024px) {
	.arcviewpost-mcv-overlay,
	.arcviewpost-mcv-label {
		opacity: 1;
	}
}

/* Lightbox */
.arcviewpost-mcv-lightbox {
	--arcviewpost-mcv-anim-duration: 300ms;
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity var(--arcviewpost-mcv-anim-duration) ease, visibility var(--arcviewpost-mcv-anim-duration) ease;
}

.arcviewpost-mcv-lightbox.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.arcviewpost-mcv-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.85);
}

.arcviewpost-mcv-lightbox-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	transform: translateY(0) scale(1);
	opacity: 1;
	transition: transform var(--arcviewpost-mcv-anim-duration) ease, opacity var(--arcviewpost-mcv-anim-duration) ease;
}

.arcviewpost-mcv-lightbox:not(.is-open) .arcviewpost-mcv-lightbox-dialog {
	opacity: 0;
}

.arcviewpost-mcv-lightbox--fade:not(.is-open) .arcviewpost-mcv-lightbox-dialog {
	opacity: 0;
}

.arcviewpost-mcv-lightbox--zoom-in:not(.is-open) .arcviewpost-mcv-lightbox-dialog {
	transform: scale(0.92);
	opacity: 0;
}

.arcviewpost-mcv-lightbox--slide-up:not(.is-open) .arcviewpost-mcv-lightbox-dialog {
	transform: translateY(24px);
	opacity: 0;
}

.arcviewpost-mcv-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #ffffff;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, border-radius 0.25s ease;
	-webkit-appearance: none;
	appearance: none;
}

.arcviewpost-mcv-close-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 18px;
}

.arcviewpost-mcv-close-icon svg {
	display: block;
}

.arcviewpost-mcv-close:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 2px;
}

.arcviewpost-mcv-lightbox-content {
	position: relative;
	width: 100%;
	line-height: 0;
}

.arcviewpost-mcv-lightbox-content img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 80px);
	object-fit: contain;
	margin: 0 auto;
}

.arcviewpost-mcv-lightbox-content iframe,
.arcviewpost-mcv-lightbox-content video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	background: #000;
}

.arcviewpost-mcv-lightbox-content video {
	height: auto;
	max-height: calc(100vh - 80px);
}

body.arcviewpost-mcv-lightbox-open {
	overflow: hidden;
}
