.photo-map-preview-slot { position:relative; width:250px; max-width:100%; height:190px; }
.photo-map-open { display:none; }
.photo-map-preview-slot.is-ready .photo-map-open {
	display:block;
	position:absolute;
	inset:0;
	z-index:800;
	width:100%;
	height:100%;
	margin:0;
	padding:0;
	border:0;
	border-radius:5px;
	background:transparent;
	box-shadow:none;
	cursor:zoom-in;
	touch-action:none;
}
.photo-map-open:focus-visible { outline:2px solid var(--theme-link-color); outline-offset:2px; }
#photo-map-preview { box-sizing:border-box; width:100%; height:100%; border:1px solid #bbb; border-radius:5px; font-family:var(--default-font); }
.photo-map-preview-slot > #photo-map-preview .map-photo-marker { opacity:.5; }
#photo-map-preview .leaflet-popup-content a,
#photo-map-preview .leaflet-control-attribution a { color:var(--theme-link-color); }
#photo-map-preview .leaflet-popup-content a:visited,
#photo-map-preview .leaflet-control-attribution a:visited { color:var(--theme-link-visited-color); }
#photo-map-preview .leaflet-top.leaflet-right .leaflet-control-layers { margin-top:4px; margin-right:4px; }
#photo-map-preview .leaflet-control-layers-expanded { max-width:215px; max-height:165px; overflow:auto; overscroll-behavior:contain; }
#photo-map-preview.leaflet-container .leaflet-control-layers { border:0; border-radius:0; background:transparent; box-shadow:none; }
#photo-map-preview.leaflet-container .leaflet-control-layers-toggle { width:34px; height:34px; border-radius:5px; background:rgba(25, 25, 25, .95) url('/css/photo-map-layers-three.svg') center / 17.6px 17.6px no-repeat; box-shadow:0 2px 10px rgba(0, 0, 0, .22); }
#photo-map-preview.leaflet-container .leaflet-control-layers-expanded { border-radius:5px; background:rgba(255, 255, 255, .97); box-shadow:0 2px 8px rgba(0, 0, 0, .25); }
#photo-map-preview.leaflet-container .leaflet-control-layers-toggle:focus-visible { outline:2px solid #fff; outline-offset:2px; }
html.photo-map-modal-open { overflow:hidden; padding-right:var(--photo-map-scrollbar, 0px); }
@supports (scrollbar-gutter:stable) {
	html.photo-menu-js.photo-map-modal-open { padding-right:0; }
}
.photo-map-dialog {
	--photo-map-gap:clamp(16px, 3vw, 40px);
	position:fixed;
	inset:0;
	box-sizing:border-box;
	width:calc(100% - 2 * var(--photo-map-gap));
	max-width:none;
	height:calc(100vh - 2 * var(--photo-map-gap));
	height:calc(100dvh - 2 * var(--photo-map-gap));
	max-height:none;
	margin:auto;
	padding:0;
	border:1px solid #bbb;
	border-radius:8px;
	background:#ddd;
	box-shadow:none;
	overflow:visible;
}
.photo-map-dialog::backdrop { background:rgba(0, 0, 0, .58); opacity:1; transition:opacity .2s ease-out; }
@starting-style {
	.photo-map-dialog[open]::backdrop { opacity:0; }
}
.photo-map-dialog:not([open]) { display:none; }
.photo-map-dialog.is-closing::backdrop { opacity:0; transition-duration:.28s; }
.photo-map-dialog #photo-map-preview { width:100%; height:100%; border:0; border-radius:7px; }
.photo-map-dialog #photo-map-preview .leaflet-top.leaflet-right .leaflet-control-layers { margin:10px 52px 0 0; }
.photo-map-dialog #photo-map-preview.leaflet-container .leaflet-control-layers-expanded {
	box-sizing:border-box;
	max-width:min(320px, calc(100vw - 2 * var(--photo-map-gap) - 72px));
	max-height:calc(100vh - 2 * var(--photo-map-gap) - 24px);
	max-height:calc(100dvh - 2 * var(--photo-map-gap) - 24px);
	padding:9px 12px;
	background:rgba(25, 25, 25, .95);
	box-shadow:0 2px 10px rgba(0, 0, 0, .22);
	color:#fff;
	font:12px/1.5 var(--default-font);
	scrollbar-width:thin;
	scrollbar-color:#888 transparent;
}
.photo-map-dialog .leaflet-control-layers label { padding:3px 0; cursor:pointer; }
.photo-map-dialog .leaflet-control-layers input { accent-color:var(--theme-link-color); }
.photo-map-dialog .leaflet-control-layers input:checked + span { color:#eac044; }
.photo-map-dialog .leaflet-control-layers-separator { border-color:rgba(255, 255, 255, .2); }
.photo-map-close,
.photo-map-tool {
	position:absolute;
	top:10px;
	right:10px;
	z-index:1100;
	display:grid;
	place-items:center;
	box-sizing:border-box;
	width:34px;
	height:34px;
	margin:0;
	padding:0;
	border:0;
	border-radius:5px;
	outline:none;
	background:rgba(25, 25, 25, .95);
	box-shadow:0 2px 10px rgba(0, 0, 0, .22);
	color:#fff;
	cursor:pointer;
}
.photo-map-dialog .photo-action-icon {
	display:block;
	width:18px;
	height:18px;
	fill:none;
	stroke:currentColor;
	stroke-width:1.6;
	stroke-linecap:round;
	stroke-linejoin:round;
}
.photo-map-close:hover,
.photo-map-tool:hover { background:#333; }
.photo-map-close:focus-visible,
.photo-map-tool:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.photo-map-dialog #photo-map-preview .leaflet-control-zoom { display:flex; flex-direction:column; gap:8px; border:0; border-radius:0; background:transparent; box-shadow:none; }
.photo-map-dialog #photo-map-preview .leaflet-control-zoom a {
	display:grid;
	place-items:center;
	width:34px;
	height:34px;
	padding:0;
	border:0;
	border-radius:5px;
	background:rgba(25, 25, 25, .95);
	box-shadow:0 2px 10px rgba(0, 0, 0, .22);
	color:#fff;
}
.photo-map-dialog #photo-map-preview .leaflet-control-zoom a.leaflet-disabled { color:#999; }
@media (prefers-reduced-motion:reduce) {
	.photo-map-dialog::backdrop { transition:none; }
}
