/**
 * Eye Out Maps frontend styles.
 *
 * @package EyeOutMaps
 */

/*
 * Main map container.
 *
 * The height is normally supplied by the shortcode. A minimum height keeps
 * the map usable if a theme or page builder strips the inline height value.
 */
.eye-out-map {
	position: relative;
	width: 100%;
	min-height: 400px;
	overflow: hidden;
	background: #eef1ed;
	border: 1px solid #d6d9d4;
	border-radius: 8px;
}

/*
 * Leaflet must receive a container with a defined height.
 */
.eye-out-map.leaflet-container {
	font-family: inherit;
	z-index: 1;
}

/*
 * Keep Leaflet controls above the map tiles without interfering with the
 * WordPress administration toolbar or site navigation.
 */
.eye-out-map .leaflet-control-container {
	position: relative;
	z-index: 500;
}

/*
 * Popup typography should inherit the site's general appearance.
 */
.eye-out-map .leaflet-popup-content-wrapper,
.eye-out-map .leaflet-popup-tip {
	background: #ffffff;
	color: #252525;
}

.eye-out-map .leaflet-popup-content {
	min-width: 180px;
	margin: 14px 16px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
}

.eye-out-map .leaflet-popup-content p {
	margin: 0 0 8px;
}

.eye-out-map .leaflet-popup-content p:last-child {
	margin-bottom: 0;
}

/*
 * Future popup structure.
 */
.eye-out-map-popup__title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

.eye-out-map-popup__meta {
	margin-bottom: 10px;
	color: #555555;
}

.eye-out-map-popup__link {
	display: inline-block;
	padding: 7px 12px;
	border-radius: 4px;
	background: #643a86;
	color: #ffffff;
	font-weight: 600;
	text-decoration: none;
}

.eye-out-map-popup__link:hover,
.eye-out-map-popup__link:focus {
	background: #4e2c69;
	color: #ffffff;
	text-decoration: none;
}

/*
 * Loading and error messages used by the JavaScript map engine.
 */
.eye-out-map__status {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 600;
	width: calc(100% - 40px);
	max-width: 420px;
	padding: 14px 18px;
	transform: translate(-50%, -50%);
	border: 1px solid #d6d9d4;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.95);
	color: #252525;
	text-align: center;
}

.eye-out-map__status--error {
	border-color: #b32d2e;
	color: #8a2424;
}

/*
 * Prevent map images from inheriting restrictive theme image rules.
 */
.eye-out-map img {
	max-width: none;
}

/*
 * Mobile adjustments.
 */
@media screen and (max-width: 782px) {
	.eye-out-map {
		min-height: 360px;
		border-radius: 4px;
	}

	.eye-out-map .leaflet-popup-content {
		min-width: 150px;
		margin: 12px 14px;
		font-size: 14px;
	}
}