/* Full container */
#left-tab-container {
  position: fixed; /* Keep it positioned relative to viewport */
  top: 100px; /* Adjust as needed */
  left: 10px; /* Initially hidden, adjusted for full slide effect */
  display: flex;
  z-index: 999;
  border-radius: 10px 0 0 10px;
  overflow: hidden; /* Hide overflow content */
  width: 550px;
}

/* Button bar */
#left-tab-sidebar {
  height: calc(100vh - 250px);
  width: 50px;
  background-color: #170048;
  border-radius: 10px; /* Round all corners by default */
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #5840ff;
  position: relative;
  z-index: 10;
  cursor: pointer; /* Makes sidebar clickable */
}

/* Main side tab */
#left-tab-content {
  height: calc(100vh - 230px); /* Full height minus top offset */
  width: 400px;
  left: -450px;
  background-color: #170048cc;
  overflow: hidden;
  border-radius: 0 10px 10px 0;
  border: 2px solid #5840ff;
  border-left: none;
  margin-left: -25px;
  position: relative;
  z-index: 5;
  backdrop-filter: blur(10px);
  font-family: Helvetica Neue;
  color: white; /* Default text color for the sidebar */
  font-size: 16px; /* Default text size inside the sidebar */
  will-change: transform;
  transition: left 0.5s ease-in-out;
  padding-left: 30px;
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: hidden; /* Prevent horizontal scrolling */

  /* Hide scrollbar in WebKit browsers (Chrome, Safari, Edge) */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE 10+ */
}

/* Sliding effect on open */
#left-tab-container.open {
  left: 10px; /* Slides tab out fully */
}

/* Button */
.nav-button {
  width: 36px;
  height: 36px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background-color: #2d2d55;
}

/* National Grid: Live */
#left-tab-title {
  position: absolute;
  top: 10px;
  left: 45px;
  width: 410px; /* Keep it within 450px tab width minus padding */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s ease;
  opacity: 1;
}

/* Top line */
#left-tab-header hr {
  border: 0;
  height: 1px;
  background-color: #5840ff;
  margin: 70px 15px 0px 0px;
}

#genChartLeft hr {
  border: 0;
  height: 1px;
  background-color: #5840ff;
  margin: 0px 15px 0px 0px;
  width: 385px;
}

#genChartLeft {
  width: 375px;
  height: auto; /* Adjust height if needed */
}

/* Info bars */
.info-bar {
  display: flex;
  justify-content: space-between;
  background-color: #170048;
  padding: 10px 10px 10px 0px;
  margin: 15px 15px 0px 0px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.1);
  border: 1.5px solid #5840ff;
}

.info-bar div {
  flex: 1;
  text-align: center;
  color: #fff;
}

.info-bar strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
}

/* Second info bar */
.equation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.equation-bar .symbol {
  color: #ccc;
  font-size: 24px;
  padding: 0px 10px 0px 10px;
}

#info-demand {
  padding-left: 20px;
}

#info-imports {
  padding-right: 10px;
}

/* Demand column in info bar 2 */
#h-info-demand {
  padding-left: 20px;
}

/* Transfers column in info bar 2 */
#h-info-imports {
  padding-right: 10px;
}

#info-price {
  padding-left: 20px;
}

#info-emissions {
  padding-left: 20px;
}

/* Historical Data section */

#historical-data-title {
  padding-left: 10px; /* Adjust the value as needed */
}

.historical-buttons-container {
  display: flex;
  width: 385px; /* Full width of the parent container */
  background-color: #170048; /* Background color for the rectangle */
  border-radius: 2px; /* Rounded corners for the rectangle */
  overflow: hidden; /* Ensure no content overflows */
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.1); /* Optional shadow for styling */
}

.historical-button {
  flex: 1; /* Each button takes up an equal portion of the container */
  text-align: center; /* Center the text inside each button */
  padding: 10px 0; /* Add vertical padding */
  background-color: #170048; /* Button background color */
  color: white; /* Button text color */
  font-size: 14px; /* Font size for the button text */
  font-weight: bold; /* Make the text bold */
  cursor: pointer; /* Change cursor to pointer on hover */
  border-right: 1px solid #170048; /* Add a dividing line between buttons */
  border: 1.5px solid #5840ff;
}

