@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* Force pointer cursor on all buttons globally */
button,
.hamburger-btn,
.your-location-btn,
[role="button"],
[onclick] {
	cursor: pointer !important;
}

/* Aggressive override for ALL Google Maps elements */
.gm-control-active img,
.gm-control-active button,
.gmnoprint button,
.gmnoprint div,
.gm-bundled-control button {
	cursor: pointer !important;
}
body, html {
	height: 100%;
	overflow: hidden;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Star rating display - force emoji-friendly font */
.star-rating {
	font-family: Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
	color: #FFD700;
	font-size: 16px;
	display: inline-block;
}

/* Dark mode styles */
body.dark-mode .location-status,
body.dark-mode .hamburger-menu,
body.dark-mode .hamburger-btn,
body.dark-mode .menu-dropdown,
body.dark-mode .dialog,
body.dark-mode .dialog input,
body.dark-mode .dialog textarea,
body.dark-mode .dialog select,
body.dark-mode #mapSearch,
body.dark-mode #customSearchDropdown {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
	border-color: #444 !important;
}

body.dark-mode .hamburger-btn span {
	background: #e0e0e0 !important;
}

body.dark-mode .menu-item:hover,
body.dark-mode .dialog-btn:hover {
	background: #333 !important;
}

body.dark-mode .dialog-btn.primary {
	background: #2a5cb8 !important;
	color: white !important;
}

body.dark-mode .dialog-btn.primary:hover {
	background: #1e4a94 !important;
}

body.dark-mode .dialog-btn.cancel {
	background: #444 !important;
	color: #e0e0e0 !important;
}

body.dark-mode .dialog-btn.delete {
	background: #8b2e2e !important;
}

body.dark-mode label,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode p,
body.dark-mode strong {
	color: #e0e0e0 !important;
}

body.dark-mode .checkbox-wrapper,
body.dark-mode .category-checkboxes {
	background: transparent !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
	color: #888 !important;
}

body.dark-mode hr {
	border-color: #444 !important;
}

.dialog-text {
	margin: 5px 0;
	color: #666;
}

body.dark-mode .dialog-text {
	color: #aaa !important;
}

body.dark-mode .category-item {
	background: #2a2a2a !important;
	color: #e0e0e0 !important;
}

body.dark-mode .category-item div,
body.dark-mode .category-item span {
	color: #e0e0e0 !important;
}

body.dark-mode .category-item .icon-preview {
	background: #1e1e1e !important;
	border-color: #444 !important;
}

body.dark-mode #viewInGMaps,
body.dark-mode #poiViewInGMaps,
body.dark-mode #startNavigation,
body.dark-mode #poiStartNavigation {
	color: #6ba3ff !important;
}

/* Style Google Map controls - pointer cursor for all buttons */
#map button,
#map div[role="button"],
#map [draggable="false"],
.gm-style button,
.gm-style .gm-style-mtc button,
.gm-style .gm-style-mtc div,
.gm-style .gm-style-mtc,
.gm-control-active,
.gm-ui-hover-effect,
.gm-style-mtc {
	cursor: pointer !important;
}

/* Style Google Map controls in dark mode */
body.dark-mode .gm-style .gm-style-mtc,
body.dark-mode .gm-style button {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
	border-color: #444 !important;
}

body.dark-mode .gm-style .gm-style-mtc > div {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
}

body.dark-mode .gm-style-mtc label {
	color: #e0e0e0 !important;
}

body.dark-mode .gm-style button:hover {
	background: #333 !important;
}

/* Google Map Type dropdown (Map/Satellite) */
body.dark-mode .gm-style .gm-style-mtc button,
body.dark-mode .gm-style .gm-style-mtc span {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
}

body.dark-mode .gm-style .gm-style-mtc button:hover {
	background: #333 !important;
}

/* Google Map dropdown menu items */
body.dark-mode .gm-style .gm-style-mtc div,
body.dark-mode .gm-style .gm-style-mtc ul,
body.dark-mode .gm-style .gm-style-mtc li {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
}

body.dark-mode .gm-style .gm-style-mtc div:hover {
	background: #333 !important;
}

/* All Google control containers */
body.dark-mode .gm-control-active {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
}

