/* ==========================================================================
   JMARS Web Client — Master Stylesheet
   Organized sections: Reset, Layout, Loading, Controls Sidebar, Welcome Modal,
   Layer Settings Modal, Layer List, Tools, North Arrow, Style Editor,
   Search Bar, Crater Table, Accordion, Mosaic Catalog, Bookmarks,
   Status Bar, Panner, Leaflet Controls, Collapsible Sections, Tool Info,
   Nomenclature, Investigate, Body Selector, Quick Actions,
   P1/P2 Features, Keyboard Shortcuts, Info Panel, Color Stretch, Hillshade
   ========================================================================== */

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
  background: #000;
}

/* Adjust map height to account for status bar */
#map {
  width: 100%;
  height: calc(100% - 30px);
  background: #000;
}

/* ==========================================================================
   2. Loading Indicator
   ========================================================================== */

#loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 16px;
  display: none;
  pointer-events: none;
  border: 1px solid #555;
}

#loading-indicator.visible {
  display: block;
}

/* ==========================================================================
   3. Controls Sidebar
   ========================================================================== */

#controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: rgba(20, 20, 20, 0.95);
  color: #eee;
  padding: 0;
  border-radius: 4px;
  width: 300px;
  max-height: calc(100% - 60px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  border: 1px solid #444;
  transition: transform 0.3s ease;
}

#controls.collapsed {
  transform: translateX(-310px);
}

/* Sidebar Toggle Button */
#sidebar-toggle {
  position: absolute;
  top: 10px;
  left: 320px;
  z-index: 1001;
  background: #333;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: left 0.3s ease;
}

#sidebar-toggle.collapsed {
  left: 10px;
}

.control-header {
  padding: 12px;
  background: #333;
  border-bottom: 1px solid #444;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   4. Welcome Modal
   ========================================================================== */

.welcome-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
}

.welcome-modal {
  background: #111;
  color: #eee;
  border: 1px solid #444;
  border-radius: 8px;
  width: 420px;
  max-width: 90%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  padding: 20px;
  text-align: center;
}

.welcome-modal img {
  height: 64px;
  margin-bottom: 10px;
}

.welcome-modal h2 {
  margin: 0 0 10px 0;
  font-size: 20px;
}

.welcome-modal p {
  margin: 6px 0;
  font-size: 14px;
  color: #ccc;
}

.welcome-modal a {
  color: #8ec5ff;
  text-decoration: none;
}

.welcome-modal button {
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
}

/* ==========================================================================
   5. Layer Settings Modal
   ========================================================================== */

.layer-settings-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 4500;
  display: none;
  align-items: center;
  justify-content: center;
}

.layer-settings-modal {
  background: #111;
  color: #eee;
  border: 1px solid #444;
  border-radius: 8px;
  width: 420px;
  max-width: 92%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  padding: 16px;
}

.layer-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.layer-settings-header h3 {
  margin: 0;
  font-size: 16px;
}

.layer-settings-close {
  border: 1px solid #555;
  background: #222;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  padding: 4px 10px;
}

.layer-settings-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.layer-settings-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  margin: 0;
}

.layer-settings-list dt {
  font-weight: bold;
  color: #bbb;
}

.layer-settings-list dd {
  margin: 0;
  color: #eee;
  word-break: break-word;
}

.layer-settings-opacity {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
}

.layer-settings-opacity input {
  grid-column: 1 / -1;
}

.layer-settings-opacity-value {
  color: #bbb;
  font-size: 12px;
}

.layer-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.layer-settings-remove {
  background: #d6336c;
  border: none;
  color: #fff;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}

.layer-settings-btn {
  background: #333;
  border: 1px solid #555;
  color: #ccc;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.layer-settings-btn:hover {
  background: #444;
  border-color: #4dabf7;
  color: #fff;
}

/* ==========================================================================
   6. Layer List
   ========================================================================== */

#layer-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.layer-item-container {
  border-bottom: 1px solid #333;
  padding: 6px 0;
}

