
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: visible; /* Make sure no overflow hidden */
}

.visuals{
  min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.logo-container {
  position: fixed;
  flex-direction: column;
  display: flex;
  top: 0;
  width: 100%;
  background-color: white;
  z-index: 1000; /* Ensure it stays on top of other elements */
}

.logo-container img {
    width: 300px;
    height: 70px;
    margin-top: 20px;
    margin-left: 30px;
    margin-bottom: 2px;
}

.purple-bar {
  position: fixed;
  top: 2.5cm;
  left: 0;
  width: 100vw; /* Correct unit */
  height: 1.8cm;
  background-color: #7e3e97;
  margin-bottom: 20px;
  z-index: 999;
}

.visual-container{
    display: flex;
    flex-direction: row;
    align-items: flex-start; 
    gap: 1rem;
    height: 100%;
    margin-top: 10rem;
    flex-wrap: wrap;
}

.left-container,
.right-container {
    flex: 1 1 400px; /* grow, shrink, min width */
    min-width: 300px; /* prevent too narrow */
}

.left-container{
gap: 1rem;
margin-left: 1rem;
}

.customization-container-ei{
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.customization-container{
  display: flex;
  gap: 2rem;
}

.date-fields{
  display: flex;
  flex-direction: row;
  gap: 1.25rem;
  font-size: 1.125rem;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* space between label and input */
}

.date-field label{
font-family: Inter, sans-serif;
font-size: 1.125rem;
}

.options-section{
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-left: 20px;
  font-family: Inter, sans-serif;
  font-size: 1.125rem;
}

input[type="date"] {
width: 200px; /* or whatever size you want */
border: 2px solid #ddd; /* Sets a grey dotted border for the input field */
padding: 5px; /* Optional: Adds some padding inside the input field */
border-radius: 4px; /* Optional: Rounds the corners of the border */
font-size: 20px; /* Optional: Adjusts the font size */
/* Appearance changes that can influence the date picker */
background-color: #fff; /* Ensures a white background */
color: #333; /* Sets the text color */
font-family: Inter, sans-serif;
/*cursor: pointer;*/
}

.fuel-type select {
border: 2px solid #ddd; /* Sets a grey dotted border for the input field */
padding: 5px; /* Optional: Adds some padding inside the input field */
border-radius: 4px; /* Optional: Rounds the corners of the border */
font-size: 1.125rem; /* Optional: Adjusts the font size */
/* Appearance changes that can influence the date picker */
background-color: #fff; /* Ensures a white background */
color: #333; /* Sets the text color */
font-family: Inter, sans-serif;
/*cursor: pointer;*/
}

.aggregation select {
border: 2px solid #ddd; /* Sets a grey dotted border for the input field */
padding: 5px; /* Optional: Adds some padding inside the input field */
border-radius: 4px; /* Optional: Rounds the corners of the border */
font-size: 1.125rem;
/* Appearance changes that can influence the date picker */
background-color: #fff; /* Ensures a white background */
color: #333; /* Sets the text color */
font-family: Inter, sans-serif;
/*cursor: pointer;*/
}

.aggregation select,
.fuel-type select,
.term-type select {
    width: 100%;       /* take full width of parent div */
    max-width: 200px;  /* optional max width */
    box-sizing: border-box;
}

.fuel-type label {
  margin-bottom: 5px; /* space below the label */
  display: inline-block;  /*ensures margin works */
  font-size: 1.125rem;
}

.aggregation label{
  margin-bottom: 5px; /* space below the label */
  display: inline-block; /* ensures margin works */
  font-size: 1.125rem;
}

.desctext {
  display: auto; /* Hidden by default */
  margin-top: 10px;
  margin-bottom: 5px;
  padding: none;
  width: auto;
  background-color: none;
  border: none;
  border-radius: none;
  font-family: Inter, sans-serif;
  font-size: 1.125rem;
  align-items: center;
  text-align: justify;
  /*font-style: italic;*/
}

.get-data-button{
 background-color: #018420;
      color: rgb(249, 249, 249);
      border:none;
      border-radius: 5px;
      cursor: pointer;
      font-weight: bold;
      font-size: 1.15rem;
      width: auto;
      height: 50px;
      margin-top: 20px;
      margin-bottom: 30px;
}

.get-data-button:hover {
      background-color: #004a11;
      box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.3); /* Stronger shadow on hover */
}

.term-type{
  display: flex;
  flex-direction: column;
  margin-right: 70%;
  margin-top: 10px;
}

.term-type select {
width: 200px; /* or whatever size you want */
border: 2px solid #ddd; /* Sets a grey dotted border for the input field */
padding: 5px; /* Optional: Adds some padding inside the input field */
border-radius: 4px; /* Optional: Rounds the corners of the border */
font-size: 20px; /* Optional: Adjusts the font size */
/* Appearance changes that can influence the date picker */
background-color: #fff; /* Ensures a white background */
color: #333; /* Sets the text color */
/*cursor: pointer;*/
}

.term-type label {
  margin-bottom: 15px; /* space below the label */
  display: inline-block;  /*ensures margin works */
  font-family: Inter, sans-serif;
  font-weight: normal;
  font-style: italic;
  font-size: 20px;
}

#rateChart {
  border: 2px solid #fffefe; 
  border-radius: 6px;       /* Optional: rounded corners */
  padding: 2px;            /* Optional: space between border and chart */
  background-color: #ffffff;   /* Optional: white background inside border */
}


