/* ACCESSIBILITY */
[aria-live] {
	visibility: hidden;
}

[data-curatescape-map-screenreader-only] {
	visibility: hidden;
	height: 0;
	width: 0;
	padding: 0;
	margin: 0;
	font-size: 0;
	line-height: 0;
	color: transparent;
	position: absolute;
	pointer-events: none;
}

[data-curatescape-map-keyboard-only] {
	color: #333;
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	position: absolute;
	font-size: 16px;
	z-index: 403;
	top:50%; 
	left:50%; 
	transform:translate(-50%, -50%); 
	padding: 0 10px;
	height: 36px;
	border-radius: 5px;
	background-color: white;
	border: 2px solid rgba(0, 0, 0, .2);
	text-decoration: none;
	transition: all linear 0.15s;
	opacity: 0;
	pointer-events: none;
}

[data-curatescape-map-keyboard-only]:focus {
	opacity: 1;
	pointer-events: all;
}

/* ANIMATIONS */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* MAP */
#curatescape-map-figure {
	position: relative;
	opacity: 0;
	margin: 0 auto;
	transition: all 0.15s linear;
}

#curatescape-map-figure[data-loaded]{
	opacity: 1;
}

#curatescape-map-canvas {
	width: var(--curatescape-map-canvas-width, auto);
	max-width: 100%;
	min-height: var(--curatescape-map-height, 500px);
	border: var(--curatescape-map-border, 0 solid transparent);
	box-shadow: var(--curatescape-map-box-shadow, 0);
	border-radius: var(--curatescape-map-border-radius, 4px);
}

#geolocation figure {
	margin: 0;
	padding: 0;
}

#curatescape-map-caption {
	display: var(--curatescape-map-caption-display, block);
	visibility: var(--curatescape-map-caption-visibility, visible);
	padding: var(--curatescape-map-caption-padding, 0.5lh 0 0 0);
	margin: var(--curatescape-map-caption-margin, 0);
	border: var(--curatescape-map-caption-border, 0 solid transparent);
	border-top: var(--curatescape-map-caption-border-top, inherit);
	border-right: var(--curatescape-map-caption-border-right, inherit);
	border-bottom: var(--curatescape-map-caption-border-bottom, inherit);
	border-left: var(--curatescape-map-caption-border-left, inherit);
	font-size: var(--curatescape-map-caption-font-size, inherit);
	font-weight: var(--curatescape-map-caption-font-weight, inherit);
	font-family: var(--curatescape-map-caption-font-family, inherit);
	font-style: var(--curatescape-map-caption-font-style, italic);
	color: var(--curatescape-map-caption-color, inherit);
}

figure[data-maptype="multi"] #curatescape-map-caption{
	display: var(--curatescape-multimap-caption-display, inherit);
}

figure[data-maptype="multi"]:not([data-tour=""]) #curatescape-map-caption{
	display: var(--curatescape-tourmap-caption-display, inherit);
}

#curatescape-map-caption:has([data-curatescape-map-screenreader-only]){
	display: contents;
	position: absolute;
}

.curatescape-map-title {
	position: relative;
	width: 100%;
	clear: both;
}

.curatescape-map {
	position: relative;
}

