/* mapsvg: MapSVG map sizing, tooltips and controls (spec 6.8). Views: any page whose content holds the [mapsvg]
   shortcode or the chapters-map pattern (/contact/). Selectors are the plugin's own (MapSVG 9.0.7). The map is
   sized by its own padding-bottom ratio, so only the width limit is set here. */

.mapsvg {
	max-width: 100%;
	box-sizing: border-box;
}

.mapsvg .mapsvg-map-container,
.mapsvg .mapsvg-layers-wrap,
.mapsvg svg {
	max-width: 100%;
}

/* Tooltip: white, ink Roboto text, a 1px mist border. */
.mapsvg .mapsvg-tooltip {
	background-color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--mist);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--roboto);
	font-size: var(--wp--preset--font-size--small);
}

.mapsvg .mapsvg-tooltip .mapsvg-controller-view,
.mapsvg .mapsvg-tooltip .mapsvg-controller-view-content {
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--roboto);
}

/* The "Loading map..." box: MapSVG prints light grey text on an off-white box (2.6:1, master ruling 75 d). Ink on
   white, a mist rule. */
.mapsvg .mapsvg-loading {
	background-color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--mist);
}

.mapsvg .mapsvg-loading .mapsvg-loading-text {
	color: var(--wp--preset--color--ink);
}

/* Controls (zoom, location, reset): white tiles with a mist rule. */
.mapsvg .mapsvg-btn-map {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

.mapsvg .mapsvg-btn-map.mapsvg-in {
	border-bottom-color: var(--wp--preset--color--mist);
}

.mapsvg .mapsvg-btn-map:hover {
	background-color: var(--wp--preset--color--panel);
}

/* The ring of contract 1.7 for a control that takes focus. MapSVG prints `.mapsvg * { outline: none !important }`
   and the theme allows !important only in two other files, so the ring is drawn as two box-shadows: the inner
   colour 2px wide, then the outer colour 2px wide (the same picture as outline + offset + shadow). */
.mapsvg .mapsvg-btn-map:focus-visible,
.mapsvg .mapsvg-btn:focus-visible {
	box-shadow:
		0 0 0 var(--wp--custom--focus--ring-width) var(--wp--custom--focus--ring-inner),
		0 0 0 calc(var(--wp--custom--focus--ring-width) * 2) var(--wp--custom--focus--ring-outer);
}
