html, body {
	height: 100%;
	margin: 0;
	padding: 0;
}

#map {
	height: 100%;
	width: 100%;
	margin-left: 320px;
	width: calc(100% - 320px);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.place-search {
	position: fixed;
	top: 18px;
	left: 50%;
	z-index: 1000;
	display: flex;
	width: min(540px, calc(100vw - 40px));
	transform: translateX(-50%);
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 3px 14px rgba(15, 23, 42, 0.24);
}

.place-search input {
	min-width: 0;
	flex: 1;
	border: 0;
	border-radius: 8px 0 0 8px;
	padding: 12px 14px;
	color: #172033;
	font: 14px/1.2 system-ui, sans-serif;
	outline: 0;
}

.place-search > button {
	position: relative;
	display: grid;
	place-items: center;
	width: 48px;
	min-height: 44px;
	border: 0;
	border-radius: 0 8px 8px 0;
	padding: 0;
	background: #2563eb;
	color: #ffffff;
	font: 700 13px/1 system-ui, sans-serif;
	cursor: pointer;
}

.search-icon {
	position: relative;
	display: block;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-radius: 50%;
}

.search-icon::after {
	content: "";
	position: absolute;
	width: 7px;
	height: 2px;
	right: -6px;
	bottom: -3px;
	border-radius: 2px;
	background: currentColor;
	transform: rotate(45deg);
}

.place-search > button:disabled {
	cursor: wait;
	opacity: 0.65;
}

.place-search-results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	display: grid;
	gap: 2px;
	max-height: 280px;
	overflow-y: auto;
	border-radius: 6px;
	background: #ffffff;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

.place-search-result,
.place-search-message {
	padding: 10px 12px;
	font: 13px/1.3 system-ui, sans-serif;
}

.place-search-result {
	border: 0;
	background: #ffffff;
	color: #172033;
	text-align: left;
	cursor: pointer;
}

.place-search-result:hover,
.place-search-result:focus-visible {
	background: #eff6ff;
	outline: 0;
}

.place-search-message {
	color: #64748b;
}

body.sidebar-minimized #map {
	margin-left: 56px;
	width: calc(100% - 56px);
}

.hazards-sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 900;
	width: 320px;
	box-sizing: border-box;
	padding: 24px 18px;
	overflow-y: auto;
	background: #f8fafc;
	border-right: 1px solid #cbd5e1;
	color: #172033;
	font: 14px/1.4 system-ui, sans-serif;
	transition: width 160ms ease;
}

.hazards-sidebar.is-minimized {
	width: 56px;
	padding: 14px 10px;
}

.hazards-sidebar-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.hazards-sidebar-toggle {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
	background: #ffffff;
	color: #334155;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.hazards-sidebar.is-minimized .hazards-sidebar-header {
	justify-content: center;
}

.hazards-sidebar.is-minimized .hazards-sidebar-toggle {
	transform: none;
}

.hazards-sidebar.is-minimized h1,
.hazards-sidebar.is-minimized > p,
.hazards-sidebar.is-minimized .hazard-list {
	display: none;
}

.hazards-sidebar.is-minimized .hazard-tabs {
	display: none;
}

.hazards-sidebar.is-minimized .report-toggle {
	display: none;
}

.hazards-sidebar h1 {
	margin: 0;
	font-size: 20px;
}

.hazards-sidebar p {
	margin: 4px 0 18px;
	color: #64748b;
	font-size: 12px;
}

.hazard-list {
	display: grid;
	gap: 10px;
}

.hazard-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	margin: 0 0 14px;
	padding: 3px;
	border-radius: 6px;
	background: #e2e8f0;
}

.hazard-tab {
	border: 0;
	border-radius: 4px;
	padding: 8px 6px;
	background: transparent;
	color: #64748b;
	font: 700 12px/1.2 system-ui, sans-serif;
	cursor: pointer;
}

.hazard-tab.is-active {
	background: #ffffff;
	color: #172033;
}

.hazard-item {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #e2e8f0;
	border-left: 4px solid #ef4444;
	border-radius: 6px;
	padding: 12px;
	background: #ffffff;
	color: #172033;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.hazard-map-focus {
	display: block;
	width: 100%;
	border: 0;
	padding: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.hazard-item:hover,
.hazard-item:focus-visible {
	border-color: #94a3b8;
	outline: 0;
}

.hazard-item-header {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-weight: 700;
}

.hazard-distance {
	flex: 0 0 auto;
	color: #b91c1c;
	font-size: 12px;
}

.hazard-details {
	display: block;
	margin-top: 4px;
	color: #64748b;
	font-size: 12px;
}

.hazard-active-count {
	display: block;
	margin-top: 6px;
	color: #b91c1c;
	font-size: 12px;
	font-weight: 700;
}

.hazard-posted-time {
	display: block;
	margin-top: 3px;
	color: #94a3b8;
	font-size: 11px;
}

.hazard-vote,
.hazard-active-vote,
.hazard-google-maps {
	display: block;
	width: 100%;
	margin-top: 10px;
	border: 0;
	border-radius: 4px;
	padding: 7px 8px;
	background: #fee2e2;
	color: #991b1b;
	font: 700 12px/1.2 system-ui, sans-serif;
	text-align: left;
	cursor: pointer;
}

.hazard-google-maps {
	margin-top: 6px;
	background: #e2e8f0;
	color: #334155;
	box-sizing: border-box;
	text-decoration: none;
}

.hazard-vote:hover,
.hazard-vote:focus-visible,
.hazard-active-vote:hover,
.hazard-active-vote:focus-visible,
.hazard-google-maps:hover,
.hazard-google-maps:focus-visible {
	background: #fecaca;
	outline: 0;
}

.hazard-vote:disabled,
.hazard-active-vote:disabled,
.hazard-google-maps:disabled {
	cursor: default;
	opacity: 0.65;
}

.hazard-empty {
	margin: 0;
	padding: 16px 4px;
	color: #64748b;
}

@media (max-width: 700px) {
	.place-search {
		top: 14px;
		left: 16px;
		width: calc(100vw - 32px);
		transform: none;
	}

	#map {
		margin-left: 0;
		width: 100%;
	}

	.hazards-sidebar {
		top: auto;
		width: 100%;
		max-height: 42vh;
		padding: 14px 16px;
		border-top: 1px solid #cbd5e1;
		border-right: 0;
	}

	body.sidebar-minimized #map {
		margin-left: 0;
		width: 100%;
	}

	.hazards-sidebar.is-minimized {
		width: 100%;
		max-height: 56px;
	}

	.hazards-sidebar h1 {
		font-size: 17px;
	}

	.hazards-sidebar p {
		margin-bottom: 10px;
	}
}

