/* Fullscreen Cesium container */
html, body, #cesiumContainer {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Filter panel styling */
.ksd-filter-panel {
  position: absolute;
  top: 48px; /* just below the toolbar */
  right: 10px;
  width: 260px;
  max-height: 60vh;
  overflow: auto;
  background: rgba(20, 20, 20, 0.95);
  color: #eee;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  font: 12px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  display: none;
  z-index: 1000;
}

.ksd-filter-panel h4 {
  margin: 6px 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.ksd-filter-row {
  margin: 6px 0;
}

.ksd-filter-row label {
  display: block;
  margin: 2px 0;
  cursor: pointer;
}

.ksd-counter {
  margin-top: 8px;
  opacity: 0.9;
}

.ksd-divider {
  height: 1px;
  background: #333;
  margin: 8px 0;
}

.ksd-logo-icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  pointer-events: none;
}

.ksd-filter-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  pointer-events: none;
}

#info_page_logo_image {
  width: 100px;
  height: 100px;
  padding: 10px;
}

/* Color tag for altitude-based coloring */
#altitude-legend {
  position: fixed;
  top: 15px;
  left: 15px;

  background: transparent;
  color: white;
  padding: 10px 12px;
  border-radius: 6px;

  font-family: sans-serif;
  font-size: 12px;

  z-index: 1000;

  /* optional: prevent blocking globe interaction */
  pointer-events: auto;
}

/* Add Object panel: left side, below altitude legend */
.ksd-add-object{
  position: fixed;
  left: 15px;
  top: calc(15px + var(--legend-height, 160px) + 12px);

  z-index: 1000;
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 14px;
  border-radius: 10px;

  width: 280px;              /* fixed clean width */
  max-height: 45vh;          /* limit vertical growth */
  overflow-y: auto;

  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 4px 0;
}

.legend-color {
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 1px solid #000;
}

/* CSS for Popup info menu. */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  z-index: 1000;
}

.popup-box {
  background: black;
  color: white;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  margin: 5vh auto;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.popup-content {
  overflow-y: auto;
  color: white;
  margin-top: 10px;
  padding-right: 10px;
}

.close-btn {
  position: absolute;
  color: white;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.popup-header {
  display: flex;
  align-items: center;  
  gap: 15px;     
}      

#info_page_logo_image {
  width: 80px;           
  height: auto;
}

/* Popup tabs */
.popup-tabs{
  display:flex;
  gap:6px;
  padding:10px 14px 0 14px;
  flex-wrap:wrap;
}

.popup-tab{
  border:none;
  cursor:pointer;
  padding:8px 10px;
  border-radius:8px;
  background:rgba(255,255,255,0.10);
  color:#fff;
  font-weight:600;
}

.popup-tab.active{
  background:rgba(255,255,255,0.22);
}

.popup-tabpanel{
  display:none;
}

.popup-tabpanel.active{
  display:block;
}

.ksd-info-box {
  position: absolute;
  top: 90px;
  right: 12px;
  background: rgba(25, 25, 25, 0.85);
  color: white;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 10;
  min-width: 180px;
}

.ksd-info-box h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.ksd-search-floating {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  gap: 6px;

  z-index: 5; /* above globe, below modals */
}

.ksd-search-floating input {
  width: 220px;
  padding: 6px 8px;

  border-radius: 4px;
  border: 1px solid #888;

  background: #2b2b2b;
  color: #fff;
}

.ksd-sim-settings {
  position: absolute;
  top: 230px;     
  right: 12px;    
  left: auto;

  z-index: 11;     
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 10px 12px;
  border-radius: 8px;
  width: 230px;
  font-size: 13px;
}

.ksd-sim-settings h4,
.ksd-add-object h4{
  margin: 0 0 8px 0;
}

.ksd-sim-settings label,
.ksd-add-object label{
  display:block;
  margin-bottom: 8px;
  margin-right: 8px;
}

.ksd-sim-settings input,
.ksd-add-object input{
  width: 100%;
  margin-top: 4px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
}

.ksd-sim-settings-row{
  display:flex;
  justify-content:flex-end;
  margin-top: 6px;
}

.ksd-sim-settings-error{
  margin-top: 8px;
  color: #ffb3b3;
}

/* Generic collapsible panel header */
.ksd-panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 8px;
}

.ksd-panel-header h4{
  margin:0;
  font-size: 14px;
}

.ksd-panel-toggle{
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.ksd-panel-body{
  display:block;
}

.ksd-panel-collapsed .ksd-panel-body{
  display:none;
}

/* when collapsed, make it look compact */
.ksd-panel-collapsed{
  padding-bottom: 10px;
}

.help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #666;
    background: white;
    color: #666;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    user-select: none;
    transition: all 0.2s ease;
  }

  .help:hover {
    background: #666;
    color: white;
  }