
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  /*overflow-x: hidden; /* 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: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 10rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.top-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-left: 1rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.box1 {
    min-width: 300px; /* prevent too narrow */
    width: 50%;
    flex-direction: column;
    display: flex;
}

.box2 {
    min-width: 300px; /* prevent too narrow */
    width: 50%;
    flex-direction: column;
    display: flex;
    margin-top: 3%;
    margin-left: 10%;
}

.hrline {
    width: 100%;
    height: 5px;
    background-color: #7e3e97;
    margin: 20px 0;
    flex-shrink: 0;
    align-self: stretch;
}

.tabs-container {
    display: flex;
    gap: 16px;
    border-bottom: 6px solid #7e3e97;
    margin-bottom: 20px;
    margin-left: 20px;
}

.tab-button {
    background: #dcdbdb;
    color: #050007;;
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 10px 24px;
    font-size: 18px;
    font-family: Inter, sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 300px; 
}

.tab-button:hover {
    background: #dfadf3;
    color: #000;
    box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.3); /* Stronger shadow on hover */
    transform: translateY(-1px);
}

.tab-button.active {
    background: #7e3e97;
    color: white;
}



.download-all-data-dt-button
{
    font-family: Inter, sans-serif !important;
    width: 200px;
    height: 40px;
    font-size: 18px !important;
    cursor: pointer;
    padding: 8px 14px !important;
    margin-right: 10px !important;
    margin-top: 10px !important;
    background-color: #dcb4ec !important;
    color: white !important;
    border: 1px solid black !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;   
}

.download-all-data-dt-button:hover {
    background-color: #7e3e97 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.3);
}



.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;
  margin-right: 5%;
  gap: .5rem; /* space between label and input */
}

.date-field label{
font-family: Inter, sans-serif;
font-size: 1.125rem;
}

.bottom-container {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 600px;
    box-sizing: border-box;
}



.marketshare-layout.active {
    display: none;
    width: 100%;
    height: 100%;
    gap: 20px;
    flex-direction: column;
}

.tab-content {
    display: none;
    width: 100%;
    height: 100%;
    gap: 20px;
    flex-direction: row;
}


.tab-content.active {
    display: flex;
}
.sharechartbox {
    display: flex;
    flex-direction: row;
    height: 100%;
    gap: 20px;
}

.alldata-layout.active {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 20px;
    width: 100%;
    height: auto;
    align-items: start;
    box-sizing: border-box;
}

.marketshare-layout.active {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 20px;
    width: 100%;
    height: auto;
    align-items: start;
    box-sizing: border-box;
}

.alldata-left {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.churn-layout.active {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 20px;
    flex-direction: column;
}

.marketshare-filters,
.churn-filters {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 25px;
    margin-top: 5px;
    margin-bottom: 15px;
}

.alldata-filters {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 5px;
    margin-bottom: 20px;
    box-sizing: border-box;
}


.marketshare-filter,
.alldata-filter,
.churn-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alldata-filter select:disabled {
    background-color: #e0e0e0;
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}


.marketshare-filter label {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 600;
}


.marketshare-filter select {
    width: 180px;
    height: 38px;
    padding: 5px 8px;
    font-family: Inter, sans-serif;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* Market Share export buttons */

#marketshare-table_wrapper .dt-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

#marketshare-table_wrapper .dt-button {
    font-family: Inter, sans-serif !important;
    font-size: 18px !important;
    cursor: pointer;
    padding: 8px 14px !important;
    background-color: #dcb4ec !important;
    color: white !important;
    border: 2px solid black !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

#marketshare-table_wrapper .dt-button:hover {
    background-color: #7e3e97 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.3);
}

#competitive-retailer-share-table_wrapper .dt-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

#competitive-retailer-share-table_wrapper .dt-button {
    font-family: Inter, sans-serif !important;
    font-size: 18px !important;
    cursor: pointer;
    padding: 8px 14px !important;
    background-color: #dcb4ec !important;
    color: white !important;
    border: 2px solid black !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

#competitive-retailer-share-table_wrapper .dt-button:hover {
    background-color: #7e3e97 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.3);
}

.alldata-layout.active {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 20px;
    width: 100%;
    height: auto;
    align-items: start;
    box-sizing: border-box;
}

.alldata-filter label {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 600;
}


.alldata-filter select {
    width: 180px;
    height: 38px;
    padding: 5px 8px;
    font-family: Inter, sans-serif;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.chart-loading-container,
.table-loading-container {
    position: relative;
}

.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 45px;
    height: 45px;
    margin-left: -22px;
    margin-top: -22px;
    border: 5px solid #e5e5e5;
    border-top: 5px solid #7e3e97;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.no-data-message {
    display: none;
    text-align: center;
    font-size: 22px;   /* increased from 18px */
    font-family: Inter, sans-serif;
    color: #555;
    padding: 60px 20px;
    font-weight: 500;
}