.layer-item-container:last-child {
  border-bottom: none;
}

.layer-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  cursor: pointer;
  padding-bottom: 4px;
}

.layer-item input {
  margin-right: 10px;
  cursor: pointer;
}

.layer-item:hover {
  color: #fff;
}

.layer-slider {
  padding-left: 24px;
  padding-right: 10px;
}

.layer-slider input {
  width: 100%;
  cursor: pointer;
}

.error-msg {
  color: #ff6b6b;
  padding: 10px;
  font-size: 12px;
}

/* ==========================================================================
   7. Tools Section
   ========================================================================== */

.tool-section {
  padding: 10px;
}

.tool-section.border-bottom {
  border-bottom: 1px solid #444;
}

.tool-btn {
  width: 100%;
  padding: 8px;
  background: #444;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 5px;
}

.tool-btn:hover {
  background: #555;
}

/* Unified active color: teal */
.tool-btn.active {
  background: #1098ad;
}

.tool-select {
  width: 100%;
  padding: 6px 8px;
  background: #2a2a2a;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 12px;
}

/* ==========================================================================
   8. North Arrow
   ========================================================================== */

.north-arrow-control {
  width: var(--north-arrow-size, 72px);
  height: var(--north-arrow-size, 72px);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.15));
  border: 1px solid #555;
  border-radius: 8px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  margin-bottom: 6px;
  margin-right: 6px;
}

.north-arrow-rose {
  width: 80%;
  height: 80%;
}

.north-arrow-needle {
  fill: #f03e3e;
}

.north-arrow-ring {
  stroke: #ddd;
  stroke-width: 2;
  fill: rgba(0, 0, 0, 0.25);
}

.north-arrow-cardinal {
  font: 700 14px 'Segoe UI', sans-serif;
  fill: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.north-arrow-reset {
  margin-top: 6px;
  font: 12px 'Segoe UI', sans-serif;
  color: #ddd;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #555;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.north-arrow-reset:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ==========================================================================
   9. Style Editor
   ========================================================================== */

#style-editor {
  display: none;
  position: absolute;
  z-index: 2000;
  background: #222;
  border: 1px solid #555;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  min-width: 200px;
  color: #eee;
}

.style-field {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.style-field label {
  display: block;
  margin-bottom: 2px;
}

.style-field input[type="color"] {
  border: none;
  width: 30px;
  height: 20px;
  padding: 0;
  background: none;
}

.style-field input[type="range"] {
  width: 100px;
}

/* Style Editor Presets */
.style-presets {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.style-preset-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #555;
  cursor: pointer;
  transition: transform 0.15s;
}

.style-preset-btn:hover {
  transform: scale(1.2);
  border-color: #fff;
}

/* ==========================================================================
   10. Search Bar
   ========================================================================== */

.search-bar-wrapper {
  position: relative;
  display: flex;
  gap: 5px;
}

#jmars-search-input {
  flex: 1;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
}

#jmars-bookmark-btn {
  padding: 6px 10px;
  background: #444;
  border: 1px solid #555;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
}

#jmars-search-results {
  position: absolute;
  top: 35px;
  left: 0;
  right: 0;
  background: #222;
  border: 1px solid #555;
  border-radius: 4px;
  display: none;
  z-index: 3000;
  max-height: 300px;
  overflow-y: auto;
}

.search-result-header {
  padding: 5px 10px;
  background: #333;
  font-size: 11px;
  color: #aaa;
}

.search-result-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #333;
}

.search-result-item:hover {
  background: #444;
}

/* ==========================================================================
   11. Crater Table
   ========================================================================== */

.crater-table-container {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #444;
  margin-bottom: 10px;
}

.crater-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.crater-table th,
.crater-table td {
  text-align: left;
  padding: 4px;
  border-bottom: 1px solid #333;
}

.crater-table th {
  background: #333;
  position: sticky;
  top: 0;
}

.crater-table tr {
  border-bottom: 1px solid #333;
}

