@charset "UTF-8";

/* ─────────────────────────────────────────────
   CSS Variables for easy adjustments
───────────────────────────────────────────── */
:root {
  --gui-offset-x: 100px;   /* shift left for GUI container */
  --gui-offset-y: -100px;  /* shift up for GUI container */
  --menu-z: 1200;
  --popup-z: 1150;
  --gui-z: 1000;
}

/* ─────────────────────────────────────────────
   Base Body / Layout
───────────────────────────────────────────── */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #fdfdfd;
  overflow-x: hidden;
  position: relative;
}

/* ─────────────────────────────────────────────
   Plot / Canvas Wrapper
───────────────────────────────────────────── */
#plot-wrapper {
  position: absolute;
  top: 30px;
  left: 0;        
  right: 300px;   
  bottom: 20px;
  background-color: #fff;
  border: none;                
  box-shadow: 0 2px 6px rgba(0,0,0,0.05); 
}

#plot-wrapper canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ─────────────────────────────────────────────
   Info Popups (Directions, Details, About)
───────────────────────────────────────────── */
#info-popups {
  position: fixed;
  top: 50px;           /* above hamburger */
  left: 10px;          /* align left side */
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: var(--popup-z);
}

.info-box {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  width: 240px;
  max-width: 300px;
}

/* ─────────────────────────────────────────────
   Hamburger Menu
───────────────────────────────────────────── */
.hamburger-container {
  position: fixed;
  top: 5px;
  left: 5px;
  z-index: var(--menu-z);
}

.menu-button {
  font-size: 1.75rem;
  background: lightblue;
  border: 1px solid black;
  border-radius: 3px;
  cursor: pointer;
  padding: 5px 10px;
  transition: background 0.2s ease;
}

.menu-button:hover {
  background-color: rgb(198, 224, 233);
}

.menu-content {
  display: none;
  position: fixed;           /* fixed to viewport */
  top: 50px;                 /* below button */
  left: 5px;                 /* align with button */
  max-height: calc(100vh - 60px); /* never overflow viewport */
  overflow-y: auto;
  background: white;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: calc(var(--menu-z) + 1);
  min-width: 260px;
  max-width: 400px;
  padding: 0.5rem 0;
}

.menu-content a,
.menu-content .btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: #111827;
  text-decoration: none;
}

.menu-content a:hover,
.menu-content .btn:hover {
  background: #f0f0f0;
}

/* ─────────────────────────────────────────────
   GUI Panels
───────────────────────────────────────────── */
.qs_main, .qs_container {
  background-color: #f0f8ff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  color: #111;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
  z-index: var(--gui-z);
}

/* ─────────────────────────────────────────────
   Right-side GUIs container (2x2 grid)
───────────────────────────────────────────── */
.gui-right-container {
  position: fixed;
  top: calc(20px + var(--gui-offset-y));
  right: calc(20px + var(--gui-offset-x));
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  z-index: var(--gui-z);
  max-width: 440px; /* 2 columns x 200px + gap */
}

.gui-right-container .qs_container {
  width: 95%;
}

.gui-right-container .qs_container input[type=range] {
  width: calc(100% - 10px);
}

/* Buttons inside GUIs */
.btn-sm {
  border-radius: 3px;
  border: 0.5px solid black;
  padding: 0px 0.5em;
}

.btn-wide {
  width: 100%;
}

/* ─────────────────────────────────────────────
   Responsive Adjustments
───────────────────────────────────────────── */
@media (max-width: 1200px) {
  #plot-wrapper {
    left: 0;
    right: 260px;
  }
  .qs_main, .qs_container {
    font-size: 13px;
    padding: 8px;
  }
}

@media (max-width: 800px) {
  body {
    overflow-x: hidden;
  }

  #plot-wrapper {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 95%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 10px auto;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  .gui-right-container {
    display: flex;
    flex-direction: column;
    position: relative;
    top: auto;
    right: auto;
    gap: 8px;
    margin: 0 auto 10px;
    width: 95%;
    max-width: 500px;
  }

  .qs_main, .qs_container {
    position: relative !important;
    width: 100%;
    margin: 8px auto;
    font-size: 0.9rem;
  }

  .hamburger-container {
    position: relative;
    top: 0;
    left: 0;
    margin: 0 auto 10px;
    display: flex;
    justify-content: center;
  }

  .menu-button {
    font-size: 1.5rem;
    padding: 5px 8px;
  }

  .menu-content {
    position: relative;
    top: 0;
    left: 0;
    max-height: 50vh;
    overflow-y: auto;
    width: 100%;
    margin-top: 5px;
  }

  #info-popups {
    position: relative;
    top: 0;
    left: 0;
    flex-direction: column;
    margin: 0 auto 5px;
    width: 95%;
    max-width: 500px;
  }
}



