/* Photo Gallery Core — stili frontend. Le variabili --pgc-* arrivano dalle impostazioni della galleria. */

.pgc-gallery {
	--pgc-cols: 4;
	--pgc-cols-mobile: 2;
	--pgc-gap: 8px;
	--pgc-row-h: 240px;
	--pgc-radius: 4px;
	margin: 1.5em 0;
}

.pgc-gallery *,
.pgc-gallery *::before,
.pgc-gallery *::after {
	box-sizing: border-box;
}

.pgc-items {
	position: relative;
}

.pgc-item {
	margin: 0;
	padding: 0;
	min-width: 0;
}

.pgc-link {
	display: block;
	position: relative;
	color: inherit;
	text-decoration: none;
	border-radius: var(--pgc-radius);
	outline-offset: 3px;
}

.pgc-frame {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: var(--pgc-radius);
	background: rgba(127, 127, 127, .12);
}

.pgc-frame img.pgc-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform .35s ease, opacity .25s ease;
}

/* Effetti al passaggio del mouse */
.pgc-hover-zoom .pgc-link:hover .pgc-img,
.pgc-hover-zoom .pgc-link:focus-visible .pgc-img {
	transform: scale(1.05);
}

.pgc-hover-lift .pgc-link {
	transition: transform .25s ease, box-shadow .25s ease;
}

.pgc-hover-lift .pgc-link:hover,
.pgc-hover-lift .pgc-link:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.pgc-hover-fade .pgc-items:hover .pgc-img {
	opacity: .6;
}

.pgc-hover-fade .pgc-items .pgc-link:hover .pgc-img {
	opacity: 1;
}

/* Titolo in sovrimpressione */
.pgc-overlay {
	position: absolute;
	inset: auto 0 0 0;
	padding: 2.5em .8em .7em;
	border-radius: 0 0 var(--pgc-radius) var(--pgc-radius);
	background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
	color: #fff;
	font-size: .9em;
	line-height: 1.3;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .25s ease;
	pointer-events: none;
}

.pgc-link:hover .pgc-overlay,
.pgc-link:focus-visible .pgc-overlay {
	opacity: 1;
	transform: none;
}

@media (hover: none) {
	.pgc-captions-hover .pgc-overlay {
		opacity: 1;
		transform: none;
	}
}

.pgc-title {
	font-weight: 600;
}

/* Didascalia sotto */
.pgc-caption {
	padding: .45em .1em 0;
	font-size: .9em;
	line-height: 1.35;
}

.pgc-caption strong {
	display: block;
}

.pgc-caption span {
	display: block;
	opacity: .75;
}

.pgc-actions {
	display: flex;
	align-items: center;
	gap: .5em;
	padding-top: .4em;
}

/* ---------- Vista griglia ---------- */

.pgc-view-grid .pgc-items {
	display: grid;
	grid-template-columns: repeat(var(--pgc-cols), minmax(0, 1fr));
	gap: var(--pgc-gap);
}

.pgc-aspect-1-1 .pgc-frame { aspect-ratio: 1 / 1; }
.pgc-aspect-4-3 .pgc-frame { aspect-ratio: 4 / 3; }
.pgc-aspect-3-2 .pgc-frame { aspect-ratio: 3 / 2; }
.pgc-aspect-16-9 .pgc-frame { aspect-ratio: 16 / 9; }
.pgc-aspect-original .pgc-frame { aspect-ratio: var(--pgc-ratio, 1); }
.pgc-aspect-original .pgc-items { align-items: start; }

/* ---------- Vista masonry ---------- */

.pgc-view-masonry .pgc-item,
.pgc-view-masonry .pgc-sizer {
	width: calc((100% - (var(--pgc-cols) - 1) * var(--pgc-gap)) / var(--pgc-cols));
}

.pgc-view-masonry .pgc-item {
	margin-bottom: var(--pgc-gap);
}

.pgc-view-masonry .pgc-frame img.pgc-img {
	height: auto;
}

/* Prima che Masonry parta (o senza JS): righe semplici */
.pgc-view-masonry:not(.pgc-ready) .pgc-items {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0 var(--pgc-gap);
}

