/**
 * Visor d’imatges (només a les entrades i pàgines amb fotos enllaçades).
 */
html.ccc-lightbox-obert {
	overflow: hidden;
}

.ccc-lightbox {
	padding: 0;
	margin: 0;
	border: 0;
	width: 100vw;
	max-width: none;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	background: rgb(24 25 29 / 96%);
	color: #fbf9f8;
	overscroll-behavior: contain;
}

.ccc-lightbox::backdrop {
	background: rgb(24 25 29 / 70%);
}

.ccc-lightbox__marc {
	box-sizing: border-box;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	padding: 3.75rem clamp(0.75rem, 6vw, 5rem) 1.5rem;
}

.ccc-lightbox__figura {
	margin: 0;
	display: grid;
	justify-items: center;
	gap: 0.85rem;
	max-width: 100%;
	max-height: 100%;
}

.ccc-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: calc(100dvh - 10rem);
	width: auto;
	height: auto;
	object-fit: contain;
	background: #111;
	box-shadow: 0 10px 40px rgb(0 0 0 / 45%);
	touch-action: pan-y;
}

.ccc-lightbox__peu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: baseline;
	gap: 0.25rem 1rem;
	max-width: 64ch;
	text-align: center;
	font-size: var(--wp--preset--font-size--small, 1rem);
	line-height: 1.4;
	color: #fbf9f8;
}

.ccc-lightbox__compte {
	font-family: var(--wp--custom--font--ma, Caveat, cursive);
	font-size: 1.35rem;
	font-weight: 700;
	color: #f2b8c6;
}

.ccc-lightbox__compte:empty {
	display: none;
}

.ccc-lightbox__original {
	color: #fbf9f8;
	font-size: var(--wp--preset--font-size--x-small, 0.875rem);
	opacity: 0.85;
}

.ccc-lightbox__original:hover,
.ccc-lightbox__original:focus-visible {
	color: #fff;
	opacity: 1;
}

.ccc-lightbox__boto {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fbf9f8;
	color: var(--wp--preset--color--accent-1, #99042e);
	font-size: 1.9rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 14px rgb(0 0 0 / 35%);
}

.ccc-lightbox__boto:hover {
	background: var(--wp--preset--color--accent-1, #99042e);
	color: #fff;
}

.ccc-lightbox__boto:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.ccc-lightbox__boto[hidden] {
	display: none;
}

.ccc-lightbox__tanca {
	top: 0.75rem;
	right: 0.75rem;
}

.ccc-lightbox__anterior,
.ccc-lightbox__seguent {
	top: 50%;
	transform: translateY(-50%);
}

.ccc-lightbox__anterior {
	left: 0.75rem;
}

.ccc-lightbox__seguent {
	right: 0.75rem;
}

@media (max-width: 47.99em) {
	.ccc-lightbox__anterior,
	.ccc-lightbox__seguent {
		top: auto;
		bottom: 0.75rem;
		transform: none;
	}

	.ccc-lightbox__marc {
		padding-bottom: 4.5rem;
	}
}
