/**
 * This file contains the style definitions for the output
 *
 */
.wpgpxmaps img,
.entry-content .wpgpxmaps img,
#content .wpgpxmaps img {
	width: none;
	max-width: none;
	margin: 0;
	padding: 0;
	border: none;
	background: none;
}

.wpgpxmaps {
	clear: both;
}

.wpgpxmaps .ngimages {
	display: none;
}

.wpgpxmaps .myngimages {
	position: absolute;
	z-index :1;
	margin:0;
	border: 1px solid #fff;
	cursor: pointer;
}

.wpgpxmaps_summary .summarylabel {
	font-weight: 400;
}

.wpgpxmaps_summary .summaryvalue {
	font-weight: 600;
}

.wpgpxmaps .report {
	line-height :120;
}

.wpgpxmaps .wpgpxmaps_osm_footer {
	position: absolute;
	z-index: 999;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 13px;
	margin: 0;
	background: #fff;
	font-size: 12px;
}

.wpgpxmaps .wpgpxmaps_osm_footer span {
	position: absolute;
	bottom: 0;
	padding: 0 6px 6px 6px;
	background: #fff;
	vertical-align: baseline;
}


.wpgpxmaps .leaflet-marker-photo { 
	border: 2px solid #fff; 
	box-shadow: 3px 3px 10px #888; 
}	

.wpgpxmaps .leaflet-marker-photo div { 
    width: 100%;  
    height: 100%;
    background-size: cover;    
    background-position: center center;
    background-repeat: no-repeat;
}	

.wpgpxmaps .leaflet-marker-photo b {
	position: absolute;
	top: -7px;
	right: -11px;
	color: #555;
	background-color: #fff;
	border-radius: 8px;
	height: 12px;
	min-width: 12px;
	line-height: 12px;
	text-align: center;
	padding: 3px;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

.mapboxgl-wp-gpx-maps{
	background-size: contain;
	background-repeat: no-repeat;
}

/*
 * Soft edges (fadeedges): a shadow of the page color inside the map, over the map and the track but under the
 * controls and the attribution, so the map fades into the page. --wpgpxmaps-fade-color: the color behind the map
 * (default: the background of block themes, or white).
 */
.wpgpxmaps-fade .leaflet-container::after,
.wpgpxmaps-fade .mapboxgl-map::after,
.wpgpxmaps-fade .maplibregl-map::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	box-shadow: inset 0 0 var(--wpgpxmaps-fade-size, 40px) calc(var(--wpgpxmaps-fade-size, 40px) / 3) var(--wpgpxmaps-fade-color, var(--wp--preset--color--base, #fff));
}

/* Leaflet: above the tiles and the track (panes 200-400), under the markers (600) and the controls (1000) */
.wpgpxmaps-fade .leaflet-container::after {
	z-index: 450;
}

/* Mapbox and MapLibre: above the map canvas, under the controls (z-index 2) */
.wpgpxmaps-fade .mapboxgl-map::after,
.wpgpxmaps-fade .maplibregl-map::after {
	z-index: 1;
}

/* Full screen: there is no page around the map */
.wpgpxmaps-fade .leaflet-container:fullscreen::after,
.wpgpxmaps-fade .leaflet-pseudo-fullscreen::after,
.wpgpxmaps-fade .mapboxgl-map:fullscreen::after,
.wpgpxmaps-fade :fullscreen .mapboxgl-map::after,
.wpgpxmaps-fade .maplibregl-map:fullscreen::after,
.wpgpxmaps-fade :fullscreen .maplibregl-map::after {
	display: none;
}


/*
 * Map controls: the same look for Leaflet, MapLibre and Mapbox. All on the right, in this order: zoom (and compass),
 * full screen, map type / style, flyover. White cards with rounded corners and a soft shadow, 34px buttons.
 */
.wpgpxmaps {
	--wpgpxmaps-ctrl-bg: #fff;
	--wpgpxmaps-ctrl-fg: #1f2937;
	--wpgpxmaps-ctrl-hover: #f1f5f9;
	--wpgpxmaps-ctrl-line: #e5e7eb;
	--wpgpxmaps-ctrl-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.14);
}

.wpgpxmaps .leaflet-bar,
.wpgpxmaps .leaflet-touch .leaflet-bar,
.wpgpxmaps .leaflet-control-layers,
.wpgpxmaps .leaflet-touch .leaflet-control-layers,
.wpgpxmaps .maplibregl-ctrl-group,
.wpgpxmaps .mapboxgl-ctrl-group {
	border: 0;
	border-radius: 10px;
	background: var(--wpgpxmaps-ctrl-bg);
	box-shadow: var(--wpgpxmaps-ctrl-shadow);
}

.wpgpxmaps .leaflet-bar {
	overflow: hidden;
}

.wpgpxmaps .leaflet-top.leaflet-right .leaflet-control {
	margin: 10px 10px 0 0;
}

.wpgpxmaps .maplibregl-ctrl-top-right .maplibregl-ctrl,
.wpgpxmaps .mapboxgl-ctrl-top-right .mapboxgl-ctrl {
	margin: 10px 10px 0 0;
}

/* Buttons */
.wpgpxmaps .leaflet-bar a,
.wpgpxmaps .leaflet-touch .leaflet-bar a {
	width: 34px;
	height: 34px;
	line-height: 34px;
	font: 500 20px/34px system-ui, sans-serif;
	color: var(--wpgpxmaps-ctrl-fg);
	background-color: var(--wpgpxmaps-ctrl-bg);
	border-bottom: 1px solid var(--wpgpxmaps-ctrl-line);
	border-radius: 0;
}

.wpgpxmaps .leaflet-bar a:last-child {
	border-bottom: 0;
}

.wpgpxmaps .maplibregl-ctrl-group button,
.wpgpxmaps .mapboxgl-ctrl-group button {
	width: 34px;
	height: 34px;
	color: var(--wpgpxmaps-ctrl-fg);
}

.wpgpxmaps .maplibregl-ctrl-group button + button,
.wpgpxmaps .mapboxgl-ctrl-group button + button {
	border-top: 1px solid var(--wpgpxmaps-ctrl-line);
}

.wpgpxmaps .leaflet-bar a:hover,
.wpgpxmaps .maplibregl-ctrl-group button:not(:disabled):hover,
.wpgpxmaps .mapboxgl-ctrl-group button:not(:disabled):hover {
	background-color: var(--wpgpxmaps-ctrl-hover);
}

.wpgpxmaps .leaflet-bar a:focus-visible,
.wpgpxmaps .leaflet-control-layers-toggle:focus-visible,
.wpgpxmaps .maplibregl-ctrl-group button:focus-visible,
.wpgpxmaps .mapboxgl-ctrl-group button:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: -2px;
}