/* Google Maps InfoWindow styles */
body.dark-mode .gm-style .gm-style-iw-c {
	background: #1e1e1e !important;
	box-shadow: 0 2px 7px 1px rgba(0,0,0,0.5) !important;
}

body.dark-mode .gm-style .gm-style-iw-d {
	overflow: auto !important;
}

body.dark-mode .gm-style .gm-style-iw-t::after {
	background: linear-gradient(45deg,#1e1e1e 50%,rgba(30,30,30,0) 51%,rgba(30,30,30,0) 100%) !important;
	box-shadow: -2px 2px 2px 0 rgba(0,0,0,0.3) !important;
}

body.dark-mode .gm-ui-hover-effect {
	opacity: 0.6 !important;
}

body.dark-mode .gm-ui-hover-effect > span {
	background-color: #e0e0e0 !important;
}

/* Menu items text color */
body.dark-mode .menu-item {
	color: #e0e0e0 !important;
	border-bottom-color: #444 !important;
}

/* Hide Pegman (Street View control) */
.gm-svpc {
	display: none !important;
}

/* Theme toggle button */
#themeToggleButton {
	cursor: pointer !important;
}

/* Theme toggle button dark mode */
body.dark-mode #themeToggleDiv {
	background: #1e1e1e !important;
}

body.dark-mode #themeToggleButton {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
}

#map {
	width: 100%;
	height: 100%;
}

/* Ensure all map controls show pointer cursor */
#map * {
	cursor: inherit;
}

#map button,
#map div[tabindex="0"],
#map img[role="button"] {
	cursor: pointer !important;
}
.location-status {
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	background: white;
	padding: 10px 20px;
	border-radius: 5px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	z-index: 1000;
	display: none;
}
.hamburger-menu {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1000;
	background: white;
	border-radius: 5px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.hamburger-btn {
	width: 50px;
	height: 50px;
	background: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 0;
}
.hamburger-btn:hover {
	background: #f5f5f5;
}
.hamburger-btn span {
	width: 25px;
	height: 3px;
	background: #333;
	border-radius: 2px;
}
.menu-dropdown {
	display: none;
	position: absolute;
	top: 60px;
	right: 0;
	background: white;
	border-radius: 5px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	min-width: 200px;
}
.menu-dropdown.active {
	display: block;
}
.menu-item {
	padding: 15px 20px;
	cursor: pointer;
	border-bottom: 1px solid #eee;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	color: #333;
	display: flex;
	justify-content: center;
	align-items: center;
	white-space: nowrap;
	text-align: center;
}
.menu-item:last-child {
	border-bottom: none;
}
.menu-item:hover {
	background: #f5f5f5;
}
.clear-filter-btn {
	color: #4285F4;
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 3px;
	transition: background 0.2s;
}
.clear-filter-btn:hover {
	background: rgba(66, 133, 244, 0.1);
}
body.dark-mode .clear-filter-btn {
	color: #6ba3ff;
}
body.dark-mode .clear-filter-btn:hover {
	background: rgba(107, 163, 255, 0.1);
}
.menu-item-parent {
	position: relative;
	display: flex;
	flex-direction: column;
	text-align: left;
	justify-content: flex-start;
	background: #162c42;
	color: #fff;
}
.menu-item-parent:hover {
	background: #1e3a54;
}
.submenu {
	max-height: 0;
	overflow: hidden;
	padding-left: 20px;
	background: #f9f9f9;
	border-left: 3px solid #4285F4;
	width: 100%;
	margin-top: 0;
	transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
	opacity: 0;
}
.submenu.active {
	max-height: 800px;
	opacity: 1;
}
.submenu .menu-item {
	padding: 10px 15px;
	font-size: 13px;
	border-bottom: 1px solid #eee;
	display: flex;
	align-items: center;
	cursor: pointer;
	justify-content: flex-start;
	text-align: left;
}
.submenu .menu-item label {
	flex: 1;
	margin: 0;
	cursor: pointer;
	user-select: none;
}
.submenu .menu-item:last-child {
	border-bottom: none;
}
body.dark-mode .submenu {
	background: #2a2a2a;
	border-left-color: #4285F4;
}

/* Places submenu checkbox styling */
.submenu .menu-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #4285F4;
}