.curatescape-map,
.curatescape-map a,
.curatescape-map a:visited,
.curatescape-map a:hover {
	color: var(--curatescape-map-color, #333);
	text-decoration: none;
}

/* MAP CONTROLS GENERAL */
/* .maplibregl-ctrl-group button {
	margin: unset;
	min-height: unset;
	padding: unset;
}

.maplibregl-ctrl-attrib a {
	color: inherit;
} */

.maplibregl-ctrl {
	opacity: 0.95;
	transition: opacity 0.15s linear;
}

.maplibregl-ctrl:hover,
.maplibregl-ctrl:focus,
.maplibregl-ctrl:focus-within {
	opacity: 1;
}

/* MAP CONTROLS CUSTOM */
.maplibregl-ctrl-group.custom button {
	background-position: center center;
	background-repeat: no-repeat;
}
.maplibregl-ctrl-group.custom.fitbounds button{
	background-size: 85%;
}
.maplibregl-ctrl-group.custom.styleswap button,
.maplibregl-ctrl-group.custom.reset button {
	background-size: 70%;
}
/* MAP CONTROLS KEYBOARD */
.maplibregl-ctrl-top-left {
	position: inherit;
}
.maplibregl-ctrl-group.custom.keyboard-only{
	position: absolute;
	top:50%; 
	left:50%; 
	transform:translate(-50%, -50%); 
	margin: 0;
	opacity: 0;
	pointer-events: none;
	padding: 10px;
	background: rgba(256,256,256,.9);
	transition-property: height, width, opacity;
	transition-duration: 0.15s;
	transition-timing-function: linear;
}
.maplibregl-ctrl-group.custom.keyboard-only:focus-within{
	opacity: 1;
	pointer-events: all;
}
.maplibregl-ctrl-group.custom.keyboard-only button{
	background: #fff;
	font-size: 16px;
	padding: 5px 10px;
	border: 2px solid rgba(0,0,0,.1);
	width: 100%;
	height: auto;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.maplibregl-ctrl-group.custom.keyboard-only button + button{
	margin-top: 5px;
}
.maplibregl-ctrl-group.custom.keyboard-only button:hover,
.maplibregl-ctrl-group.custom.keyboard-only button:focus{
	background: #f2f2f2;
}
/* locations as text list... */
.keyboard-results {
	box-sizing: border-box;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow-y: scroll;
	background-image: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.75));
	position: absolute;
	z-index: 9;
	padding: 0 1lh 1lh;
}
.keyboard-results::after {
	content: '';
	position: sticky;
	z-index: 10;
	display: block;
	width: 100%;
	height: 1lh;
	bottom: -1lh;
	left: 0;
	background-image: linear-gradient(to top, rgba(0,0,0,0.3), rgba(0,0,0,0.15),rgba(0,0,0,0));
}
.keyboard-results::before {
	content: '';
	position: sticky;
	z-index: 10;
	display: block;
	width: 100%;
	height: 0.5lh;
	top: 0;
	left: 0;
	background-image: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.15),rgba(0,0,0,0));
}
#keyboard-close-button {
	position: sticky;
	display: block;
	float: right;
	z-index: 11;
	top: 10px;
	left: calc(100% - 34px);
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 11-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 01-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0122.62-22.62L256 233.37l52.69-52.68a16 16 0 0122.62 22.62L278.63 256z"/></svg>');
	height: 34px;
	width: 34px;
	background-size: 100%;
	background-position: center;
	background-repeat: no-repeat;
	background-color: rgba(256, 256, 256, .5);
	border: 0;
	border-radius: 50%;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s linear;
}
#keyboard-close-button:hover,
#keyboard-close-button:focus {
	background-color: rgba(256, 256, 256, 1);
}
.keyboard-item-link {
	display: block;
	font-size: 16px;
	border: 2px solid rgba(0,0,0,.1);
	background: #fff;
	padding: 0.5lh;
	border-radius: 4px;
	text-decoration: none;
	color: inherit;
	max-width: max(44rem, calc(100% - 134px));
	margin:  0.5lh auto 0;
}
.keyboard-item-link:hover,
.keyboard-item-link:focus{
	background: #f2f2f2;
}
.keyboard-item-link small{
	display: block;
}

/* MAP SUBJECTS SELECT CONTROL */
.curatescape-map .subject-select {
	min-height: 30px;
	max-width: calc(100% - 59px);
	display: flex;
	flex-direction: row;
	position: absolute;
	top: 0;
}
.curatescape-map .subject-select:hover{
	background: #f2f2f2;
}
.curatescape-map .subject-select .indicator {
	display: inline-block;
	flex-grow: 0;
	flex-shrink: 0;
	background-clip: padding-box;
	background-image: url('data:image/svg+xml,<svg height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m256 48c-114.69 0-208 93.31-208 208s93.31 208 208 208 208-93.31 208-208-93.31-208-208-208zm-38 312.38-80.6-89.57 23.79-21.41 56 62.22 132.81-158.16 24.54 20.54z"/></svg>');
	background-size: 20px;
	background-position: center;
	background-repeat: no-repeat;
	width: 29px;
}

