.legacy-trail-photos-marker {
	background: rgba(20, 20, 23, 0.82);
	border: 2px solid #02b6f7;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	line-height: 1;
}

.legacy-trail-photos-marker span {
	pointer-events: none;
}

.legacy-trail-photos-tooltip.leaflet-tooltip {
	font-family: var(--legacy-panel-font, Helvetica, Arial, sans-serif);
	font-size: 11px;
	line-height: 1.2;
	padding: 4px 8px;
	border-radius: 4px;
}

/* Popup: gradient frame like welcome, image flush inside */
.legacy-trail-photos-popup-wrap.leaflet-popup {
	overflow: visible !important;
}

.legacy-trail-photos-popup-wrap .leaflet-popup-content-wrapper {
	position: relative;
	padding: 2px;
	border-radius: var(--legacy-panel-radius-outer);
	background: var(--legacy-panel-border-gradient);
	background-size: 200% 200%;
	animation: trailsWelcomeBorder 8s ease infinite;
	box-shadow: var(--legacy-panel-frame-shadow);
	overflow: visible;
}

.legacy-trail-photos-popup-wrap .leaflet-popup-content {
	margin: 0;
	padding: 0;
	width: auto !important;
	background: transparent;
	border-radius: var(--legacy-panel-radius-inner);
	overflow: hidden;
	line-height: 0;
}

/* Leaflet default: img { max-width:100% } — breaks pano crop */
.legacy-trail-photos-popup-wrap .leaflet-popup-content img.legacy-trail-photos-img--pano {
	max-width: none !important;
	max-height: none !important;
}

.legacy-trail-photos-media {
	position: relative;
	display: block;
	line-height: 0;
	text-decoration: none;
	border-radius: var(--legacy-panel-radius-inner);
	overflow: hidden;
	cursor: pointer;
}

.legacy-trail-photos-crop {
	display: block;
	position: relative;
	width: min(88vw, 280px);
	max-width: 280px;
	overflow: hidden;
}

.legacy-trail-photos-crop::before {
	content: '';
	display: block;
	padding-top: 75%;
}

.legacy-trail-photos-crop--pano {
	cursor: grab;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.legacy-trail-photos-crop--pano.legacy-trail-photos-crop--panning {
	cursor: grabbing;
}

.legacy-trail-photos-media--pano {
	cursor: grab;
}

.legacy-trail-photos-img {
	display: block;
	width: min(88vw, 280px);
	max-width: 280px;
	height: auto;
	vertical-align: top;
	border: none;
	margin: 0;
	padding: 0;
}

.legacy-trail-photos-img--pano {
	position: absolute;
	left: 0;
	max-width: none;
	object-fit: fill;
	will-change: transform;
	-webkit-user-drag: none;
	user-select: none;
	pointer-events: none;
}

.legacy-trail-photos-date {
	position: absolute;
	left: 8px;
	bottom: 8px;
	padding: 4px 9px;
	border-radius: 4px;
	background: rgba(14, 18, 16, 0.78);
	color: #f4f8f6;
	font-family: var(--legacy-panel-font, Helvetica, Arial, sans-serif);
	font-size: 11px;
	line-height: 1.25;
	letter-spacing: 0.02em;
	pointer-events: none;
}

@media (max-width: 540px) and (orientation: portrait) {
	.legacy-trail-photos-crop,
	.legacy-trail-photos-img {
		width: min(90vw, 300px);
		max-width: 300px;
	}
}