/* Leaflet full screen button with the same icons as the GL maps */
.wpgpxmaps .leaflet-bar a.fullscreen-icon {
	background: var(--wpgpxmaps-ctrl-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.wpgpxmaps .leaflet-bar a.fullscreen-icon.leaflet-fullscreen-on {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5'/%3E%3C/svg%3E");
}

/* Leaflet map types: a layers button that opens the list */
.wpgpxmaps .leaflet-control-layers-toggle,
.wpgpxmaps .leaflet-touch .leaflet-control-layers-toggle {
	width: 34px;
	height: 34px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 8l10 5 10-5-10-5Z'/%3E%3Cpath d='m2 13 10 5 10-5'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.wpgpxmaps .leaflet-control-layers-expanded {
	padding: 6px 12px 6px 8px;
	font: 13px/1.5 system-ui, sans-serif;
	color: var(--wpgpxmaps-ctrl-fg);
}

.wpgpxmaps .leaflet-control-layers label {
	margin: 2px 0;
	padding: 3px 4px;
	border-radius: 6px;
	cursor: pointer;
}

.wpgpxmaps .leaflet-control-layers label:hover {
	background: var(--wpgpxmaps-ctrl-hover);
}

.wpgpxmaps .leaflet-control-layers input {
	accent-color: #2563eb;
	margin-right: 6px;
}

.wpgpxmaps .leaflet-control-layers-separator {
	border-top-color: var(--wpgpxmaps-ctrl-line);
	margin: 6px -12px 6px -8px;
}

/* MapLibre and Mapbox map styles: the same layers button with a list on its left (Utils/MapControls.ts) */
.wpgpxmaps .wpgpxmaps-style-menu {
	position: relative;
}

.wpgpxmaps .wpgpxmaps-style-menu-button {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
}

.wpgpxmaps .wpgpxmaps-style-menu-list:not([hidden]) {
	position: absolute;
	top: 0;
	right: calc(100% + 8px);
	z-index: 3;
	display: flex;
	flex-direction: column;
	min-width: 170px;
	/* Long lists (Mapbox) scroll instead of going past the bottom of the map */
	max-height: 240px;
	overflow-y: auto;
	padding: 6px;
	border-radius: 10px;
	background: var(--wpgpxmaps-ctrl-bg);
	box-shadow: var(--wpgpxmaps-ctrl-shadow);
}

.wpgpxmaps .wpgpxmaps-style-menu-list button,
.wpgpxmaps .wpgpxmaps-style-menu-list button + button {
	position: relative;
	width: 100%;
	height: auto;
	padding: 7px 10px 7px 28px;
	border: 0;
	border-radius: 6px;
	font: 13px/1.3 system-ui, sans-serif;
	text-align: left;
	white-space: nowrap;
	color: var(--wpgpxmaps-ctrl-fg);
}

.wpgpxmaps .wpgpxmaps-style-menu-list button[aria-pressed="true"] {
	font-weight: 600;
}

.wpgpxmaps .wpgpxmaps-style-menu-list button[aria-pressed="true"]::before {
	content: "\2713";
	position: absolute;
	left: 10px;
	color: #2563eb;
}
