/* Final layout: CesiumJS 3D Globe + sidebar */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.container {
  display: flex;
  flex-direction: row;
  height: 100vh;
}

/* CesiumJS Overrides */
#map {
  width: 100%;
  height: 100%;
}

#map .cesium-viewer {
  width: 100%;
  height: 100%;
}

.cesium-viewer .cesium-widget-credits {
  font-size: 10px !important;
  opacity: 0.5;
}

.cesium-viewer-bottom {
  z-index: 1;
}

/* Ensure scene mode picker and home button don't clash with toolbar */
.cesium-viewer-toolbar {
  right: 20px !important;
  top: 10px !important;
  bottom: auto !important;
}


.map-panel {
  flex: 2;
  min-width: 60%;
  height: 100%;
  position: relative;
}

.viewer-panel {
  flex: 1;
  min-width: 40%;
  height: 50%;
  background: #1a1a1a;
  color: white;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.viewer-panel h3 {
  margin-top: 0;
}
/* Sidebar layout */
.viewer-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: #1e1e1e;
  color: #fff;
  border-left: 2px solid #333;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 2000;
}

.viewer-sidebar.collapsed {
  transform: translateX(80%);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #2a2a2a;
  border-bottom: 1px solid #444;
}

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

#toggle-sidebar {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

#toggle-sidebar:hover {
  color: #00b4ff;
}
#image-viewer {
  border: 1px solid #444;
  background: #000;
  padding: 10px;
}

#image-viewer img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.toolbar {
  position: absolute;
  top: 0px;
  left: 50px;
  background: rgba(58, 57, 57, 0.95);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#basemap-wrapper {
  position: absolute;
  top: 10px;
  right: -250px;
  background: rgba(44, 44, 44, 0.95);
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  font-size: 14px;
}

#basemap-wrapper select {
  font-size: 14px;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff;
  height: 24px;
}
/* Image styling */
#image-viewer {
  padding: 10px;
  text-align: center;
}

#image-viewer img {
  max-width: 100%;
  border: 2px solid #444;
  border-radius: 4px;
}

#refresh-ndvi {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: #28a745;
  color: #fff;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

#refresh-ndvi:hover {
  background: #218838;
}

#refresh-ndvi:active {
  background: #1e7e34;
}
#ndvi-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    margin-left: 4px;
    font-size: 18px;
}
#ndvi-tool:hover {
    background: #e6ffe6;
}

.map-legend {
  position: absolute; 
  bottom: 50px; left: 50px; width: 150px; height: 120px; 
  border:2px solid grey; z-index:9999; font-size:14px;
  background-color:rgb(36, 35, 35);
  padding:10px;
  border-radius: 8px;
}

#satellite-info {
  margin-top: 20px;
}
#satellite-info h3 {
  margin-top: 0;
}
#satellite-details {
  margin-top: 10px;
}

#ground-station-info {
  margin-top: 20px;
}

#gps-console {
  position: absolute;
  bottom: 0px;
  left: 0px;
  display: flex;
  flex-direction: column;
  background: #222;
  padding: 80px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}