#top {
	position:absolute;
	left:0px;
	top:0px;
	right:0px;
	border-bottom:1px solid #ccc;
	background:#f8f9fa;
	padding:3px 4px;
	z-index:5;
}
#top nav {
	min-height:0;
}
#map {
	position:absolute;
	left:0px;
	top:2.6em;
	bottom:0px;
	right:0px;
	z-index:2;
}
#busy {
	display:none;
}
#update {
	display:none;
}
#options {
	display:none;
}
#interface_language_wrapper {
	margin-right:5px;
	white-space:nowrap;
}
#wdfist {
	display:none;
}
#flickr {
	display:none;
}
#search_dialog {
	display:none;
}
#app_login_dialog {
	display:none;
}
#sparql_filter_dialog {
	display:none;
}
#search_results {
	display:none;
	max-height:30em;
	overflow:auto;
	margin-top:10px;
}
#is_using_filter {
	display:none;
}
#dropdownUploadsLi {
	display:none;
}
div.thumb {
	margin:3px;
}
div.smallimgname {
	font-size:8pt;
}
div.popup_coords {
	margin-top:5px;
	padding-top:2px;
	font-family:Courier;
	font-size:10pt;
	border-top:1px solid #DDD;
}
div.sr_title {
	font-size:12pt;
	font-weight:bold;
}
div.sr_auto {
	font-size:10pt;
}
div.sr_manual {
	font-size:9pt;
}
li.sr_result {
	cursor:pointer;
}
div.add_image2item {
	margin-top:15px;
	padding-top:5px;
	border-top:1px solid #DDD
}
div.popup_section {
	margin-top:3px;
	padding:2px;
	border-top:1px solid #DDD
}

/* --- User status icon --- */
#user_status_icon {
	padding:0 4px;
	line-height:1;
}
#user_menu_item a {
	text-decoration:none;
	color:inherit;
}
#user_menu_item a:hover {
	text-decoration:underline;
}
#logout_link {
	color:#dc3545 !important;
}

/* --- Offline indicator --- */
#offline_banner {
	display:none;
	position:fixed;
	bottom:0;
	left:0;
	right:0;
	background:#dc3545;
	color:white;
	text-align:center;
	padding:6px;
	font-size:13px;
	z-index:9999;
}
#offline_banner.online_restored {
	background:#28a745;
}

/* --- Mobile responsive --- */
@media (max-width: 768px) {
	/* Larger touch targets on mobile */
	#top nav .btn {
		min-width:40px;
		min-height:40px;
		padding:6px 10px;
		font-size:16px;
	}
	#top nav .fa-lg {
		font-size:20px;
	}

	/* Toolbar takes less vertical space */
	#top {
		padding:2px 3px;
	}
	#map {
		top:3em;
	}

	/* Popups: wider and more readable */
	.leaflet-popup-content-wrapper {
		max-width:85vw !important;
	}
	.leaflet-popup-content {
		font-size:14px;
		margin:8px 10px;
	}
	.leaflet-popup-content img {
		max-width:100% !important;
		height:auto !important;
	}

	/* Upload button more prominent on mobile */
	.btn-file {
		font-size:16px;
		padding:10px 16px;
	}

	/* Search results: larger tap targets */
	li.sr_result {
		padding:12px 10px;
		font-size:14px;
	}

	/* Modals: near full-screen on mobile */
	.modal-dialog {
		margin:10px;
		max-width:calc(100vw - 20px);
	}
	.modal-body {
		max-height:70vh;
		overflow-y:auto;
	}

	/* Coordinates text smaller on mobile to save space */
	div.popup_coords {
		font-size:9pt;
	}

	/* Geo error text */
	#geo_error {
		max-width:120px;
		overflow:hidden;
		text-overflow:ellipsis;
	}
}

/* Dark mode map tile inversion */
.dark-tiles .leaflet-tile-pane {
	filter: invert(1) hue-rotate(180deg);
}

/* Very small screens (phones in portrait) */
@media (max-width: 400px) {
	#top nav .btn {
		min-width:36px;
		min-height:36px;
		padding:4px 8px;
	}
}
