/* WP GPX Maps Pro: map themes "sketch" (pencil on paper) and "treasure" (treasure map). */

@font-face {
	font-family: "WPGPXMaps Hand";
	src: url("../fonts/patrick-hand-latin-400.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
	font-display: swap;
}

@font-face {
	font-family: "WPGPXMaps Hand";
	src: url("../fonts/patrick-hand-latin-ext-400.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
	font-display: swap;
}

/* ---------- Common ---------- */
.wpgpxmaps-theme-sketch,
.wpgpxmaps-theme-treasure,
.wpgpxmaps-theme-sketch .wpgpxmaps-legend,
.wpgpxmaps-theme-treasure .wpgpxmaps-legend,
.wpgpxmaps-theme-sketch .wpgpxmaps-marker,
.wpgpxmaps-theme-treasure .wpgpxmaps-marker,
.wpgpxmaps_summary.wpgpxmaps-theme-sketch,
.wpgpxmaps_summary.wpgpxmaps-theme-treasure {
	font-family: "WPGPXMaps Hand", "Comic Sans MS", cursive !important;
}

/* Track drawn with a trembling pencil / pen line (Leaflet draws it as SVG) */
.wpgpxmaps-theme-sketch .leaflet-overlay-pane path.leaflet-interactive,
.wpgpxmaps-theme-treasure .leaflet-overlay-pane path.leaflet-interactive {
	filter: url(#wpgpxmaps-hand-filter);
}

.wpgpxmaps-theme-sketch .wpgpxmaps-legend,
.wpgpxmaps-theme-treasure .wpgpxmaps-legend {
	font-size: 14px !important;
}

/* ---------- Sketch: pencil on paper ---------- */
.wpgpxmaps-theme-sketch .leaflet-tile-pane,
.wpgpxmaps-theme-sketch .mapboxgl-canvas {
	filter: grayscale(1) sepia(0.15) contrast(1.15) brightness(1.08);
}

.wpgpxmaps-theme-sketch .leaflet-container,
.wpgpxmaps-theme-sketch [id^="map_"][id$="_cont"] {
	background: #f7f3ea;
}

.wpgpxmaps-theme-sketch .wpgpxmaps-marker:not(:empty) {
	background: #2b2b2b !important;
	border-color: #f7f3ea !important;
	box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35) !important;
	font-size: 13px !important;
}

.wpgpxmaps-theme-sketch .wpgpxmaps-legend {
	background: rgba(247, 243, 234, 0.92) !important;
	border: 1.5px solid #2b2b2b;
	box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25) !important;
	border-radius: 2px 6px 3px 5px !important;
}

/* ---------- Treasure: old parchment map ---------- */
.wpgpxmaps-theme-treasure .leaflet-tile-pane,
.wpgpxmaps-theme-treasure .mapboxgl-canvas {
	filter: sepia(0.85) saturate(0.9) hue-rotate(-12deg) contrast(1.05) brightness(0.97);
}

/* Burnt edges of the parchment above the map */
.wpgpxmaps-theme-treasure [id^="map_"][id$="_cont"]::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 500;
	pointer-events: none;
	box-shadow: inset 0 0 40px 12px rgba(92, 54, 20, 0.55), inset 0 0 6px 2px rgba(60, 30, 10, 0.6);
	background: radial-gradient(ellipse at center, rgba(255, 240, 200, 0) 55%, rgba(120, 70, 20, 0.25) 100%);
}

.wpgpxmaps-theme-treasure .wpgpxmaps-marker:not(:empty) {
	background: #6b3e1d !important;
	border-color: #f4e4c1 !important;
	color: #f4e4c1 !important;
	font-size: 13px !important;
}

.wpgpxmaps-theme-treasure .wpgpxmaps-legend {
	background: rgba(244, 228, 193, 0.95) !important;
	color: #4a2a10 !important;
	border: 1.5px solid #6b3e1d;
	border-radius: 3px 8px 4px 7px !important;
}

/* Start / finish dots are replaced by the trail start and the X */
.wpgpxmaps-theme-treasure .wpgpxmaps-marker:empty {
	display: none !important;
}

/* The X that marks the spot and the compass rose */
.wpgpxmaps-treasure-x {
	font-family: "WPGPXMaps Hand", cursive;
	font-size: 34px;
	line-height: 1;
	color: #b91c1c;
	text-shadow: 1px 1px 0 #f4e4c1, -1px -1px 0 #f4e4c1;
	transform: rotate(-8deg);
}

.wpgpxmaps-treasure-compass {
	position: absolute;
	top: 10px;
	right: 56px;
	z-index: 1000;
	width: 64px;
	height: 64px;
	pointer-events: none;
	opacity: 0.85;
}

.wpgpxmaps_summary.wpgpxmaps-theme-treasure {
	color: #4a2a10;
}