.historical-button:hover {
  background-color: #452ecc; /* Change background color on hover */
}

.historical-button.active {
  background-color: #452ecc; /* Active button background color */
}

/* Historical data info bar 1 */
.hist-data-info-bar-1 {
  display: flex;
  justify-content: space-between;
  background-color: #170048;
  padding: 10px 10px 10px 0px;
  margin: 15px 15px 0px 0px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.1);
  border: 1.5px solid #5840ff;
  width: 372px;
}

.hist-data-info-bar-1 div {
  flex: 1;
  text-align: center;
  color: #fff;
}

.hist-data-info-bar-1 strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
}

/* Historical data info bar 2 */
.hist-data-info-bar-2 {
  display: flex;
  justify-content: space-between;
  background-color: #170048;
  padding: 10px 10px 10px 0px;
  margin: 15px 15px 0px 0px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.1);
  border: 1.5px solid #5840ff;
  width: 372px;
}

.hist-data-info-bar-2 div {
  flex: 1;
  text-align: center;
  color: #fff;
}

.hist-data-info-bar-2 strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
}

.hist-data-info-bar-2 .symbol {
  color: #ccc;
  font-size: 24px;
  padding: 8px 10px 0px 10px;
}

/* Historical Data Generation Chart */

.historicalChartLeft {
  width: 100%; /* Full width of the parent container */
  height: 300px; /* Adjust height as needed */
  margin: 20px 0; /* Add spacing around the chart */
  position: relative; /* Required for responsive Chart.js */
}

#historicalChart-Left {
  width: 100%;
  height: 100%;
}

#historical-data-content {
  max-height: 500px; /* Set the maximum height for the section */
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: hidden; /* Prevent horizontal scrolling */
  padding-right: 10px; /* Add padding to avoid content touching the scrollbar */
  margin-top: 10px; /* Optional: Add spacing above the section */

  /* Hide scrollbar in WebKit browsers (Chrome, Safari, Edge) */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE 10+ */
}

.historical-data-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* Fuel type rows */

#fuel-type-rows {
  margin-top: 20px; /* Add spacing above the rows */
}

.fuel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
}

.fuel-square {
  width: 20px;
  height: 20px;
  border-radius: 3px; /* Optional: Rounded corners */
}

.fuel-name {
  flex: 2; /* Adjust width of the name column */
  text-align: left;
  color: #ffffff;
  font-size: 14px;
  padding-left: 10px;
}

.fuel-generation {
  flex: 1; /* Adjust width of the generation column */
  text-align: right;
  color: #ffffff;
  font-size: 14px;
}

.fuel-percentage {
  flex: 1; /* Adjust width of the percentage column */
  text-align: right;
  color: #ffffff;
  font-size: 14px;
}

/* ADJUST FOR MOBILE */

@media all and (max-width: 768px) {
  #info-panel {
    top: 30px !important;
    position: fixed !important;
    width: calc(100vw - 120px) !important;
    height: calc(100vh - 205px) !important;
    overflow-y: auto !important; /* Enable vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
  }

  #left-tab-container {
    top: 30px;
  }

  #left-tab-sidebar {
    top: 0px;
    left: 0px;
    height: calc(100vh - 200px); /* Full height minus top offset */
    width: 40px !important;
    flex-shrink: 0;
  }

  #left-tab-content {
    left: -20px;
    height: calc(100vh - 180px);
    width: calc(100vw - 80px) !important;
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
  }

  #left-tab-container.closed {
    width: 60px !important;
  }

  #left-tab-container.open {
    width: 100vw !important;
  }  

  #genChartLeft hr {
    width: 89%;
  }

  #h-button-container{
    width: 95.5%;
  }

  #h-info-bar-1 {
    width: 95.5%;
  }

  #h-info-bar-2 {
    width: 95.5%;
  }

}