.crater-btn-group {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.crater-action-btn {
  flex: 1;
  padding: 4px;
  border: 1px solid #555;
  color: white;
  cursor: pointer;
  font-size: 11px;
  border-radius: 3px;
}

/* ==========================================================================
   12. Accordion
   ========================================================================== */

.accordion-section {
  border-bottom: 1px solid #444;
  display: flex;
  flex-direction: column;
  /* Default collapsed state handled by content visibility */
}

.accordion-section:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: 12px;
  background: #333;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.accordion-header:hover {
  background: #3a3a3a;
}

.accordion-header::after {
  content: '+';
  font-weight: normal;
  color: #aaa;
}

.accordion-section.expanded .accordion-header::after {
  content: '-';
}

.accordion-content {
  display: none;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  /* Allow it to grow if parent is flex column */
  background: rgba(0, 0, 0, 0.2);
}

/* When a section is expanded, make it take available space */
.accordion-section.expanded {
  flex: 1;
  overflow: hidden;
  /* Contain the scrollable content */
}

.accordion-section.expanded .accordion-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

/* ==========================================================================
   13. Mosaic Catalog
   ========================================================================== */

.mosaic-catalog {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mosaic-header {
  font-weight: bold;
  font-size: 13px;
  color: #eee;
}

.mosaic-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mosaic-card {
  display: flex;
  gap: 10px;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 8px;
}

.mosaic-thumb {
  width: 72px;
  height: 72px;
  background: #222 center center / cover no-repeat;
  border-radius: 4px;
  flex-shrink: 0;
}

.mosaic-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.mosaic-title {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.mosaic-desc {
  font-size: 12px;
  color: #aaa;
  line-height: 1.2;
}

.mosaic-activate-btn {
  align-self: flex-start;
  font-size: 11px;
  padding: 4px 8px;
}

/* ==========================================================================
   14. Bookmarks
   ========================================================================== */

.bookmarks-block {
  padding: 10px 0;
  border-top: 1px solid #333;
  margin-top: 10px;
}

.bookmarks-block h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #eee;
}

/* ==========================================================================
   15. Status Bar
   ========================================================================== */

#status-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: rgba(20, 20, 20, 0.95);
  border-top: 1px solid #444;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #eee;
  font-size: 12px;
  z-index: 1000;
  gap: 20px;
}

.status-item {
  display: flex;
  align-items: center;
}

/* Status Bar coordinate format toggle */
.coord-format-btn {
  background: none;
  border: 1px solid #555;
  color: #aaa;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  transition: color 0.15s;
}

.coord-format-btn:hover {
  color: #fff;
  border-color: #888;
}

/* ==========================================================================
   16. Panner (Overview Map)
   ========================================================================== */

#jmars-panner {
  position: absolute;
  bottom: 60px;
  right: 20px;
  width: 240px;
  height: 170px;
  padding: 8px;
  background: #000;
  border: 1px solid #555;
  border-radius: 6px;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

#jmars-panner.visible {
  display: block;
}

/* ==========================================================================
   17. Custom Leaflet Controls
   ========================================================================== */

.leaflet-bar a.reset-view-btn,
.leaflet-bar a.north-arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #fff;
  border-bottom: 1px solid #ccc;
  color: #333;
  text-decoration: none;
}

.leaflet-bar a.reset-view-btn:hover,
.leaflet-bar a.north-arrow-btn:hover {
  background: #f4f4f4;
}

.leaflet-bar a.reset-view-btn svg,
.leaflet-bar a.north-arrow-btn svg {
  display: block;
}

/* ==========================================================================
   18. Collapsible Layer Sections
   ========================================================================== */

.layer-section {
  margin-bottom: 10px;
}

.layer-filter-wrap {
  padding: 8px 6px 4px;
}

.layer-filter-input {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #eee;
  font-size: 12px;
  padding: 6px 8px;
}

.layer-filter-input:focus {
  outline: 1px solid #6aa9ff;
  border-color: #6aa9ff;
}

