/* Hometown Grid public outage map */

/* Map */
#map, .maplibregl-map {
	position: static !important;
	z-index: auto !important;
}

.maplibregl-popup,
.maplibregl-popup-content,
.maplibregl-popup-tip {
	position: relative !important;
	z-index: 999999 !important;
}

.maplibregl-popup-content {
	padding-top: 0px;
}

.maplibregl-popup-close-button {
	font-size: 24px;
	line-height: 30px;
	color: #333;
	font-weight: bold;
	position: absolute;
	top: 5px;
	right: 3px;
}

body.is-mobile .maplibregl-ctrl-bottom-right {
	position: fixed;
	display: inline;
	bottom: 65px;
	right: 0px;
	width: 350px;
}

/* Map buttons */
#toggleRadar {
	z-index: 4;
}
#toggleRadar i {
	font-size: 14px;
}
body.is-mobile #toggleRadar {
	bottom: 220px;
}

#reset_map {
	z-index: 10;
	background-color: transparent;
	border: 0px;
}
body.is-mobile #reset_map {
	bottom: 270px;
}

/* Report an outage */
.report-outage-container a.report-outage {
	display: inline-block;
	text-align: center;
	z-index: 900;
	padding: 10px;
	border-radius: 5px;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
	text-decoration: none;
}
body:not(.is-mobile) .report-outage-container a.report-outage {
	cursor: default;
}

#footer-links {
	text-align: center;
}

/* Outage counter */
.outage-counter {
	position: absolute;
	top: 15px;
	right: 10px;
	background-color: rgba(50, 50, 50, 0.9);
	color: #fff;
	padding: 6px 12px;
	border-radius: 12px;
	font-family: 'Arial', sans-serif;
	font-size: 15px;
	font-weight: 600;
	z-index: 1000;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.3);
	display: none;
}

.outage-label {
	opacity: 0.85;
}

/* Outage type legend */
.map-legend-icons {
	position: absolute;
	top: 55px;
	right: 10px;
	z-index: 998;
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
	justify-content: flex-end;
	align-items: center;
}

.legend-icon {
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	background: rgba(255, 255, 255, 0.6);
	flex-shrink: 0;
}

.legend-icon .fa-bolt { color: #cc3333; }
.legend-icon .fa-wifi { color: #FFA500; }
.legend-icon .fa-water { color: #3333cc; }
.legend-icon .fa-tint { color: #006400; }
.legend-icon .fa-fire { color: #B8860B; text-shadow: 1px 1px 1px rgba(255,255,255,0.8); }
.legend-icon .fa-cloud-rain { color: #17A2B8; }
.legend-icon .fa-road { color: #333; }

@media (max-width: 768px) {
	.map-legend-icons {
		top: 55px;
		gap: 4px;
	}
	.legend-icon {
		width: 36px;
		height: 36px;
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.map-legend-icons {
		top: 65px;
		gap: 3px;
	}
	.legend-icon {
		width: 32px;
		height: 32px;
		font-size: 18px;
	}
}

/* Facebook updates link */
.fb-link {
	position: absolute;
	top: 55px;
	right: 10px;
	z-index: 999;
	background: #1877F2;
	color: white;
	height: 36px;
	padding: 0 12px 0 10px;
	border-radius: 18px;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-family: Arial, sans-serif;
	font-weight: 500;
	text-decoration: none;
	box-shadow: 0 2px 6px rgba(0,0,0,0.25);
	transition: transform 0.2s;
}
body.has-types .fb-link {
	top: 110px;
}
.fb-link:hover {
	transform: scale(1.05);
}
.fb-link i {
	font-size: 18px;
}
.fb-link .fa-chevron-right {
	font-size: 9px;
	margin-left: 3px;
	opacity: 0.8;
}

@media (max-width: 480px) {
	.fb-link {
		top: 50px;
		width: 36px;
		padding: 0;
		justify-content: center;
		border-radius: 50%;
	}
	body.has-types .fb-link {
		top: 110px;
	}
	.fb-link span {
		display: none;
	}
	.fb-link i {
		font-size: 20px;
	}
}

/* Terms & consent modal */
.opt-modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgb(0,0,0);
	background-color: rgba(0,0,0,0.4);
	font-family: Arial;
}

.opt-modal-content {
	background-color: #fefefe;
	margin: 15% auto;
	padding: 20px;
	border: 1px solid #888;
	width: 80%;
}

.opt-modal-content h2 {
	font-size: 20px;
}

.opt-modal-content p,
.opt-modal-content ul {
	line-height: 24px;
}

.close {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
}

.close:hover,
.close:focus {
	color: black;
	text-decoration: none;
	cursor: pointer;
}

/* Emergency alert */
.news-modal-container {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	z-index: 41000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background-color: rgba(0, 0, 0, 0.8);
}

.news-modal-content {
	position: relative;
	background-color: transparent;
	padding: 0;
	border: none;
	width: 90%;
	max-width: 700px;
	height: auto;
	max-height: 90vh;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
}

.news-modal-body {
	background-color: transparent;
	padding: 20px;
	flex: 1;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #333;
	height: 100%;
	display: block;
	position: relative;
	overflow: hidden;
}

.news-flash {
	background-color: #f8f8f8;
	border-left: 4px solid #e74c3c;
	padding: 15px;
	margin-bottom: 15px;
	border-radius: 6px;
	font-weight: 500;
	overflow-y: auto;
	max-height: 70vh;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	display: block;
	position: relative;
}

.news-flash .news-close {
	position: absolute;
	top: 3px;
	right: 10px;
}

.news-flash-title {
	color: #e74c3c;
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 8px;
}

.alert-button {
	position: fixed;
	top: 60px;
	right: 10px;
	background-color: #e74c3c;
	color: white;
	border-radius: 8px;
	padding: 10px 15px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	z-index: 9000;
	transition: all 0.2s ease;
}
body.has-types .alert-button {
	top: 105px;
}

.alert-button:hover {
	background-color: #c0392b;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.alert-button i {
	margin-right: 8px;
}

@media (max-width: 600px) {
	.news-modal-content {
		width: 95%;
		max-height: 90%;
	}
	.news-modal-body {
		padding: 15px;
		font-size: 15px;
	}
	.news-flash {
		padding: 12px;
	}
}

/* Hub preview overlays (only on the hub's map setup screen) */
#iphone_overlay {
	position: absolute;
	width: 350px;
	height: 844px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border: 2px solid red;
	box-sizing: border-box;
	z-index: 12000;
}

#admin_overlay {
	position: absolute;
	width: 600px;
	height: 524px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border: 2px solid red;
	box-sizing: border-box;
	z-index: 12000;
}

.crosshair-vertical, .crosshair-horizontal {
	position: absolute;
	background-color: red;
}
.crosshair-vertical {
	width: 2px; height: 100%; top: 0; left: 50%;
}
.crosshair-horizontal {
	height: 2px; width: 100%; top: 50%; left: 0;
}
