/* =========================
   Global Reset
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   Base Layout
========================= */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#cesiumContainer {
  position: fixed;   /* guarantees full-screen canvas */
  inset: 0;          /* top/right/bottom/left = 0 */
}

/* Utility */
.hidden {
  display: none !important; }

  .btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px; /* spacing between stacked buttons */
}



/* =========================
   Shared Panel Style
========================= */
.viewer-controls,
.route-controls,
.route-stats,
.test-panel {
  position: absolute;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);

  padding: 15px;
  max-width: 280px;
  transform: scale(0.8);
}

/* =========================
   Viewer Controls (top-left)
========================= */
.viewer-controls {
  top: 20px;
  left: 20px;
  transform-origin: top left;
}

.viewer-controls h3 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 15px;
}

/* =========================
   Route Controls (bottom-left)
========================= */
.route-controls {
  bottom: 20px;
  left: 20px;
  transform-origin: bottom left;
}

.route-controls h3 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 15px;
}

/* =========================
   Route Stats (top-right)
========================= */
.route-stats {
  top: 20px;
  right: 20px;
  min-width: 180px;
  color: #fff;
}

.route-stats h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.route-stats div {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
}

/* =========================
   Test Panel (middle-right)
========================= */
.test-panel {
  top: 50%;
  right: 20px;
  transform: translateY(-50%) scale(0.8);
  width: 220px;
}

.test-panel h3 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
}

/* =========================
   Buttons
========================= */
.view-btn,
.route-btn,
.control-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  text-align: left;
  margin-bottom: 10px;
  transition: all 0.25s ease;
}

/* View buttons */
.view-btn {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.view-btn.active {
  background: rgba(39, 174, 96, 0.35);
  border: 1px solid rgba(39, 174, 96, 0.7);
}

/* Route buttons */
.route-btn {
  padding: 14px 18px;
  background: rgba(155, 89, 182, 0.35);
}

.route-btn:hover {
  background: rgba(155, 89, 182, 0.55);
  transform: translateY(-2px);
}

.route-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Control buttons */
.control-btn {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.control-btn.active {
  background: rgba(39, 174, 96, 0.35);
}

/* Delete */
.delete-btn {
  background: rgba(231, 76, 60, 0.35);
}

.delete-btn:hover {
  background: rgba(231, 76, 60, 0.55);
}

/* =========================
   Divider
========================= */
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 15px 0;
}

/* =========================
   Status Alert
========================= */
.status-alert {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;

  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  padding: 12px 24px;
}

.status-alert p {
  color: #fff;
  font-size: 14px;
}

/* =========================
   OS View (darker panels)
========================= */
body.os-view .viewer-controls,
body.os-view .route-controls,
body.os-view .route-stats,
body.os-view .status-alert,
body.os-view .test-panel {
  background: rgba(20, 20, 20, 0.65);
  border-color: rgba(255, 255, 255, 0.25);
}