.submenu .menu-item input[type="checkbox"]:checked + label {
	color: #4285F4;
	font-weight: 600;
}

.submenu .menu-item:has(input[type="checkbox"]:checked) {
	background: rgba(66, 133, 244, 0.08);
}

body.dark-mode .submenu .menu-item input[type="checkbox"]:checked + label {
	color: #6ba3ff;
}

body.dark-mode .submenu .menu-item:has(input[type="checkbox"]:checked) {
	background: rgba(107, 163, 255, 0.15);
}

/* Special styling for "All" checkbox */
#placesAllBtn {
	font-weight: 600;
}

#placesAllBtn input[type="checkbox"]:checked + label {
	color: #1967D2;
}

body.dark-mode #placesAllBtn input[type="checkbox"]:checked + label {
	color: #8ab4f8;
}

.dialog-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	z-index: 2000;
	align-items: center;
	justify-content: center;
}
.dialog-overlay.active {
	display: flex;
}
.dialog {
	background: white;
	border-radius: 8px;
	padding: 20px;
	width: 90%;
	max-width: 400px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.dialog h2 {
	margin: 0 0 20px 0;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 20px;
	color: #333;
}
.dialog label {
	display: block;
	margin-bottom: 8px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	color: #666;
}
.dialog input[type="text"] {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	margin-bottom: 15px;
	box-sizing: border-box;
}
.dialog input[type="text"]:disabled {
	background: #f5f5f5;
	color: #999;
	cursor: not-allowed;
}
.checkbox-wrapper {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
}
.checkbox-wrapper input[type="checkbox"] {
	margin-right: 8px;
	cursor: pointer;
}
.checkbox-wrapper label {
	margin: 0;
	cursor: pointer;
	color: #333;
}
.dialog-buttons {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}
.dialog-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	cursor: pointer;
}
.dialog-btn.cancel {
	background: #f5f5f5;
	color: #333;
}
.dialog-btn.cancel:hover {
	background: #e0e0e0;
}
.dialog-btn.primary {
	background: #4285F4;
	color: white;
}
.dialog-btn.primary:hover {
	background: #3367D6;
}
.dialog-large {
	max-width: 500px;
	max-height: 90vh;
	overflow-y: auto;
}
.dialog textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	margin-bottom: 15px;
	box-sizing: border-box;
	resize: vertical;
}
.dialog select {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	margin-bottom: 15px;
	box-sizing: border-box;
	background: white;
	cursor: pointer;
}
.category-checkboxes {
	margin-bottom: 15px;
	padding: 10px;
	background: #f9f9f9;
	border-radius: 4px;
}
.category-checkboxes .checkbox-wrapper {
	margin-bottom: 8px;
}
.category-checkboxes .checkbox-wrapper:last-child {
	margin-bottom: 0;
}
.pac-container {
	z-index: 3000 !important;
}
.scrollable-list {
	max-height: 400px;
	overflow-y: auto;
	overflow-x: hidden;
	margin-bottom: 20px;
	padding-right: 5px;
}

.scrollable-list::-webkit-scrollbar {
	width: 8px;
}

.scrollable-list::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.scrollable-list::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

.scrollable-list::-webkit-scrollbar-thumb:hover {
	background: #555;
}

body.dark-mode .scrollable-list::-webkit-scrollbar-track {
	background: #2a2a2a;
}

body.dark-mode .scrollable-list::-webkit-scrollbar-thumb {
	background: #555;
}

body.dark-mode .scrollable-list::-webkit-scrollbar-thumb:hover {
	background: #777;
}

.category-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	background: #f9f9f9;
	border-radius: 4px;
	margin-bottom: 10px;
}
.category-item input[type="text"] {
	flex: 1;
	margin-bottom: 0;
}
.category-item select {
	width: 150px;
	margin-bottom: 0;
}
.category-item .icon-preview {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
}
.category-item .icon-preview img {
	width: 24px;
	height: 24px;
}
.category-item button {
	padding: 5px 10px;
	background: #f44336;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
}
.category-item button:hover {
	background: #d32f2f;
}
#editSpotDialog.active {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	padding: 20px;
}

#editSpotDialog .dialog {
	margin-left: 0;
	margin-top: 20px;
	max-height: calc(100vh - 40px);
}