.curatescape-map .subject-select .indicator.loading {
	animation: spin 1.5s linear infinite;
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm120 182.15a8.62 8.62 0 01-8.62 8.62h-59.54a8.61 8.61 0 01-6.09-14.71l22.17-22.17-5.6-6.51a87.38 87.38 0 10-62.94 148 87.55 87.55 0 0082.42-58.25A16 16 0 11368 295.8a119.4 119.4 0 11-112.62-159.18 118.34 118.34 0 0186.36 36.95l.56.62 4.31 5 14.68-14.68a8.44 8.44 0 016-2.54 8.61 8.61 0 018.68 8.63z"/></svg>');
}
.curatescape-map .subject-select select {
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;
	color: color: var(--curatescape-map-color, #333);
	background: transparent;
	border: 0 none transparent;
	height: 30px;
	font-size: 16px;
	padding: 0 10px 0 2px;
	margin: 0;
	overflow: hidden;
	white-space:nowrap; 
	text-overflow: ellipsis
}

/* MAP CONTROLS FULLSCREEN */
.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"/></svg>') !important;
	background-size: 80%;
}
.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M304 416V304h112M314.2 314.23L432 432M208 96v112H96M197.8 197.77L80 80M416 208H304V96M314.23 197.8L432 80M96 304h112v112M197.77 314.2L80 432"/></svg>') !important;
	background-size: 80%;
}
.maplibregl-ctrl-fullscreen,
.maplibregl-ctrl-shrink{
	
}

/* MAP INFO WINDOWS */
#curatescape-map-figure .maplibregl-popup-content {
	padding: var(--curatescape-iw-padding, 3px);
	min-width: 220px;
}

.curatescape-iw {
	position: relative;
	overflow: hidden;
	border-radius: var(--curatescape-iw-border-radius, 3px);
	font-size: var(--curatescape-iw-font-size, 14px);
}
.curatescape-iw-content {
	color: var(--curatescape-iw-text-color, #fff);
}
.curatescape-iw-content a,
.curatescape-iw-content a:visited {
	color: var(--curatescape-iw-link-color, #eaeaea);
	transition: color 0.15s linear;
}

.curatescape-iw-content a:focus,
.curatescape-iw-content a:hover {
	color: var(--curatescape-iw-link-color-hover, var(--curatescape-iw-text-color, #fff));
}

.curatescape-iw-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	margin-top: max(50%, 100px);
	background-image: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, .75));
	padding: 0.5lh;
}

.curatescape-iw-title {
	font-weight: 600;
	padding-bottom: 0.25lh;
	margin-bottom: 0.25lh;
	border-bottom: 1px solid rgba(256, 256, 256, .2);
}

.curatescape-iw-address {
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.curatescape-iw-image {
	background: rgba(0, 0, 0);
	background-position: center 30%;
	background-size: cover;
	position: absolute;
	height: 100%;
	width: 100%;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
}

.maplibregl-popup-close-button {
	background-clip: padding-box;
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 11-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 01-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0122.62-22.62L256 233.37l52.69-52.68a16 16 0 0122.62 22.62L278.63 256z"/></svg>');
	background-size: 100%;
	background-position: center;
	background-repeat: no-repeat;
	background-color: rgba(256, 256, 256, .5);
	border-radius: 50%;
	right: 10px;
	top: 10px;
	z-index: 1;
	position: absolute;
	color: transparent;
	height: 24px;
	width: 24px;
	padding: 0;
	opacity: 0;
	transition-property: opacity, background-color;
	transition-timing-function: linear;
	transition-duration: 0.15s;
}

.maplibregl-popup-close-button:hover,
.maplibregl-popup-close-button:focus {
	background-color: rgba(256, 256, 256, 1);
}

.maplibregl-popup-content:hover .maplibregl-popup-close-button,
.maplibregl-popup-close-button:focus {
	opacity: 1;
}

@media screen and (pointer: coarse){
	.maplibregl-popup-close-button{
		opacity: 1;
	}
}

/* MAP SHORTCODE */
#curatescape-map-figure[class^='shortcode'] {
	margin-bottom: 1lh;
}