.pgc-view-masonry:not(.pgc-ready) .pgc-sizer {
	display: none;
}

/* ---------- Vista justified (righe ad altezza uguale) ---------- */

.pgc-view-justified .pgc-items {
	display: flex;
	flex-wrap: wrap;
	gap: var(--pgc-gap);
}

.pgc-view-justified .pgc-items::after {
	content: "";
	flex-grow: 999999;
}

.pgc-view-justified .pgc-item {
	flex-grow: calc(var(--pgc-ratio, 1) * 100);
	width: calc(var(--pgc-ratio, 1) * var(--pgc-row-h));
}

.pgc-view-justified .pgc-frame {
	aspect-ratio: var(--pgc-ratio, 1);
}

/* Layout calcolato in JS: larghezze esatte, nessuna crescita flex */
.pgc-justified-js .pgc-items::after {
	display: none;
}

.pgc-gallery.pgc-justified-js .pgc-item {
	flex: 0 0 auto;
}

/* ---------- Vista mosaico ---------- */

.pgc-view-mosaic .pgc-items {
	display: grid;
	grid-template-columns: repeat(var(--pgc-cols), minmax(0, 1fr));
	grid-auto-rows: var(--pgc-cell, 200px);
	grid-auto-flow: dense;
	gap: var(--pgc-gap);
}

.pgc-view-mosaic .pgc-item {
	position: relative;
	min-height: 0;
}

.pgc-view-mosaic .pgc-link,
.pgc-view-mosaic .pgc-frame {
	height: 100%;
}

.pgc-view-mosaic .pgc-wide { grid-column: span 2; }
.pgc-view-mosaic .pgc-tall { grid-row: span 2; }
.pgc-view-mosaic .pgc-big { grid-column: span 2; grid-row: span 2; }

.pgc-view-mosaic .pgc-caption {
	display: none; /* Nel mosaico la didascalia sotto romperebbe la griglia: usa il passaggio del mouse. */
}

/* ---------- Vista carosello ---------- */

.pgc-carousel {
	position: relative;
}

