/* --------- GENERAL HTML DOCUMENT ITEMS */ 
body {
  font-family:Arial, Helvetica, sans-serif;
  background-color: #171619;
  color: #fefffa;
  overflow-x: hidden;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
}

#heading {
  display: flex;
  width: 100vw;
  font-size: 3rem;
  justify-content: center;
  padding-top: 1vh;
  text-align: center;
  background-color: #0f0e10;
}

/* SMALL LINKS */ 
#process-book-link {
  position: absolute;
  right: 2vw;
  color: #fff5ca;
  font-size: 1.5rem; 
  padding: 1rem;
}

#video-link {
  position: absolute;
  top: 1.5vw;
  right: 2vw;
  color: #fff5ca;
  font-size: 1.5rem; 
  padding: 1rem;
}

#process-book-link:hover, #video-link:hover {
  color: #fff5ca;
  text-decoration: underline;
}

/* ------- VISUALIZATION RELATED ITEMS */ 

/* GENERAL */ 
/* general items throughout the visualizations */ 
.chart {
  width: 100%;
  height: 100%;
}

header {
  width: 100%;
  text-align: center;
}

#variable-selection {
  color: black;
}

.my-tooltip{
  position: relative;
  display: inline-block;
  color: #fefffa;
  font-weight: bold;
  font-size: 18px;
  margin-left: 8px;
  border-bottom: 1px dotted #fefffa;
  cursor: pointer;
}

.fa {
  font-size: 10pt; 
  margin-bottom: 3px;
}

#notice {
  width: 40vw;
  text-align: center;
}

/* messages embedded in the headings */
.my-tooltip .my-tooltiptext {
  visibility: hidden;
  width: 230px;
  background-color: rgba(0,0,0,0.85);
  color: #fefffa;
  text-align: center;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  position: absolute;
  z-index: 9999;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.my-tooltip .my-tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0,0,0,0.85) transparent transparent transparent;
}

.my-tooltip:hover .my-tooltiptext {
  visibility: visible;
  opacity: 1;
}

img {
  aspect-ratio: initial;
  max-width: 40vw;
  margin: 1vh;
  margin-left: 0px;
}

.explaining-radiance {
  margin-left: 8px; 
  margin-top: 5px;
}

.explaining-barchart {
  margin-left: 8px; 
  margin-top: 5px;
  font-size: 8pt;
}


/* Dashboard Layout */
#dashboard {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 58vh;
  gap: 4vw;
  padding-left: 4vw;
  padding-right: 4vw;
}

/* MAP ITEMS */
#map-section {
  position: relative;
  width: 70%;
  height: 100%;
}

#mapvis {
  position: absolute;
  top: 0;
  left: 0;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

#regions {
  position: absolute;
  top: 10px;
  left: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  z-index: 1;
  width: 100%;
  height: 6%;
}

.btn {
  width: 50%;
  max-width: 110px;
  height: 100%;
  margin-left: 15px;
  border: none;
  outline: none;
  color: black;
  background-color: #b3b0a1;
}

.btn {
  outline: none;
  box-shadow: none;
}

.btn:focus,
.btn:focus-visible,
.btn:active
{
  outline: none !important;
  box-shadow: none !important;
}

.btn.selected {
  color: black;
  background-color: #fefffa;
}

.map-text {
  font-size: 8pt;
}

/* METRIC SECTION ITEMS */
#metric-section {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 30%;
}

#metric-header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1vw;
}

#metric-charts {
  display: flex;
  flex-direction: column;
}

#scatter-plot, #bar-top-chart, #bar-bottom-chart {
  width: 100%;
  height: 100%; 
}

/* REGRESSION SECTION ITEMS */
#regression-section {
  width: 100vw;
  height: 34vh;
  padding-top: 1vh;
  padding-left: 4vw;
  padding-right: 4vw;
  background-color: #0f0e10;
}

#regression-charts {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 1vw;
}

#regression-mental, #regression-physical-risk, #regression-physical-outcome, #regression-sleep {
  width: 100%;
  height: 100%; 
}
#regression-mental-plot, #regression-physical-risk-plot, #regression-physical-outcome-plot, #regression-sleep-plot {
  width: 100%;
  height: 100%; 
}

/* INTRO POPUP */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-dialog {
  background-color: #fff;
  width: 60%;
  max-width: 700px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 15px;
  text-align: center;
  background-color: #f1f1f1;
  color: black;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close {
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
}

.modal-body {
  padding: 20px;
  color: black;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer button {
  padding: 8px 16px;
  color: #171619;
  cursor: pointer;
}


/* CHART POPUP */
.chart-modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: none; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.chart-modal-content {
  background-color: #fefefe;
  margin: 12% auto;
  padding: 60px;
  border: 1px solid #888;
  width: 60%; 
  max-width: 1000px;
  color: #000;
  border-radius: 20px;
}

#chart-modal-body {
  width: 100%;
  /* max-width: 400px; */
  margin: 0% 20%;
  color: #000;
}

/* The Close Button */
.chart-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  padding-top: 20px;
}

.chart-close:hover,
.chart-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}