/* Fotoniss Smugmug Galleri */
.sgg,
.sgg-lb {
	--sgg-accent: #d9304f;
	--sgg-fb: #1877f2;
	--sgg-radius: 8px;
	--sgg-gap: 10px;
}

.sgg { margin: 1.5em 0; line-height: 1.4; color: inherit; }
.sgg *, .sgg-lb * { box-sizing: border-box; }
.sgg [hidden], .sgg-lb[hidden] { display: none !important; }

.sgg button,
.sgg-lb button {
	font: inherit;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	text-shadow: none;
	box-shadow: none;
}
.sgg button:focus-visible,
.sgg-lb button:focus-visible,
.sgg select:focus-visible {
	outline: 3px solid #4d90fe;
	outline-offset: 2px;
}

.sgg-error { padding: 12px 14px; border-left: 4px solid var(--sgg-accent); background: rgba(217, 48, 79, .08); }

/* Værktøjslinje */
.sgg-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.sgg-bar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.sgg-sort { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .9em; }
.sgg-sort select {
	font: inherit;
	padding: 7px 10px;
	border: 1px solid rgba(128, 128, 128, .5);
	border-radius: 6px;
	background-color: transparent;
	color: inherit;
	max-width: 100%;
}
.sgg-sort select option { color: #111; background: #fff; }
.sgg-count { font-size: .9em; opacity: .75; }

.sgg .sgg-fb,
.sgg-lb .sgg-fb {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 8px 14px;
	border: 0;
	border-radius: 6px;
	background: var(--sgg-fb);
	color: #fff;
	font-size: .9em;
	font-weight: 600;
	cursor: pointer;
}
.sgg .sgg-fb:hover, .sgg-lb .sgg-fb:hover { background: #0f63d1; color: #fff; }
.sgg-fb svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Keywords */
.sgg-kw { margin: 0 0 16px; padding: 12px; border: 1px solid rgba(128, 128, 128, .35); border-radius: var(--sgg-radius); }
.sgg-kw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: .9em; font-weight: 600; }
.sgg-kw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sgg-kw-list.is-collapsed { max-height: 5.4em; overflow: hidden; }
.sgg .sgg-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 4px 11px;
	border: 1px solid rgba(128, 128, 128, .55);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-size: .85em;
	font-weight: 400;
	cursor: pointer;
}
.sgg .sgg-chip:hover { border-color: var(--sgg-accent); }
.sgg .sgg-chip.is-on { background: var(--sgg-accent); border-color: var(--sgg-accent); color: #fff; }
.sgg-chip-n { font-size: .85em; opacity: .65; }
.sgg .sgg-link {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: .85em;
	font-weight: 400;
	text-decoration: underline;
	cursor: pointer;
}
.sgg .sgg-kw-toggle { margin-top: 8px; }

/* Grid */
.sgg-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--sgg-gap);
	grid-template-columns: repeat(var(--sgg-cols, 4), minmax(0, 1fr));
}
@media (max-width: 900px) { .sgg-grid { grid-template-columns: repeat(min(var(--sgg-cols, 4), 3), minmax(0, 1fr)); } }
@media (max-width: 560px) { .sgg-grid { grid-template-columns: repeat(min(var(--sgg-cols, 4), 2), minmax(0, 1fr)); gap: 6px; } }

.sgg-item { position: relative; margin: 0; padding: 0; list-style: none; overflow: hidden; border-radius: var(--sgg-radius); background: rgba(128, 128, 128, .18); }
.sgg .sgg-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	cursor: zoom-in;
	overflow: hidden;
}
.sgg-thumb img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; transition: transform .25s ease; }
.sgg-thumb:hover img, .sgg-thumb:focus-visible img { transform: scale(1.04); }