.churn-filter label {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 600;
}


.churn-filter select {
    width: 180px;
    height: 38px;
    padding: 5px 8px;
    font-family: Inter, sans-serif;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.alldata-chartbox {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: auto;
    gap: 20px;
    box-sizing: border-box;
}

.alldata-chartbox .placeholder-box {
    width: 100%;
    min-width: 0;
    height: auto;
    margin-top: 0;
    align-self: stretch;
    box-sizing: border-box;
}


.alldata-layout > .table-container {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    align-self: start;
}
.churn-chartbox {
    display: flex;
    flex-direction: row;
    height: 100%;
    gap: 20px;
}

#competitive-retailer-share-chart-container {
width: 95%;
margin: 20px auto;
min-width: 0;
box-sizing: border-box;
background-color: #f7f7f7;
border: none;
border-radius: 8px;
padding: 15px 20px 20px 20px;
}

#competitive-retailer-share-chart {
width: 100% !important;
height: 650px !important;
margin: 0 !important;
box-sizing: border-box;
}

/* Table and chart placeholders */
.placeholder-box {
    flex: 1;
    border: none;
    border-radius: 8px;
    background: #f8f8f8;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;

    font-size: 18px;
    font-weight: 600;
    color: #666;

    box-sizing: border-box;
}

#consumption-chart,
#site-count-chart {
    width: 100% !important;
    max-width: none !important;
    height: 500px;
    margin-bottom: 30px;
    box-sizing: border-box;
    margin-left: 20px;
    width: calc(100% - 40px) !important;
}

#consumption-chart {
    margin-top: 20px;
}


/* Churn Rate DataTable */
#churnrate-table,
#churnrate-table th,
#churnrate-table td {
    font-family: Inter, sans-serif;
}

#churnrate-table tbody td {
    font-weight: 400;
    color: black;
}

#churnrate-table thead th {
    font-weight: 600;
    color: black;
}

#churnrate-table_wrapper {
    font-family: Inter, sans-serif;
    font-size: 18px;
    font-weight: 400;
    min-width: 90px;
    color: black;
    padding: 8px 16px;
}

/* Show entries */
#churnrate-table_wrapper .dataTables_length {
    font-family: Inter, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: black;
}

/* Showing 1 to 30 of ... */
#churnrate-table_wrapper .dataTables_info {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: black;
}

/* Pagination */
#churnrate-table_wrapper .dataTables_paginate {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 400;
}

/* Entries dropdown */
#churnrate-table_wrapper .dataTables_length select {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 400;
}

/* Pagination buttons */
#churnrate-table_wrapper .dataTables_paginate .paginate_button {
    font-family: Inter, sans-serif;
    font-size: 16px;
    padding: 10px 12px !important;
    font-weight: 600;
}

#churnrate-table_wrapper .dataTables_length select {
    width: 80px !important;
    height: 40px !important;
    font-size: 18px !important;
    padding: 5px 10px !important;
    border: 2px solid #999 !important;
    border-radius: 4px !important;
}


#provider-button-churn,
#provider-options-churn {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: black;
}

#churnrate-table,
#churnrate-table tbody,
#churnrate-table tbody tr,
#churnrate-table_wrapper {
    background-color: white !important;
}

.churn-chartbox {
    width: 100%;
    flex: 1;
    min-height: 700px;
    display: flex;
}

.churn-chartbox .placeholder-box {
    width: 100%;
    height: 100%;
    min-height: 700px;
    box-sizing: border-box;
}

#churnrate-chart {
    width: 100%;
    height: 100%;
    min-height: 650px;
}


.churn-chartbox .chart-loading-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}

/* Churn Rate chart */
.churn-chartbox {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 500px;
    box-sizing: border-box;
}

.churn-chartbox .placeholder-box {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#churnrate-chart {
    width: calc(100% - 40px) !important;
    height: 600px !important;
    margin-left: 20px;
    margin-bottom: 30px;
    margin-top: 20px;
    box-sizing: border-box;
}

#provider-options-churn .multi-select-option {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: black;
}

.multi-select-dropdown {
    position: relative;
    width: 180px;
}

.multi-select-button {
    width: 180px;
    min-height: 38px;
    padding: 7px 30px 7px 10px;
    text-align: left;
    font-family: Inter, sans-serif;
    font-size: 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multi-select-button::after {
    content: "▼";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
}

.multi-select-button:disabled {
    background-color: #e0e0e0;
    color: #888;
    cursor: not-allowed;
}

.multi-select-dropdown.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.multi-select-dropdown.disabled .multi-select-button {
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #ced4da;
    cursor: not-allowed;
}

.multi-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    width: 180px;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 5px 0;
}

.multi-select-dropdown.open .multi-select-options {
    display: block;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
}