.data-dictnry{
  text-decoration: none;
  color:black;
  font-size: 20px;
  font-family: Inter, sans-serif;
}

a {
  text-decoration: none;
}

.plotly .modebar {
  background-color: transparent !important;
  opacity: 1 !important;
  box-shadow: none !important;
  border: none !important;
  height: 60px !important;
  pointer-events: auto !important;
  visibility: visible !important;
  transition: none !important;
}

.plotly .modebar:hover {
  background-color: rgba(255, 255, 255, 0.1) !important; /* subtle white on hover */
}

.plotly .modebar-btn {
  font-size: 25px !important;  /* Larger font for the icons */
  padding: 5px !important;    /* Increase padding inside buttons */
  height: 50px !important;     /* Increase button height */
  width: 50px !important;      /* Increase button width */
}

.period-selector{
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 20px;
  margin-top: 20px;
}

.period-selector label {
  margin-bottom: 5px; /* space below the label */
  display: inline-block;  /*ensures margin works */
  font-family: Inter, sans-serif;
  font-weight: normal;
  font-size: 20px;
  justify-content: left; 
}

.period-selector-box {
  border: 1px solid #ccc;
  border-radius: 12px;
  background-color: #fafafa;
  padding: 16px 20px;
  margin-top: 5px;
  margin-bottom: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.view-by-label {
  font-family: Inter, sans-serif;
  font-weight: normal;
  font-size: 20px;
  justify-content: left;
  margin-bottom: 5px;
  color: #000000;
}

.pdf-button {
    display: inline-block;
    padding: 8px 18px;
    background-color: #825893;
    color: rgb(245, 245, 245);
    text-decoration: none;
    border-radius: 5px;
    font-size: 20px;
    font-family: Inter, sans-serif;
    border: none;
    cursor: pointer;
    max-width: 150px;
    margin-top: 0;
    margin-bottom: 50px;
  }

.pdf-button:hover {
      background-color: #701195;
      box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.3); /* Stronger shadow on hover */
      transform: translateY(-1px);
}

#haeiHistogram {
  width: 100%;    /* fixed width you want */
  max-width: 100%; /* optionally prevent overflow */
  height: 100%;   /* fixed height */
  box-sizing: border-box;
}

.loader-container {
  display: none;
  text-align: center;
  padding: 20px;
  font-size: 20px;
}

.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #7e3e97;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.chart-box-wrapper {
  border: 1px solid #ccc;   
  border-radius: 6px; 
  padding: 16px;
  background-color: #ffffff;
  margin-top: 20px;
  flex-grow: 1;          /* expand vertically */
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.modal {
    display: none; 
    position: fixed;
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.4); 
}


.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%; /* Adjust width of the modal */
    max-width: 500px;
    position: relative;
    display: flex;
    flex-direction: column;
    font-weight: bold;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 
}

#popupMessage {
    font-size: 18px;
    font-family: 'Arial', sans-serif;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}


#popupOkButton {
    padding: 10px 20px; /* Padding for the button */
    background-color: #825893;
    color: white;
    border: black;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px; /* Space between message and button */
    transition: background-color 0.3s ease;
}

#popupOkButton:hover {
    background-color: #701195;
    transform: translateY(-1px);
}

.scrollable-container {
  max-height: 50px; 
  overflow-y: auto;  
  padding-right: 10px; 
  border: 1px solid #dddddd3f; 
  background-color: #f9f9f900; 
}

.select-controls {
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
}

.select-controls .btn {
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  background-color: #7e3e97;
  color: #ddd;
  transition: all 0.2s ease-in-out;
}