/* Like-knap */
.sgg .sgg-like,
.sgg-lb .sgg-like {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 10px;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, .62);
	color: #fff;
	font-size: .85em;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease;
}
.sgg .sgg-like:hover, .sgg-lb .sgg-like:hover { background: rgba(0, 0, 0, .82); color: #fff; }
.sgg-item .sgg-like { position: absolute; right: 8px; bottom: 8px; }
.sgg-like svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.sgg-like.is-liked svg { fill: var(--sgg-accent); stroke: var(--sgg-accent); }
.sgg-like-n:empty { display: none; }
.sgg-lb .sgg-like-lg { background: rgba(255, 255, 255, .16); padding: 8px 14px; }

.sgg-empty { margin: 18px 0; opacity: .8; }
.sgg .sgg-more {
	display: block;
	margin: 18px auto 0;
	padding: 10px 22px;
	border: 1px solid currentColor;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font-weight: 600;
	cursor: pointer;
}
.sgg .sgg-more:hover { background: rgba(128, 128, 128, .15); color: inherit; }

/* Lightbox */
html.sgg-lock { overflow: hidden; }
.sgg-lb { position: fixed; inset: 0; z-index: 999999; display: flex; color: #fff; font-size: 16px; line-height: 1.4; }
.sgg-lb-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 10, .94); }
.sgg-lb-stage { position: absolute; inset: 0 0 92px 0; display: flex; align-items: center; justify-content: center; padding: 16px 68px 0; }
.sgg-lb-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 6px 40px rgba(0, 0, 0, .5); transition: opacity .15s ease; }
.sgg-lb.is-loading .sgg-lb-img { opacity: .35; }
.sgg-lb-spin {
	display: none;
	position: absolute;
	width: 38px;
	height: 38px;
	border: 3px solid rgba(255, 255, 255, .3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sgg-spin .8s linear infinite;
}
.sgg-lb.is-loading .sgg-lb-spin { display: block; }
@keyframes sgg-spin { to { transform: rotate(360deg); } }

.sgg-lb .sgg-lb-close,
.sgg-lb .sgg-lb-prev,
.sgg-lb .sgg-lb-next {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0 0 3px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}
.sgg-lb .sgg-lb-close:hover, .sgg-lb .sgg-lb-prev:hover, .sgg-lb .sgg-lb-next:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.sgg-lb .sgg-lb-close { top: 12px; right: 12px; }
.sgg-lb .sgg-lb-prev { left: 12px; top: calc((100% - 92px) / 2 - 22px); }
.sgg-lb .sgg-lb-next { right: 12px; top: calc((100% - 92px) / 2 - 22px); }

.sgg-lb-foot {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 92px;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 18px;
	background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
}
.sgg-lb-info { flex: 1; min-width: 0; max-height: 72px; overflow: auto; }
.sgg-lb-cap { font-weight: 600; overflow-wrap: anywhere; }
.sgg-lb-meta { font-size: .85em; opacity: .7; }
.sgg-lb-kw { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.sgg-lb .sgg-lb-tag {
	margin: 0;
	padding: 2px 9px;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font-size: .78em;
	cursor: pointer;
}
.sgg-lb .sgg-lb-tag:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.sgg-lb-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.sgg-lb-n { flex: none; font-size: .85em; opacity: .7; min-width: 4.5em; text-align: right; }

@media (max-width: 640px) {
	.sgg-lb-stage { padding: 8px 6px 0; inset: 0 0 118px 0; }
	.sgg-lb-foot { height: 118px; flex-wrap: wrap; gap: 8px 12px; align-content: center; }
	.sgg-lb-info { flex-basis: 100%; max-height: 50px; }
	.sgg-lb-n { margin-left: auto; }
	.sgg-lb .sgg-lb-prev, .sgg-lb .sgg-lb-next { width: 38px; height: 38px; font-size: 26px; background: rgba(0, 0, 0, .45); top: calc((100% - 118px) / 2 - 19px); }
	.sgg-lb .sgg-lb-prev { left: 6px; }
	.sgg-lb .sgg-lb-next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.sgg *, .sgg-lb * { transition: none !important; animation-duration: 2s !important; }
}
