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

html, body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: #f5f5f5;
	min-height: 100vh;
	height: 100%;
	overflow-x: hidden;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

h1 {
	color: #333;
	margin-bottom: 20px;
	text-align: center;
}

.description {
	background: white;
	border-radius: 8px;
	padding: 15px 20px;
	margin-bottom: 20px;
	box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
	color: #555;
	line-height: 1.6;
}

.description a {
	color: #0078d4;
	text-decoration: none;
}

.description a:hover {
	text-decoration: underline;
}

.main-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.input-section {
	background: white;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

.input-section h2 {
	color: #444;
	margin-bottom: 15px;
	font-size: 1.2rem;
}

textarea {
	width: 100%;
	height: 300px;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	font-size: 12px;
	resize: vertical;
	line-height: 1.4;
}

textarea:focus {
	outline: none;
	border-color: #0078d4;
	box-shadow: 0 0 0 2px rgb(0 120 212 / 20%);
}

button {
	margin-top: 15px;
	padding: 12px 24px;
	background: #0078d4;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s;
}

button:hover {
	background: #006cbd;
}

.button-row {
	margin-top: 15px;
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.button-row button {
	margin-top: 0;
}

.file-upload-btn {
	padding: 12px 24px;
	background: #28a745;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s;
}

.file-upload-btn:hover {
	background: #218838;
}

.file-upload-btn input[type="file"] {
	display: none;
}

.clear-btn {
	background: #6c757d;
}

.clear-btn:hover {
	background: #5a6268;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.95rem;
	color: #333;
	cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

.sofia-link {
	color: #0078d4;
	text-decoration: none;
	font-size: 0.95rem;
}

.sofia-link:hover {
	text-decoration: underline;
}

.map-section {
	background: white;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

.map-section h2 {
	color: #444;
	margin-bottom: 15px;
	font-size: 1.2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.fullscreen-btn,
.print-btn {
	margin: 0;
	padding: 5px 12px;
	font-size: 0.85rem;
	background: #cce5ff;
	color: #004085;
}

.fullscreen-btn:hover,
.print-btn:hover {
	background: #b8daff;
}

.print-btn {
	margin-right: 8px;
}

.map-buttons {
	display: flex;
	gap: 8px;
}

.map-buttons .print-btn {
	margin-right: 0;
}

#map {
	height: 1000px;
	border-radius: 4px;
	border: 1px solid #ddd;
}

.map-fullscreen {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	max-height: 100vh !important;
	z-index: 9999;
	border-radius: 0;
	border: none;
	margin: 0 !important;
	padding: 0 !important;
}

.map-fullscreen-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 9998;
	background: white;
	padding: 0;
	margin: 0;
	border-radius: 0;
}

.map-fullscreen-container .map-buttons {
	position: fixed;
	top: 10px;
	right: 10px;
	z-index: 10000;
}

/* Move layer control down in fullscreen mode to avoid overlap with buttons */
.map-fullscreen .leaflet-top.leaflet-right {
	top: 40px !important;
}

.results-section {
	background: white;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

.results-section h2 {
	color: #444;
	margin-bottom: 15px;
	font-size: 1.2rem;
}

.coordinates-list {
	list-style: none;
}

.coordinates-list li {
	padding: 10px 15px;
	background: #f8f9fa;
	margin-bottom: 8px;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	font-size: 13px;
	border-left: 3px solid #0078d4;
}

.notam-header {
	cursor: pointer;
}

.no-results {
	color: #666;
	font-style: italic;
}

.coord-label {
	font-weight: bold;
	color: #0078d4;
}

.coord-decimal {
	color: #666;
	margin-left: 10px;
}

.notam-content {
	margin-top: 10px;
	padding: 10px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 11px;
	line-height: 1.4;
	white-space: pre-wrap;
	overflow-x: auto;
	max-height: 200px;
	overflow-y: auto;
}

.notam-popup {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	display: flex;
	flex-direction: column;
	max-height: 450px;
}

.notam-popup strong {
	color: #0078d4;
	font-size: 12px;
}

.popup-coords {
	color: #666;
	font-size: 12px;
	margin: 5px 0;
}

.popup-content {
	margin-top: 8px;
	padding: 8px;
	background: #f8f9fa;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	font-size: 11px;
	line-height: 1.3;
	white-space: pre;
}

.popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
	flex-shrink: 0;
}

.popup-count {
	background: #0078d4;
	color: white;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: bold;
}

.popup-radius {
	color: #856404;
	background: #fff3cd;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 11px;
	margin-bottom: 8px;
	display: inline-block;
	flex-shrink: 0;
}

.popup-notams-list {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.popup-notam {
	padding: 5px 0;
}

.popup-notam strong {
	display: block;
	margin-bottom: 3px;
}

.popup-divider {
	border: none;
	border-top: 1px solid #ddd;
	margin: 8px 0;
}

.notam-divider {
	border: none;
	border-top: 1px solid #ddd;
	margin: 10px 0;
}

.notam-contents {
	margin-top: 10px;
}

.notam-entry-id {
	color: #0078d4;
	font-weight: bold;
	margin-bottom: 5px;
}

.popup-icao {
	font-weight: bold;
	color: #333;
	font-size: 1.1em;
	margin-bottom: 2px;
}

.popup-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 6px 0;
	margin-bottom: 8px;
	border-bottom: 1px solid #ddd;
	flex-shrink: 0;
}

.popup-nav-btn {
	background: #0078d4;
	color: white;
	border: none;
	border-radius: 4px;
	padding: 4px 10px;
	cursor: pointer;
	font-size: 14px;
	font-weight: bold;
}

.popup-nav-btn:hover {
	background: #005a9e;
}

.popup-nav-counter {
	font-size: 13px;
	color: #666;
}

.list-icao {
	background-color: #e8f4fc;
	color: #0078d4;
	padding: 2px 6px;
	border-radius: 3px;
	font-weight: bold;
}

.notam-position {
	color: #666;
	font-size: 11px;
	font-weight: normal;
	margin-left: 8px;
	margin-right: 8px;
}

footer {
	text-align: center;
	padding: 20px;
	margin-top: 20px;
	color: #666;
	font-size: 0.9rem;
}

footer a {
	color: #0078d4;
	text-decoration: none;
}

footer a:hover {
	text-decoration: underline;
}

.license-content {
	background: white;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
	line-height: 1.8;
	color: #333;
}

.license-content h2 {
	color: #444;
	margin-bottom: 20px;
	font-size: 1.4rem;
}

.license-content p {
	margin-bottom: 15px;
}

.license-content .disclaimer {
	background: #f8f9fa;
	padding: 15px;
	border-radius: 4px;
	font-size: 0.9rem;
	color: #555;
}

.back-link {
	margin-top: 20px;
}

.back-link a {
	color: #0078d4;
	text-decoration: none;
	font-size: 1rem;
}

.back-link a:hover {
	text-decoration: underline;
}
