/*
 * Person profile photo gallery (Core 1.41.18, HORIZON-20260927-006). Loaded only on a profile with extra photos,
 * after hp-profile.css, whose hero frame (.hp-profile-hero__photo: 4:5, gold hairline, 2px radius) it keeps.
 * Structure only; colour comes from the skin's tokens. Clean by brief: no captions, counters or dots.
 */

body .hp-photo-gallery {
	min-width: 0;
	outline: none;
}
body .hp-photo-gallery:focus-visible .hp-photo-gallery__stage {
	outline: 2px solid var(--hp-gold);
	outline-offset: 3px;
}

/* The stage IS the hero frame: one photo visible, arrows over it. */
body .hp-photo-gallery__stage {
	position: relative;
	touch-action: pan-y;
}
body .hp-photo-gallery__pane[hidden] {
	display: none;
}

body .hp-photo-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--hp-bg, #000) 55%, transparent);
	color: var(--hp-text, #fff);
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.2s ease, background-color 0.2s ease;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
body .hp-photo-gallery__nav--prev { left: 10px; }
body .hp-photo-gallery__nav--next { right: 10px; }
body .hp-photo-gallery:hover .hp-photo-gallery__nav,
body .hp-photo-gallery:focus-within .hp-photo-gallery__nav {
	opacity: 1;
}
body .hp-photo-gallery__nav:hover,
body .hp-photo-gallery__nav:focus-visible {
	background: color-mix(in srgb, var(--hp-bg, #000) 80%, transparent);
	color: var(--hp-gold);
	outline: none;
}
/* Always shown (the brief names the arrows); full strength on hover, and always on touch. */
@media (hover: none) {
	body .hp-photo-gallery__nav { opacity: 1; }
}

/* The strip: a 4-wide window under the photo; more than 4 scroll sideways (the script keeps the current in view). */
body .hp-photo-gallery__thumbs {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3 * 8px) / 4);
	gap: 8px;
	margin-top: 10px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
body .hp-photo-gallery__thumbs::-webkit-scrollbar { display: none; }

body .hp-photo-gallery__thumb {
	display: block;
	aspect-ratio: 1 / 1;
	scroll-snap-align: start;
	padding: 0;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 2px;
	background: none;
	overflow: hidden;
	cursor: pointer;
	opacity: 0.55;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}
body .hp-photo-gallery__thumb:hover,
body .hp-photo-gallery__thumb:focus-visible,
body .hp-photo-gallery__thumb[aria-current="true"] {
	opacity: 1;
	border-color: var(--hp-gold);
	outline: none;
}
body .hp-photo-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

@media (prefers-reduced-motion: reduce) {
	body .hp-photo-gallery__thumbs { scroll-behavior: auto; }
	body .hp-photo-gallery__nav,
	body .hp-photo-gallery__thumb { transition: none; }
}