/* Flip autocomplete dropdown to show above the search box */
.pac-container {
	position: absolute !important;
	bottom: 60px !important;
	top: auto !important;
	transform: translateY(0) !important;
}

/* Context menu */
.context-menu {
	position: fixed;
	background: white;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.4);
	z-index: 10000;
	min-width: 200px;
	padding: 8px 0;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	display: none;
}

.context-menu.active {
	display: block;
}

.context-menu-item {
	padding: 16px 20px;
	cursor: pointer;
	font-size: 16px;
	color: #333;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	border-bottom: 1px solid #eee;
}

.context-menu-item:last-child {
	border-bottom: none;
}

.context-menu-item:hover,
.context-menu-item:active {
	background: #f5f5f5;
}

body.dark-mode .context-menu {
	background: #1e1e1e;
	box-shadow: 0 4px 20px rgba(0,0,0,0.7);
}

body.dark-mode .context-menu-item {
	color: #e0e0e0;
	border-bottom-color: #444;
}

body.dark-mode .context-menu-item:hover,
body.dark-mode .context-menu-item:active {
	background: #333;
}

/* Your Location Button */
.your-location-btn {
	position: absolute;
	bottom: 160px;
	right: 10px;
	z-index: 1000;
	width: 40px;
	height: 40px;
	background: white;
	border: none;
	border-radius: 2px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	transition: background 0.2s;
}

.your-location-btn:hover {
	background: #f5f5f5;
}

.your-location-btn:active {
	background: #e0e0e0;
}

body.dark-mode .your-location-btn {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
	box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

body.dark-mode .your-location-btn:hover {
	background: #333 !important;
}

body.dark-mode .your-location-btn:active {
	background: #444 !important;
}

/* Toggle Buttons (Trails & Media) */
.toggle-btn {
	position: absolute;
	right: 10px;
	z-index: 1000;
	width: 40px;
	height: 40px;
	background: white;
	border: none;
	border-radius: 2px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	color: #000000;
}

.toggle-btn svg {
	width: 24px;
	height: 24px;
}

.toggle-btn:hover {
	background: #f5f5f5;
	color: #333;
}

.toggle-btn:active {
	background: #e0e0e0;
}

.toggle-btn.active {
	background: #e3f2fd;
	color: #1976d2;
}

#togglePlacesBtn {
	bottom: 310px;
}

#toggleTrailsBtn {
	bottom: 260px;
}

#toggleMediaBtn {
	bottom: 210px;
}

body.dark-mode .toggle-btn {
	background: #1e1e1e !important;
	box-shadow: 0 2px 6px rgba(0,0,0,0.5);
	color: #ffffff;
}

body.dark-mode .toggle-btn:hover {
	background: #333 !important;
	color: #e0e0e0;
}

body.dark-mode .toggle-btn:active {
	background: #444 !important;
}

body.dark-mode .toggle-btn.active {
	background: #1a237e !important;
	color: #64b5f6;
}

/* Fullscreen Toggle Button */
.fullscreen-btn {
	position: absolute;
	bottom: 160px;
	left: 10px;
	z-index: 1000;
	width: 40px;
	height: 40px;
	background: white;
	border: none;
	border-radius: 2px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	transition: background 0.2s;
}

.fullscreen-btn:hover {
	background: #f5f5f5;
}

.fullscreen-btn:active {
	background: #e0e0e0;
}

body.dark-mode .fullscreen-btn {
	background: #1e1e1e !important;
	color: #e0e0e0 !important;
	box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

body.dark-mode .fullscreen-btn:hover {
	background: #333 !important;
}

body.dark-mode .fullscreen-btn:active {
	background: #444 !important;
}

/* Hide Google Maps camera/rotate controls */
.gm-svpc,
.gm-compass,
button[aria-label*="Rotate"],
button[aria-label*="Tilt"],
button[aria-label*="rotate"],
button[aria-label*="tilt"],
.gm-control-active.gm-fullscreen-control {
	display: none !important;
}

/* UI fade on inactivity */
.ui-element {
	transition: opacity 0.5s ease;
	opacity: 1;
}

.ui-element.faded {
	opacity: 0.1;
}

/* Apply to Google Maps controls */
.gmnoprint.faded,
.gm-style-mtc.faded {
	opacity: 0.1 !important;
}