.pgc-view-carousel .pgc-items {
	display: flex;
	gap: var(--pgc-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

.pgc-view-carousel .pgc-items::-webkit-scrollbar {
	display: none;
}

.pgc-view-carousel .pgc-item {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.pgc-view-carousel .pgc-frame {
	height: var(--pgc-slide-h);
	width: auto;
	max-width: 85vw;
}

/* La didascalia non deve allargare la slide */
.pgc-view-carousel .pgc-caption {
	width: 0;
	min-width: 100%;
}

.pgc-nav {
	position: absolute;
	top: calc(var(--pgc-slide-h) / 2);
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #1d2327;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
	transition: opacity .2s ease, transform .2s ease;
}

.pgc-nav:hover {
	transform: scale(1.08);
}

.pgc-nav[disabled] {
	opacity: 0;
	pointer-events: none;
}

.pgc-prev { left: 10px; }
.pgc-next { right: 10px; }

/* ---------- Vista slideshow ---------- */

.pgc-view-slideshow .pgc-stage {
	position: relative;
	height: var(--pgc-slide-h);
	border-radius: var(--pgc-radius);
	overflow: hidden;
	background: #111;
}

.pgc-view-slideshow.pgc-has-thumbs .pgc-stage {
	height: calc(var(--pgc-slide-h) + 110px);
}

/* Prima che lo slideshow parta (o senza JS) le foto restano visibili come griglia */
.pgc-view-slideshow .pgc-items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: var(--pgc-gap);
}

.pgc-view-slideshow .pgc-frame {
	aspect-ratio: 1;
}

.pgc-view-slideshow.pgc-ready .pgc-items {
	display: none;
}

.pgc-view-slideshow:not(.pgc-ready) .pgc-stage {
	display: none;
}

.pgc-view-slideshow .lg-container,
.pgc-view-slideshow .lg-outer {
	border-radius: var(--pgc-radius);
}

/* ---------- Vista blog ---------- */

.pgc-view-blog .pgc-items {
	display: flex;
	flex-direction: column;
	gap: calc(var(--pgc-gap) * 4 + 16px);
	max-width: var(--pgc-blog-w);
	margin-inline: auto;
}

.pgc-view-blog .pgc-frame {
	aspect-ratio: var(--pgc-ratio, 1.5);
	max-height: 85vh;
}

.pgc-view-blog .pgc-frame img.pgc-img {
	object-fit: contain;
	background: rgba(127, 127, 127, .08);
}

.pgc-view-blog .pgc-caption {
	padding-top: .9em;
}

.pgc-view-blog .pgc-caption-title {
	margin: 0 0 .3em;
	font-size: 1.35em;
	line-height: 1.25;
}

.pgc-view-blog .pgc-caption-text {
	margin: 0;
	opacity: .85;
	line-height: 1.6;
}

/* ---------- Smartphone ---------- */

@media (max-width: 600px) {
	.pgc-view-grid .pgc-items {
		grid-template-columns: repeat(var(--pgc-cols-mobile), minmax(0, 1fr));
	}

	.pgc-view-masonry .pgc-item,
	.pgc-view-masonry .pgc-sizer {
		width: calc((100% - (var(--pgc-cols-mobile) - 1) * var(--pgc-gap)) / var(--pgc-cols-mobile));
	}

	.pgc-view-mosaic .pgc-items {
		grid-template-columns: repeat(var(--pgc-cols-mobile), minmax(0, 1fr));
	}

	.pgc-view-mosaic .pgc-big {
		grid-column: span min(2, var(--pgc-cols-mobile));
	}

	.pgc-view-carousel .pgc-frame,
	.pgc-view-slideshow .pgc-stage {
		--pgc-slide-h-m: calc(var(--pgc-slide-h) * .65);
	}

	.pgc-view-carousel .pgc-frame {
		height: var(--pgc-slide-h-m);
	}

	.pgc-view-slideshow .pgc-stage {
		height: var(--pgc-slide-h-m);
	}

	.pgc-view-slideshow.pgc-has-thumbs .pgc-stage {
		height: calc(var(--pgc-slide-h-m) + 90px);
	}

	.pgc-nav {
		top: calc(var(--pgc-slide-h) * .65 / 2);
		width: 36px;
		height: 36px;
		margin-top: -18px;
		font-size: 24px;
	}

	.pgc-view-justified:not(.pgc-justified-js) .pgc-item {
		width: calc(var(--pgc-ratio, 1) * var(--pgc-row-h) * .6);
	}
}

/* ---------- Carica altre ---------- */

.pgc-more-wrap {
	margin-top: 1.25em;
	text-align: center;
}

.pgc-more {
	cursor: pointer;
	padding: .7em 1.6em;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
}

.pgc-more:hover {
	background: rgba(127, 127, 127, .12);
}

.pgc-more[disabled] {
	opacity: .6;
	cursor: progress;
}

.pgc-item.pgc-new {
	animation: pgc-fade-in .4s ease both;
}

@keyframes pgc-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pgc-frame img.pgc-img,
	.pgc-overlay,
	.pgc-item.pgc-new {
		transition: none;
		animation: none;
	}
}

.pgc-empty,
.pgc-notice {
	padding: 1em;
	border: 1px dashed rgba(127, 127, 127, .5);
	border-radius: 4px;
	text-align: center;
}

/* Didascalia nel lightbox */
.pgc-lb-caption h4 {
	margin: 0 0 .25em;
	color: #fff;
	font-size: 1.05em;
}

.pgc-lb-caption p {
	margin: 0;
	color: rgba(255, 255, 255, .85);
}

/* ================================================================== */
/* Barra "cerca / ordina"                                             */
/* ================================================================== */

.pgc-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.pgc-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6em 1em;
	margin-bottom: 1em;
}

.pgc-search {
	position: relative;
	flex: 1 1 260px;
	max-width: 420px;
}

.pgc-search svg {
	position: absolute;
	left: .75em;
	top: 50%;
	transform: translateY(-50%);
	opacity: .5;
	pointer-events: none;
}

.pgc-gallery .pgc-search input {
	width: 100%;
	margin: 0;
	padding: .6em .9em .6em 2.4em;
	border: 1px solid rgba(127, 127, 127, .4);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .95em;
	line-height: 1.3;
}