.multi-select-option:hover {
    background-color: #f2f2f2;
}

.multi-select-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}

.select-all-checkbox {
    margin-top: 4px;
}

/* Summary Snapshot: three tables vertically */
.summary-layout {
    flex-direction:column;
    gap:15px;
}


.summary-table-placeholder {
    flex:1;
    width:100%;
    border:1px solid #ccc;
    border-radius:8px;
    background:#f7f7f7;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:18px;
    font-weight:600;
    color:#666;
}

.summary-table-wrapper {
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.summary-table {
    width: 120%;
    margin-left: 20px !important;
    margin-right: auto !important;
}

.summary-table,
.summary-table th,
.summary-table td {
    font-family: Inter, sans-serif;
    color: black;
}

.summary-table th {
    font-size: 18px;
    font-weight: 700;
}

.summary-table td {
    font-size: 16px;
    font-weight: 400;
}

input[type="month"] {
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;*/
}



.summary-filter {
    width:100%;
    display:flex;
    justify-content:space-between;
    width: 100%;
    margin-bottom:10px;
}

.summary-export-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.summary-export-buttons button {
    font-family: Inter, sans-serif;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 14px;
    background-color: #dcb4ec;
    color: white;
    border:2px solid black;;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.summary-export-buttons button:hover {
    background-color: #7e3e97;
    transform: translateY(-2px);
    box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.3);
}


.summary-filter .date-field {
    display:flex;
    flex-direction:column;
    gap:5px;
    margin-left: 10px;
}


.summary-filter label {
    font-family:Inter, sans-serif;
    font-size:18px;
}


.summary-filter input[type="month"] {
    width:200px;
    height:40px;
    border:2px solid #ddd;
    border-radius:4px;
    padding:5px;
    font-size:18px;
    font-family:Inter, sans-serif;
}

.marketshare-filters input[type="month"] {
    width:200px;
    height:26px;
    border:2px solid #ddd;
    border-radius:4px;
    padding:5px;
    font-size:16px;
    font-family:Inter, sans-serif;
}


.summary-table-wrapper h3 {
    padding: 0;
    text-align: left;
    margin-left: 10px;
    font-size:18px;
    font-family:Inter, sans-serif;
    color: black;
}

/* =========================================================
   SUMMARY SNAPSHOT COLLAPSIBLE TABLES
   ========================================================= */
.summary-box-header {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.summary-box-header h3 {
    margin: 0;
    flex: 1;
}

.summary-collapse-button {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 34px;
    height: 34px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: Inter, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;

    background-color: #dcb4ec;
    color: black;

    border: 2px solid black;
    border-radius: 4px;

    cursor: pointer;
}

.summary-table-placeholder {
    position: relative;
}

.summary-collapse-button:hover {
    background-color: #7e3e97;
    color: white;
}


.summary-table-wrapper {
    position: relative;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.summary-collapse-button {
    position: absolute;
    right: 10px;
    top: 10px;
    margin: 0;
}

/* =====================================================
   MARKET SHARE
   ===================================================== */

/* First row:
   Market Share + radio buttons
*/
.marketshare-view-options {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    margin-bottom: 30px;
}

.marketshare-view-options .selector-heading {
    font-family: Inter, sans-serif;
    font-size: 20px;
    font-weight: bold;
    margin-right: 40px;
    white-space: nowrap;
}

.marketshare-view-options .radio-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px 30px;
    font-family: Inter, sans-serif;
    font-size: 18px;
}


.marketshare-view-options .radio-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .marketshare-view-options .radio-options label:last-child {
        flex-basis: 100%;
    }
}


.marketshare-view-options .radio-options input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.marketshare-table-metric-options .radio-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    font-family: Inter, sans-serif;
    font-size: 18px;
    margin-bottom: 10px;
}

.marketshare-table-metric-options .radio-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.marketshare-table-metric-options .radio-options input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Second row:
   Commodity + Customer Type + Provider + Zone
*/
.marketshare-filters {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 0;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.marketshare-filters .alldata-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.marketshare-filters .alldata-filter label {
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.marketshare-filters .alldata-filter select {
    width: 180px;
    height: 38px;
    padding: 5px 8px;
    font-family: Inter, sans-serif;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: white;
}


/* Market Share chart */
#marketshare-chart {
    width: calc(100% - 40px) !important;
    height: 700px !important;
    margin-left: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.desctext {
  display: auto; /* Hidden by default */
  margin-top: 10px;
  margin-bottom: 5px;
  padding: none;
  width: 90%;
  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;*/
}

#MarketShare,
#ChurnRate,
#ConsumptionSiteCount {
    padding-left: 20px;
}

#SummarySnapshot{
    padding-left: 10px;
}

.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 */
}


.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: 0;
  }

.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 */
    }
    .top-container,
    .bottom-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;
    }
}