.report-toggle {
	display: block;
	width: 100%;
	margin-top: 18px;
	border: 0;
	border-radius: 7px;
	padding: 12px 16px;
	background: #b91c1c;
	color: #ffffff;
	font: 700 14px/1.2 system-ui, sans-serif;
	cursor: pointer;
}

.auth-controls {
	position: fixed;
	top: 20px;
	right: 16px;
	z-index: 1000;
	display: flex;
}

.auth-controls button {
	border: 0;
	border-radius: 7px;
	padding: 11px 16px;
	background: #2563eb;
	color: #ffffff;
	font: 700 14px/1.2 system-ui, sans-serif;
	cursor: pointer;
}

.auth-controls button:disabled {
	cursor: wait;
	opacity: 0.65;
}

.github-link {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 1100;
	border-radius: 5px;
	padding: 8px 10px;
	background: rgba(255, 255, 255, 0.94);
	color: #334155;
	font: 700 13px/1 system-ui, sans-serif;
	text-decoration: none;
}

.github-link:hover,
.github-link:focus-visible {
	background: #ffffff;
	color: #1d4ed8;
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.report-panel {
	display: none;
	position: fixed;
	top: 72px;
	right: 20px;
	z-index: 1000;
	width: min(360px, calc(100vw - 40px));
	box-sizing: border-box;
	padding: 20px;
	border-radius: 10px;
	background: #ffffff;
	color: #172033;
	font: 14px/1.4 system-ui, sans-serif;
	box-shadow: 0 8px 30px rgba(15, 23, 42, 0.25);
}

.report-panel.is-open { display: block; }

.report-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.report-header h1 { margin: 0; font-size: 20px; }

.report-header p,
.report-location {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 12px;
}

.report-auth-notice {
	display: grid;
	gap: 5px;
	margin: 14px 0;
	border: 1px solid #f59e0b;
	border-radius: 6px;
	padding: 12px;
	background: #fffbeb;
	color: #92400e;
	font-size: 12px;
}

.report-auth-notice button {
	justify-self: start;
	margin-top: 3px;
	border: 0;
	border-radius: 5px;
	padding: 8px 10px;
	background: #2563eb;
	color: #ffffff;
	font: 700 12px/1.2 system-ui, sans-serif;
	cursor: pointer;
}

.report-auth-notice.is-hidden {
	display: none;
}

.report-close {
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.report-panel label {
	display: block;
	margin: 12px 0 6px;
	font-weight: 700;
}

.report-panel select,
.report-panel textarea,
.report-panel input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 10px;
	color: #172033;
	font: inherit;
}

.custom-hazard-field[hidden] {
	display: none;
}

.report-panel textarea { min-height: 74px; resize: vertical; }

.report-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}

.report-actions button {
	border: 0;
	border-radius: 6px;
	padding: 10px 14px;
	font: 700 14px/1.2 system-ui, sans-serif;
	cursor: pointer;
}

.report-cancel { background: #e2e8f0; color: #334155; }
.report-submit { background: #b91c1c; color: #ffffff; }
.report-submit:disabled { cursor: wait; opacity: 0.65; }

.report-status {
	min-height: 20px;
	margin: 12px 0 0;
	font-size: 13px;
}

.report-status.success { color: #166534; }
.report-status.error { color: #b91c1c; }

@media (max-width: 700px) {
	.auth-controls {
		top: 64px;
		right: 16px;
	}
}

.gps-marker {
	position: relative;
	width: 16px;
	height: 16px;
}

.gps-dot,
.gps-pulse {
	width: 14px;
	height: 14px;
	position: absolute;
	top: 50%;
	left: 50%;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

.gps-dot {
	background-color: #2563eb;
	border: 2px solid #ffffff;
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
	z-index: 2;
}

.gps-pulse {
	background-color: #3b82f6;
	animation: pulse-ring 2s infinite ease-out;
	z-index: 1;
}

@keyframes pulse-ring {
	0% { width: 14px; height: 14px; opacity: 0.8; }
	70% { width: 44px; height: 44px; opacity: 0; }
	100% { opacity: 0; }
}