.layer-filter-count {
  color: #9a9a9a;
  font-size: 11px;
  padding: 2px 8px 8px;
}

#tools-list {
  margin-top: 10px;
}

.layer-section-header {
  background: #333;
  padding: 5px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 4px;
  gap: 6px;
  position: relative;
}

.layer-section-header:hover {
  background: #3a3a3a;
}

.layer-title {
  flex: 1;
}

/* Icon used in collapsible section headers */
.icon {
  font-size: 14px;
  transition: transform 0.2s;
}

/* Rotate the expand/collapse icon when section is open */
.layer-section.expanded > .layer-section-header .icon {
  transform: rotate(45deg);
}

/* ==========================================================================
   19. Tool Info Popover
   ========================================================================== */

.tool-info-btn {
  background: transparent;
  border: 1px solid #555;
  color: #ddd;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tool-info-btn:hover {
  background: #444;
  border-color: #777;
}

.tool-info-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 260px;
  max-width: calc(100vw - 40px);
  background: #1c1c1c;
  border: 1px solid #555;
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.tool-info-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.tool-info-title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  color: #fff;
}

.tool-info-body {
  font-size: 12px;
  color: #ddd;
  line-height: 1.4;
  margin-bottom: 8px;
}

.tool-info-close {
  background: #444;
  border: 1px solid #666;
  color: #fff;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.tool-info-close:hover {
  background: #555;
}

/* ==========================================================================
   20. Chart Container
   ========================================================================== */

.chart-container {
  margin-top: 10px;
  width: 100%;
  height: 150px;
  background: #222;
  border: 1px solid #444;
}

/* ==========================================================================
   21. Nomenclature Labels
   ========================================================================== */

.nomenclature-label {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 2px black, 0 0 5px black;
  pointer-events: none; /* Don't block clicks */
}

/* ==========================================================================
   22. Investigate Tool Popup
   ========================================================================== */

.investigate-layer-result {
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

.investigate-layer-result:last-child {
  border-bottom: none;
}

/* ==========================================================================
   23. Body Selector
   ========================================================================== */

.body-selector-dropdown {
  background: #222;
  color: white;
  border: 1px solid #555;
  padding: 4px;
  border-radius: 3px;
  width: 100%;
  margin-top: 5px;
  cursor: pointer;
}

/* ==========================================================================
   24. Quick Actions
   ========================================================================== */

.quick-actions {
  background: #171717;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 8px;
  text-align: left;
}

.quick-actions-label {
  display: block;
  font-size: 11px;
  color: #b8b8b8;
  margin-bottom: 6px;
}

.quick-actions-row {
  display: flex;
  gap: 6px;
}

.quick-actions-input {
  flex: 1;
  min-width: 0;
  background: #0f0f0f;
  color: #eee;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
}

.quick-actions-input:focus {
  outline: 2px solid #5aa8ff;
  outline-offset: 1px;
}

.quick-actions-run-btn {
  min-width: 56px;
  font-size: 12px;
  padding: 6px 8px;
}

.quick-actions-hint {
  margin: 6px 0 0;
  color: #969696;
  font-size: 11px;
}

.quick-actions kbd {
  border: 1px solid #555;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 4px;
  background: #202020;
  font-size: 11px;
}

/* ==========================================================================
   25. P1/P2 Feature Styles
   ========================================================================== */

/* Stamp Panel */
.stamp-panel {
  padding: 10px;
}

.stamp-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stamp-label {
  font-size: 12px;
  color: #aaa;
}

.stamp-select {
  width: 100%;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  font-size: 13px;
}

.stamp-btn-row {
  margin-top: 6px;
}

.stamp-search-btn {
  background: #1098ad !important;
}

.stamp-status {
  font-size: 12px;
  padding: 4px 0;
  min-height: 18px;
}

.stamp-results-container {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 8px;
}

.stamp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.stamp-table th {
  border-bottom: 1px solid #555;
  text-align: left;
  padding: 4px;
  color: #aaa;
  position: sticky;
  top: 0;
  background: #1a1a1a;
}

.stamp-table td {
  padding: 4px;
  border-bottom: 1px solid #2a2a2a;
}

.stamp-row {
  cursor: pointer;
  transition: background 0.15s;
}

.stamp-row:hover {
  background: #333;
}

.stamp-row-selected {
  background: #1a3a4a !important;
}

.stamp-tooltip {
  background: rgba(0,0,0,0.85) !important;
  border: 1px solid #555 !important;
  color: #fff !important;
  font-size: 11px !important;
  padding: 3px 6px !important;
}

.stamp-footprint {
  cursor: pointer;
}

/* Shape Table */
.shape-table-wrapper {
  max-height: 250px;
  display: flex;
  flex-direction: column;
}

.shape-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #333;
}