.pgc-gallery .pgc-search input:focus {
	outline: 2px solid currentColor;
	outline-offset: 1px;
	border-color: transparent;
}

.pgc-sort {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font-size: .95em;
}

.pgc-gallery .pgc-sort select {
	margin: 0;
	padding: .5em 2em .5em .9em;
	border: 1px solid rgba(127, 127, 127, .4);
	border-radius: 999px;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right .9em center;
	color: inherit;
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.pgc-results {
	margin-left: auto;
	font-size: .9em;
	opacity: .75;
}

.pgc-gallery.pgc-loading .pgc-items {
	opacity: .45;
	transition: opacity .2s ease;
	pointer-events: none;
}

/* Link alla pagina della foto dentro il lightbox */
.pgc-lb-caption .pgc-lb-permalink {
	display: inline-block;
	margin-top: .5em;
	padding: .35em .9em;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 999px;
	color: #fff;
	font-size: .85em;
	text-decoration: none;
}

.pgc-lb-caption .pgc-lb-permalink:hover {
	background: rgba(255, 255, 255, .15);
	color: #fff;
}

/* ================================================================== */
/* Pagina della foto                                                  */
/* ================================================================== */

.pgc-entry-page {
	margin: 1em 0 2em;
}

.pgc-entry-topbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: .5em 1em;
	margin-bottom: 1em;
	font-size: .95em;
}

.pgc-back {
	text-decoration: none;
}

.pgc-back:hover {
	text-decoration: underline;
}

.pgc-entry-pos {
	opacity: .7;
}

.pgc-view-entry {
	margin: 0;
}

.pgc-entry-figure {
	margin: 0;
	text-align: center;
}

.pgc-entry-figure .pgc-link {
	display: inline-block;
	position: relative;
	max-width: 100%;
	border-radius: var(--pgc-radius, 4px);
	cursor: zoom-in;
}

.pgc-entry-figure img.pgc-entry-img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 80vh;
	margin: 0 auto;
	border-radius: 4px;
}

.pgc-entry-zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	opacity: .85;
	transition: opacity .2s ease;
}

.pgc-entry-figure .pgc-link:hover .pgc-entry-zoom {
	opacity: 1;
}

.pgc-entry-desc {
	max-width: 70ch;
	margin: 1.2em auto 0;
	line-height: 1.6;
}

.pgc-entry-desc p {
	margin: 0 0 .8em;
}

.pgc-entry-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .6em;
	margin: 1.2em 0 0;
}

.pgc-share {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: .5em;
	margin: 1.5em 0 0;
}

.pgc-share-label {
	margin-right: .3em;
	font-size: .9em;
	opacity: .75;
}

.pgc-share-btn {
	display: inline-flex;
	align-items: center;
	padding: .45em 1em;
	border: 1px solid rgba(127, 127, 127, .4);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .9em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.pgc-share-btn:hover {
	background: rgba(127, 127, 127, .12);
	text-decoration: none;
}

.pgc-share-btn[hidden] {
	display: none;
}

.pgc-share-copy.is-done {
	border-color: #1a7f37;
	color: #1a7f37;
}

.pgc-entry-nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1em;
	margin-top: 2em;
	padding-top: 1.5em;
	border-top: 1px solid rgba(127, 127, 127, .25);
}

.pgc-entry-nav-card {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: .8em;
	padding: .5em;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
	transition: background .15s ease;
}

.pgc-entry-nav-card:hover {
	background: rgba(127, 127, 127, .1);
	text-decoration: none;
}

.pgc-entry-next {
	flex-direction: row-reverse;
	text-align: right;
}

.pgc-entry-nav-card img {
	flex: none;
	width: 64px;
	height: 64px;
	margin: 0;
	border-radius: 6px;
	object-fit: cover;
}

.pgc-entry-nav-text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.pgc-entry-nav-label {
	font-size: .8em;
	opacity: .7;
}

