/* static/css/dash.css */

/* ---------- Slide-up panel ---------- */
#dash-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -70vh;                 
  --sheet-max: 92vh;
  height: calc(var(--sheet-max) / 2); 
  max-height: var(--sheet-max);
  transition: bottom 0.25s ease, height 0.15s ease;
  z-index: 10000;
  background: rgba(var(--white2), var(--trans));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  /*border-top: 1px solid rgba(var(--white), 0.28);*/
  box-shadow: 0 -8px 24px rgba(var(--black),0.15);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#dash-sheet.open { bottom: 0; }

/* ---------- Small Buttons ---------- */
#dash-sheet #dash-close,
#dash-sheet #dash-minimize, 
.intro-sheet #intro-close{
  z-index: 10002;              
  position: absolute;
  top: 8px;
  border: 0;
  background: rgba(var(--black),0.05);
  font-size: 20px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: var(--smallcorner);
  cursor: pointer;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  color: var(--darkergrey);
  display: flex;
  justify-content: center;
  align-items: center;
}
#dash-sheet #dash-minimize { right: 48px; }
#dash-sheet #dash-close    { right: 8px;  }
.intro-sheet #intro-close {
  top: 8px; right: 8px;
}

#dash-sheet #dash-close:hover,
#dash-sheet #dash-minimize:hover, 
.intro-sheet #intro-close:hover {
    background: rgba(var(--black), 0.1);
} 

#dash-sheet #dash-close:active::before,
#dash-sheet #dash-minimize:active::before {
  color: var(--lowlight);
}

/* ---------- Grip (drag handle) ---------- */
#dash-sheet .sheet-grip {
  position: absolute;
  top: 8px;
  left: 50%;
  right: auto;
  width: 120px;
  transform: translateX(-50%);
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: ns-resize;
  z-index: 10001;              
  touch-action: none;          
}

#dash-sheet .sheet-grip-handle {
  width: 80px;
  height: 6px;
  border-radius: 999px;
  background: rgba(var(--black),0.05);
}

/* ---------- Panel content ---------- */
#dash-sheet #dash-frame {
  position: absolute;
  top: 48px;                     
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100% - 48px);
  border: 0;
  background: transparent;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden;
}

#dash-sheet.min {
  height: 50px !important;
}

#dash-sheet.min #dash-frame { display: none; }
#dash-sheet.min .sheet-grip { height: 11px; }

#dash-sheet #dash-close::before {
  content: '×';
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
}

#dash-sheet #dash-minimize::before {
  content: '▼';
  font-size: 15px;
  font-weight: 300;
  line-height: 1;
}

#dash-sheet.min #dash-minimize::before {
  content: '▲';
  font-size: 15px;
  font-weight: 300;
  line-height: 1;
}

/* ---------- Intro ---------- */
.intro-sheet {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 800px);
  height: 80vh;
  max-height: 90vh;
  z-index: 10000;
  border-radius: var(--bigcorner);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  overflow: hidden;
  box-shadow: 0 -8px 24px rgba(var(--black),0.15);
}

.intro-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent !important;
  border-radius: inherit;
  pointer-events: none; 
  z-index: 1; 
}

iframe.intro-frame {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent !important;
  border-radius: inherit;
  z-index: 0; 
}

.intro-sheet.open { 
    bottom: 24px; 
}

.intro-frame.is-transparent { border-radius: inherit; background: transparent; }

.intro-frame {
  position: absolute;
  top: 0px;
  left: 0;
  right: 100;
  width: 100%;
  height: 100%;  /* calc(100% - 48px); */
  border: 0;
  background: transparent !important;
  border-radius: inherit;  
 }

html.intro-embed { background: transparent !important; }
body.intro-embed { background: rgba(var(--white2), var(--trans)) !important; }
body.intro-embed main { background: transparent !important; }

/* ---------- Plotly charts ---------- */

#scattergramContainer {
    width: 100%;
    max-width: 900px;
    height: 600px;
    margin: 2rem auto;
    float: left; 
/*  margin-top: 1em; 
  display: block;*/
}