.shape-count {
  font-size: 11px;
  color: #aaa;
}

.shape-table-actions {
  display: flex;
  gap: 4px;
}

.shape-table-scroll {
  max-height: 180px;
  overflow-y: auto;
}

.shape-attr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.shape-attr-table th {
  border-bottom: 1px solid #555;
  text-align: left;
  padding: 4px;
  color: #aaa;
  position: sticky;
  top: 0;
  background: #1a1a1a;
}

.shape-attr-table td {
  padding: 4px;
  border-bottom: 1px solid #2a2a2a;
}

.shape-table-row {
  cursor: pointer;
  transition: background 0.15s;
}

.shape-table-row:hover {
  background: #333;
}

.shape-row-selected {
  background: #1a3a4a !important;
}

.editable-cell {
  cursor: text;
}

.editable-cell:hover {
  background: rgba(77, 171, 247, 0.1);
}

/* Landing Site Markers */
.landing-site-marker {
  background: transparent !important;
  border: none !important;
}

.landing-marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  position: absolute;
  top: 2px;
  left: 2px;
}

.landing-marker-label {
  position: absolute;
  left: 20px;
  top: 0;
  white-space: nowrap;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 0 4px #000, 0 0 8px #000;
  font-weight: 600;
}

.landing-popup-container .leaflet-popup-content-wrapper {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #444;
  border-radius: 6px;
  color: #eee;
}

.landing-popup-container .leaflet-popup-tip {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #444;
}

/* Ground Track */
.groundtrack-label {
  background: transparent !important;
  border: none !important;
  pointer-events: none;
}

.groundtrack-sc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.groundtrack-sc-item:hover {
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}

/* ==========================================================================
   26. Drag & Drop Overlay
   ========================================================================== */

.drag-over {
  outline: 3px dashed #4dabf7 !important;
  outline-offset: -3px;
}

/* ==========================================================================
   27. Keyboard Shortcuts Help
   ========================================================================== */

.shortcut-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shortcut-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #4dabf7;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
}

.shortcut-row kbd {
  display: inline-block;
  border: 1px solid #555;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 6px;
  background: #202020;
  font-size: 11px;
  font-family: monospace;
  color: #ddd;
  min-width: 20px;
  text-align: center;
}

.shortcut-row span {
  color: #bbb;
}

/* ==========================================================================
   28. Info Panel
   ========================================================================== */

.info-section {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.info-section h3 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #4dabf7;
}

.info-row {
  padding: 2px 0;
  font-size: 12px;
  color: #ccc;
}

.info-row code {
  background: #222;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

/* ==========================================================================
   29. Color Stretch Control
   ========================================================================== */

#color-stretch-panel {
  position: absolute;
  right: 60px;
  bottom: 60px;
  background: #1a1a2e;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 14px;
  z-index: 800;
  width: 260px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.stretch-preset {
  padding: 3px 8px;
  font-size: 11px;
  background: #2a2a3e;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.stretch-preset:hover {
  background: #3a3a4e;
  color: #fff;
  border-color: #4dabf7;
}

/* ==========================================================================
   30. Hillshade Tile Blending
   ========================================================================== */

.hillshade-tile {
  mix-blend-mode: multiply;
}