.select-controls .btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.select-controls {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.visualtitle{
font-family: Inter, sans-serif;
font-size: 1rem;
color: black;
font-weight: bold;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 25px;
  margin-right: 10px;
}
.switch input {display: none;}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 25px;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 19px;
  width: 19px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}
input:checked + .slider {
  background-color: rgb(201, 200, 200)
}
input:checked + .slider:before {
  transform: translateX(24px);
}

#toggleLabel {
  font-size: 20px;
  font-family: Inter, sans-serif;
  font-weight: bold;
  font-style: italic;
  color: #000000;
  margin-left: 8px;
}

.chart-toggle {
  margin-bottom: 30px; 
  display: flex;
  align-items: center;
  gap: 10px; /* optional: adds space between switch and label */
}


.pivot-selector {
  display: flex;
  flex-wrap: wrap; 
  gap: 1px;
  align-items: center; 
  padding:0; 
}

.pivot-selector  label {
  margin-bottom: 1px;
  font-size: 20px;
  font-family: Inter, sans-serif;
  font-weight: normal;
  margin-left: 30px;
}

.pivot-selector  select {
  width: 100px;
  padding: 1px;
  font-size: 20px;
  margin-right: 5px;
  height: 30px;
  font-family: Inter, sans-serif;
  border: 2px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  color: #000000;
}


/* Target the first TH in every header row */
#pivot-output .pvtTable thead tr th:first-child {
  min-width: 160px;     /* widen it */
  vertical-align: middle;
  font-weight: bold;
  text-align: center;
  padding: 12px 8px;
}

#pivot-output .pvtTable thead tr:first-child th:not(:first-child) {
  font-weight: bold;
}


#pivot-output .pvtTable th,
#pivot-output .pvtTable td {
  text-align: center !important;
  vertical-align: middle !important;
  font-size: 16px;
  padding: 10px 12px;
  font-family: Inter, sans-serif;
}

#pivotTitle {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #070707;
  text-align: center; /* Center the text */
}

.downloadPivotCsvBtn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #825893;
    color: rgb(245, 245, 245);
    text-decoration: none;
    border-radius: 5px;
    font-size: 15px;
    font-family: Inter, sans-serif;
    border: none;
    cursor: pointer;
    height: 90%;
  }


  .downloadPivotCsvBtn:hover {
      background-color: #701195;
      box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.3); /* Stronger shadow on hover */
      transform: translateY(-1px);
}

  .pivot-container {
    width: 100%;          /* full width of its parent */
    max-width: 100%;      /* don't overflow the page */
    overflow-x: auto;     /* horizontal scrollbar appears if needed */
    overflow-y: hidden;   /* prevents vertical scrollbar */
    border: 1px solid #ccc; /* optional: visual boundary */
    padding: 10px;        /* optional padding */
    box-sizing: border-box;
}

#pivot-output .pvtTable {
   min-width: 600px;      /* ensures table stays scrollable if wider than container */
    width: 100%;             /* table stretches within the container */
    max-width: none;         /* prevents fixed table width from overflowing */
    border-collapse: collapse;
    table-layout: auto;      /* allows responsive columns */
    word-wrap: break-word;
}

.begin-date-local {
  max-width: 150px;     /* Limit the width */
  white-space: normal;  /* Allow wrapping */
  word-wrap: break-word; /* Break long words */
  overflow-wrap: break-word; /* Also for wider support */
  padding: 5px;
}

@media (max-width: 768px) {
    .visual-container {
        flex-direction: column; /* stack left and right containers */
    }
    .left-container,
    .right-container {
        width: 100%;
    }
}

@media (max-width: 480px) {

    /* Don't scale logo/purple bar */
    .logo-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1001; /* above purple bar */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-left: 10px;
    }

    .logo-container img {
        width: 150px;  /* smaller logo for mobile */
        height: auto;
        margin: 10px 0 0 0;
    }

    .purple-bar {
        position: fixed;
        top: 50px;         /* just below logo */
        left: 0;
        width: 100vw;
        height: 1.8cm;
        background-color: #7e3e97;
        z-index: 1000;
    }
	
	.modal-content {
        margin: 25% auto; /* move popup lower than the default 15% */
    }

    /* Scale only the content below the logo + purple bar */
    .visuals > .visual-container {
        transform: scale(0.5);         /* zoom out content */
        transform-origin: top left;
        margin-top: calc(50px + 1.8cm); /* push below logo + purple bar */
        width: 133%;                     /* compensate scaling */
    }

    /* Ensure body can scroll horizontally if needed */
    body {
        overflow-x: auto;
    }
}