.pgc-entry-nav-title {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.pgc-results {
		margin-left: 0;
		flex-basis: 100%;
	}

	.pgc-entry-nav-card img {
		width: 44px;
		height: 44px;
	}

	.pgc-entry-nav {
		gap: .4em;
	}

	.pgc-entry-nav-card {
		gap: .5em;
		padding: .4em;
	}

	.pgc-entry-nav-label {
		white-space: nowrap;
	}
}

/* ================================================================== */
/* Raccolte                                                           */
/* ================================================================== */

.pgc-album {
	margin: 1.5em 0;
}

.pgc-album [hidden] {
	display: none !important;
}

.pgc-album-carousel {
	--pgc-card-w: 300px;
	--pgc-card-ratio: 1.3333;
	margin: 0;
}

.pgc-album-carousel .pgc-items {
	justify-content: safe center;
	padding: 6px 2px 10px; /* spazio per l'ombra dell'effetto "solleva" */
}

.pgc-album-carousel.pgc-view-carousel .pgc-item {
	width: min(var(--pgc-card-w), 80vw);
}

.pgc-album-carousel.pgc-view-carousel .pgc-frame {
	width: 100%;
	max-width: none;
	height: auto;
	aspect-ratio: var(--pgc-card-ratio);
}

.pgc-album-carousel .pgc-frame img.pgc-img {
	object-fit: cover;
}

.pgc-album-carousel .pgc-nav {
	top: calc(6px + min(var(--pgc-card-w), 80vw) / var(--pgc-card-ratio) / 2);
}

.pgc-album-link {
	display: block;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.pgc-album-link:hover,
.pgc-album-link:focus {
	color: inherit;
	text-decoration: none;
}

.pgc-album-link[aria-busy="true"] .pgc-frame::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, .45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23333' stroke-width='5' stroke-dasharray='90 40'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center no-repeat;
}

.pgc-album-nocover {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(127, 127, 127, .15), rgba(127, 127, 127, .3));
}

.pgc-album-count,
.pgc-album-draft {
	position: absolute;
	right: .6em;
	bottom: .6em;
	padding: .2em .7em;
	border-radius: 999px;
	background: rgba(0, 0, 0, .62);
	color: #fff;
	font-size: .8em;
	font-weight: 600;
	line-height: 1.5;
	backdrop-filter: blur(4px);
}

.pgc-album-draft {
	right: auto;
	left: .6em;
	background: #b32d2e;
}

.pgc-album-text {
	display: block;
	padding: .75em .15em 0;
}

.pgc-album-title {
	display: block;
	font-size: 1.1em;
	font-weight: 600;
	line-height: 1.3;
}

.pgc-album-summary {
	display: -webkit-box;
	margin-top: .3em;
	overflow: hidden;
	font-size: .92em;
	line-height: 1.45;
	opacity: .75;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.pgc-album.pgc-loading .pgc-album-list {
	cursor: progress;
}

/* Galleria aperta */
.pgc-album-stage {
	animation: pgc-fade-in .35s ease both;
}

.pgc-album-stagebar {
	margin-bottom: 1.2em;
}

.pgc-album-back {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	padding: .5em 1.15em;
	border: 1px solid rgba(127, 127, 127, .45);
	border-radius: 999px;
	color: inherit;
	font-size: .95em;
	line-height: 1.3;
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease;
}

.pgc-album-back:hover,
.pgc-album-back:focus-visible {
	background: rgba(127, 127, 127, .12);
	border-color: currentColor;
	color: inherit;
	text-decoration: none;
}

.pgc-album-intro {
	margin-bottom: 1.2em;
}

.pgc-album-gtitle {
	margin: 0 0 .25em;
	outline: none;
}

.pgc-album-gsummary {
	margin: 0;
	max-width: 70ch;
	opacity: .8;
}

.pgc-album-bottom {
	margin-top: 2em;
	text-align: center;
}

.pgc-album-stage .pgc-gallery {
	margin-top: 0;
}

.pgc-gallery-summary {
	max-width: 70ch;
	margin: 0 0 1.2em;
	opacity: .85;
}

@media (max-width: 600px) {
	.pgc-album-carousel.pgc-view-carousel .pgc-frame {
		height: auto;
	}

	.pgc-album-carousel .pgc-nav {
		top: calc(6px + min(var(--pgc-card-w), 80vw) / var(--pgc-card-ratio) / 2);
	}
}

/* ================================================================== */
/* Azioni nel lightbox (condividi, e nel concorso: vota)              */
/* ================================================================== */

.pgc-share-native {
	display: none !important;
}

.pgc-can-share .pgc-share-native {
	display: inline-flex !important;
}

.pgc-lb-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .45em;
	margin-top: .75em;
}

