/* GPS Flight Planner — extracted from index.html */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #1a1a2e; color: #e0e0e0; display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
#sidebar { width: 340px; background: #16213e; display: flex; flex-direction: column; border-right: 1px solid #0f3460; overflow-y: auto; }
#sidebar h2 { padding: 12px 16px; background: #0f3460; font-size: 16px; color: #e94560; }
.panel { padding: 12px 16px; border-bottom: 1px solid #0f3460; }
.panel h3 { font-size: 13px; color: #a0a0c0; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }

/* Mode tabs */
.mode-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.mode-tab { flex: 1; padding: 8px 4px; background: #1a1a2e; border: 1px solid #0f3460; color: #a0a0c0; cursor: pointer; text-align: center; font-size: 12px; border-radius: 4px; transition: all 0.2s; }
.mode-tab.active { background: #e94560; color: white; border-color: #e94560; }
.mode-tab:hover:not(.active) { background: #0f3460; }

/* Form controls */
label { display: block; font-size: 12px; color: #8888aa; margin-bottom: 3px; margin-top: 8px; }
input, select, textarea { width: 100%; padding: 6px 8px; background: #1a1a2e; border: 1px solid #0f3460; color: #e0e0e0; border-radius: 4px; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #e94560; }
input[type="range"] { padding: 0; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

/* Waypoint list */
.wp-list { max-height: 200px; overflow-y: auto; }
.wp-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: #1a1a2e; border-radius: 4px; margin-bottom: 3px; font-size: 11px; }
.wp-item .wp-num { color: #e94560; font-weight: bold; min-width: 20px; }
.wp-item .wp-pos { flex: 1; color: #a0a0c0; }
.wp-item .wp-del { cursor: pointer; color: #666; padding: 2px 6px; border-radius: 3px; }
.wp-item .wp-del:hover { background: #e94560; color: white; }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.btn-primary { background: #e94560; color: white; }
.btn-primary:hover { background: #c73652; }
.btn-secondary { background: #0f3460; color: #e0e0e0; }
.btn-secondary:hover { background: #1a4a8a; }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-block { width: 100%; margin-top: 8px; }

/* Map area */
#map-container { flex: 1; display: flex; flex-direction: column; }
#toolbar { height: 40px; background: #16213e; display: flex; align-items: center; padding: 0 12px; gap: 12px; border-bottom: 1px solid #0f3460; }
#toolbar .status { flex: 1; font-size: 12px; color: #a0a0c0; }
#map { flex: 1; }

/* Elevation chart */
#elevation-panel { height: 150px; background: #16213e; border-top: 1px solid #0f3460; padding: 8px; display: none; }
#elevation-panel.visible { display: block; }
#elevation-canvas { width: 100%; height: 100%; }

/* Text mode panel */
#text-panel { display: none; }
#text-panel.visible { display: block; }
#text-input { font-family: monospace; min-height: 40px; resize: vertical; }

/* Image mode panel */
#image-panel { display: none; }
#image-panel.visible { display: block; }
#image-dropzone { border: 2px dashed #0f3460; border-radius: 4px; padding: 20px; text-align: center; cursor: pointer; margin-bottom: 8px; transition: border-color 0.2s; }
#image-dropzone:hover, #image-dropzone.dragover { border-color: #e94560; }

/* Surface panel */
#surface-panel .surface-params { display: none; }
#surface-panel .surface-params.visible { display: block; }

/* Random mode panel */
#random-panel { display: none; }
#random-panel.visible { display: block; }
#random-radius-display { font-size: 12px; color: #e94560; font-weight: bold; }

/* Popup styling */
.leaflet-popup-content-wrapper { background: #16213e; color: #e0e0e0; border: 1px solid #0f3460; }
.leaflet-popup-tip { background: #16213e; }
.popup-form label { color: #8888aa; font-size: 11px; }
.popup-form input { background: #1a1a2e; border: 1px solid #0f3460; color: #e0e0e0; padding: 3px 6px; width: 80px; font-size: 12px; }

/* Multi-track items */
.track-item { transition: border-color 0.2s; }
.track-item:hover { border-color: #4caf50 !important; }
.track-item.active { border-color: #e94560 !important; }
.track-del:hover { background: #e94560; color: white !important; border-radius: 3px; }

/* Waypoint number tooltips */
.wp-number-tooltip { background: #e94560; color: white; border: none; padding: 1px 5px; font-size: 11px; font-weight: bold; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.wp-number-tooltip::before { border-right-color: #e94560; }

/* Geosearch control */
.leaflet-control-geosearch { display: flex; align-items: center; }
.geo-search-btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: #16213e; color: #a0a0c0; text-decoration: none; border-radius: 2px; }
.geo-search-btn:hover { background: #0f3460; color: #e0e0e0; }
.geo-search-input { width: 0; padding: 0; border: none; background: #16213e; color: #e0e0e0; font-size: 12px; outline: none; transition: width 0.25s, padding 0.25s; border-radius: 0 2px 2px 0; }
.leaflet-control-geosearch.expanded .geo-search-input { width: 200px; padding: 5px 8px; border-left: 1px solid #0f3460; }
.geo-search-input::placeholder { color: #666; }
.geo-search-input:disabled { opacity: 0.6; }