.pgc-lb-btn {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	margin: 0;
	padding: .45em 1em;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
	color: #fff;
	font: inherit;
	font-size: 13px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
	-webkit-tap-highlight-color: transparent;
}

.pgc-lb-btn:hover,
.pgc-lb-btn:focus-visible {
	background: rgba(255, 255, 255, .18);
	border-color: #fff;
	color: #fff;
	text-decoration: none;
}

.pgc-lb-btn.is-done {
	border-color: #5ad07a;
	color: #5ad07a;
}

/* Il testo del lightbox con i pulsanti: un po' più di respiro in basso */
.lg-sub-html .pgc-lb-caption {
	padding-bottom: .2em;
}

@media (max-width: 600px) {
	.pgc-lb-actions {
		gap: .35em;
	}

	.pgc-lb-btn {
		padding: .5em .85em;
		font-size: 12.5px;
	}

	/* Su smartphone c'è "Condividi" del telefono: bastano quello e "Copia link". */
	.pgc-can-share .pgc-lb-whatsapp,
	.pgc-can-share .pgc-lb-facebook {
		display: none;
	}
}

/* ================================================================== */
/* Galleria riservata (password) e blocco download                    */
/* ================================================================== */

.pgc-locked {
	max-width: 440px;
	margin: 2em auto;
	padding: 2em 1.5em;
	border: 1px solid rgba(127, 127, 127, .3);
	border-radius: 12px;
	text-align: center;
}

.pgc-locked-icon {
	opacity: .55;
}

.pgc-locked-title {
	margin: .4em 0 .2em;
	font-size: 1.15em;
	font-weight: 600;
}

.pgc-locked-text {
	margin: 0 0 1em;
	opacity: .8;
}

.pgc-locked-form {
	display: flex;
	gap: .5em;
}

.pgc-locked-form input[type="password"] {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: .65em .9em;
	border: 1px solid rgba(127, 127, 127, .5);
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font: inherit;
}

.pgc-locked-form button {
	margin: 0;
	padding: .65em 1.3em;
	border: 0;
	border-radius: 8px;
	background: currentColor;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.pgc-locked-form button {
	/* Testo leggibile su sfondo "currentColor": usa il colore di sfondo del tema se c'è. */
	color: var(--wp--preset--color--base, #fff);
}

.pgc-locked-error {
	margin: .8em 0 0;
	color: #c62828;
	font-weight: 600;
}

.pgc-album-nocover.is-locked {
	display: grid;
	place-items: center;
	color: rgba(127, 127, 127, .8);
}

.pgc-album-lock {
	position: absolute;
	top: .6em;
	left: .6em;
	padding: .2em .7em;
	border-radius: 999px;
	background: rgba(0, 0, 0, .62);
	color: #fff;
	font-size: .78em;
	font-weight: 600;
}

.pgc-nodl img,
.lg-container.pgc-nodl img {
	-webkit-user-drag: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}

/* Data di scatto e fotocamera */
.pgc-lb-caption .pgc-lb-date {
	margin-top: .3em;
	font-size: .85em;
	opacity: .7;
}

.pgc-entry-exif {
	max-width: 70ch;
	margin: .8em auto 0;
	font-size: .88em;
	opacity: .65;
	text-align: center;
}

/* Campi in più (es. autore e classe del concorso) */
.pgc-lb-caption .pgc-lb-fields {
	margin-top: .35em;
	font-size: .92em;
}

.pgc-entry-fields {
	max-width: 70ch;
	margin: 1em auto 0;
	text-align: center;
	font-size: 1.05em;
}

.pgc-field-label {
	opacity: .7;
}

.pgc-field-sep {
	opacity: .5;
}
