.container {
    width: 90%;
    margin: 0 auto; /* Removes margin from all sides except left and right */
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    overflow: hidden; /* Prevent content overflow */
    flex-wrap: wrap;
}

#new-chart-container {
  grid-column: span 3; /* Span across 3 columns in the grid */
  width: 97%;
  margin: 20px 0;
      background-color: #f8f9fa;

    padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow-x: auto;
  
}


#new-chart-container h2 {
  margin-bottom: 20px;
}

#new-chart-container canvas {
  display: block;
  width: 100% !important;
  max-height: 400px; /* NEW: limit height to 400px or any size you want */
  height: 400px;     /* NEW: force height smaller */
}

#new-chart-container button {
  margin-top: 10px;
}

.section-group {
  background: #fff !important;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.section-box {
    background-color: #f8f9fa;

  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 20px;
  margin-bottom: 24px;  /* Creates white space between each .section-box */
}

/* Optional: Remove bottom margin from the last .section-box for cleaner look */
.section-box:last-child {
  margin-bottom: 0;
}


.chart-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}


table, th, td {
    border: 1px solid black;
    border-collapse: collapse;
    padding: 4px;
  }
  #output { margin-top: 20px; }


.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.chart-section {
    text-align: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Enable vertical scrolling */
overflow-x: auto;
transition: transform 0.3s ease, box-shadow 0.3s ease;
perspective: 1000px;
}

.password-prompt {
    display: none;
    margin-top: 10px;
}
.previous-passwords {
    margin-top: 10px;
}
.previous-passwords a {
    display: block;
    cursor: pointer;
    color: blue;
    text-decoration: underline;
    margin-top: 5px;
}

hr {
    border: none;
    height: 2px;
    background-color: blue;
    margin: 20px 0;
}

.locked-container {
    position: relative;
    display: inline-block; /* Keeps the prompt directly under the link */
    z-index: 9999; /* Ensures it always appears on top */
}


.password-prompt {
    display: none;
    position: absolute;
    top: 100%; /* Places it right below the link */
    left: 0;
    background: white;
    border: 2px solid #0056b3;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    width: 220px;
    margin-top: 5px; /* Adds space between link and password box */
}

.locked-link {
    text-decoration: none; 
    color: #0056b3; 
    font-weight: bold; 
    font-size: 18px; 
    padding: 10px 20px; 
    border: 2px solid #0056b3; 
    border-radius: 5px; 
    transition: all 0.3s;
}

.password-prompt input {
    width: fit-content;
    margin-bottom: 5px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.password-prompt button {
    width: 70%;
    padding: 5px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
}

.password-prompt button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.password-prompt button:hover:not(:disabled) {
    background-color: #003d80;
}

.scrollable-container {
    max-height: 620px; /* Adjust the height as needed */
    overflow-y: auto; /* Enables vertical scrolling */
    border: 1px solid #ccc; /* Optional: Add a border for visibility */
    padding: 10px; /* Optional: Add padding for better appearance */
    background-color: #f9f9f9; /* Optional: Add background color */
    scrollbar-width: thin; /* Optional: Make the scrollbar thinner (for Firefox) */
    scrollbar-color: #888 #f1f1f1; /* Optional: Custom scrollbar colors */
}

/* Optional: Style for Webkit-based browsers (e.g., Chrome, Safari) */
.scrollable-container::-webkit-scrollbar {
    width: 8px;
}

.scrollable-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.scrollable-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}


.full-width {
    grid-column: span 3;
}

/* General styling */
#fetch-progress {
    text-align: center;
    font-size: 1.2em;
    color: #333;
    margin-bottom: 20px;
}

h3 {
    position: relative;
    padding-top: 20px;
}

h3::before {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    position: absolute;
    top: 0;
    left: 0;
}


/* Grid container styling */
.winrate-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Four columns */
    grid-template-rows: repeat(2, auto);   /* Two rows */
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Individual branch styling */
.branch-win-rate {
    background-color: #f0f4f8;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Title and data styling inside each branch */
.branch-win-rate h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.branch-win-rate p {
    font-size: 1.5em;
    font-weight: bold;
    color: #4caf50;
}


.grid-header {
    text-align: center;      /* Center text horizontally */
    font-size: 1.5em;        /* Increase font size */
    font-weight: bold;       /* Make the text bold */
    color: #333;             /* Set a darker color */
    margin: 20px 0;          /* Add spacing above and below */
}



  /* Center and style the loading indicator */
  #loading-indicator {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5em;
    z-index: 1000;
}

#loading-indicator::after {
    content: "";
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px; 
}

/* Toggle switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

#branch-dropdown2 {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-size: 17px;
    padding: 4px;
    width: 150px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    background-color: #fff;
    color: #333;
}

/* Style the file input and dropdown for consistency */
input[type="file"]{
    margin-top: 10px;
    font-size: 16px;
    padding: 5px;
    width: 350px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.branch {
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 200px; /* Fixed width for consistency */
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#export-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

#export-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    pointer-events: none; /* Prevents any hover effects or events */
}

/* Additional hover styling if needed */
#export-button:disabled:hover {
    background-color: #ccc; /* Keeps the same background color on hover */
    cursor: not-allowed; /* Keeps the cursor style on hover */
}

#live-update-container,
#record-count, 
#record-count2, 
#record-count3, 
#record-count4, 
#record-count5, 
#record-count6, 
#record-countR6, 
#record-countR12, 
#record-countR18,
p,
#winratebyBranch {
    margin-bottom: 20px;
    font-size: 18px;
    color: #28a745;
    font-weight: 500;
}

hr {
    border: 0;
    height: 1px;
    background: #e9ecef;
    margin: 15px 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

button {
    display: block;
    margin: 30px auto;
    padding: 12px 24px;
    font-size: 18px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

#export-button,
#export-button2 {
    display: none;
}

/* Adjust grid layout for smaller screens */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr); /* Two columns */
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr; /* One column */
    }

    .chart-section {
        margin-bottom: 20px; /* Add spacing between items */
    }
}

.csvTable td:first-child,
.csvTable th:first-child {
  max-width: 140px !important ;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.dropdown-checkbox-wrapper {
    display: flex;
    flex-direction: column;
    max-height: 750px !important;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid #ccc;
    background-color: white;
    z-index: 1000;
    color: black;
}

/* Change the dropdown background */
.choices__list--dropdown {
    background-color: #f0f8ff !important; /* light blue background */
    color: #333 !important;               /* text color */
    overflow-y: auto !important;
  }
  
  /* Change selected item highlight */
  .choices__item--selectable.is-highlighted {
    background-color: #009688 !important; /* teal highlight */
    color: white !important;
  }
  
  /* Change multi-select selected items */
  .choices__list--multiple .choices__item {
    background-color: #007BFF !important; /* blue badge */
    color: white !important;
    border: none;
    overflow-x: hidden;
  }
  
  /* Change search input (if used inside dropdown) */
  .choices__input {
    color: #222 !important;
  }

  /* Optional: tweak search box inside dropdown */
.choices__list--dropdown .choices__input {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
  }
  
  .choices__inner {
    min-height: 44px; /* make sure it's not too small */
    padding: 6px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .choices__list--dropdown, 
  .choices__list[aria-expanded] {
    max-height: 250px !important;
    overflow-y: auto !important;
    z-index: 9999; /* ensures it shows over everything */
  }

.dropdown-search {
    margin-bottom: 6px;
    padding: 4px;
    width: 100%;
    box-sizing: border-box;
    font-size: 12px;
}

.table-wrapper {
    z-index: 1;
  }
  

.checkbox-list label {
    display: block;
    font-size: 12px;
    padding: 2px 0;
}
/* Ensure parents don't clip the dropdown */
.choices {
    position: relative;
    z-index: 10;
  }
  
  /* Remove floating styles so dropdown takes up space in the flow */
.choices__list--dropdown {
    position: static !important;     /* makes it behave like a regular block */
    z-index: auto !important;        /* removes stacking context */
    margin-top: 6px;                 /* optional spacing */
    background: #f0f8ff !important;  /* your background */
    border: 1px solid #ccc;          /* optional for visibility */
    box-shadow: none !important;     /* remove floating shadow if any */
  }
  
  #csvTableMaster .thick-border-top {
    border-top: 3px solid #000;
  }

.container {
    width: 90%;
    margin: auto;
    text-align: center;
}

.table-container {
    max-height: 800px;
    overflow: auto;
    border: 1px solid #ccc;
    margin-bottom: 2rem;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* ensures equal-width columns */
  }
  
  th, td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    word-wrap: break-word;
    white-space: nowrap;
  }
  
  thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
  }
  

.table-container table {
    width: 100%;
    border-collapse: collapse;
    overflow: visible;

}

.table-container table td,
.table-container table th {
    padding: 8px;
    overflow: visible;
    position: relative; /* Needed so dropdown can be positioned */
    z-index: 1; /* Bring it above others if needed */
    border: 1px solid #ddd;
    text-align: center;
}

#csvTableMaster th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
  }
  
  

#dateContainerMaster {
    width: fit-content;
    margin: 0 auto;
    text-align: center;
  }
  

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: auto;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    white-space: nowrap;
    text-align: center;
}


th {
    background-color: black !important;
    color: white !important;
    font-size: 16px;
    position: sticky;
    top: 0;
    z-index: 2;
}


/* Apply black background and white text to the first row of table data */
#csvTable tr:nth-child(1) td {
    background-color: black;
    color: white;
    font-size: 19px;
    font-weight: bolder;
}

/* Style the first column (excluding the first row) */
#csvTable tr:not(:first-child) td:first-child {
  font-size: 19px;
  font-weight: bolder;
}

.drop-zone {
    border: 2px dashed #0056b3;
    padding: 3px;
    text-align: center;
    margin-top: 20px;
    cursor: pointer;
    border-radius: 10px;
    max-width: 30%;
    color: #0056b3;
    transition: background-color 0.3s ease;
    margin-left: auto;
    margin-right: auto;
      }
  .drop-zone.dragover {
    background-color: #f0f8ff;
  }
  .drop-zone a {
    color: #0056b3;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
  }
  

.even-row {
    background-color: #f2f2f2; /* Light gray */
}

.odd-row {
    background-color: #ffffff; /* White */
}

.thick-border-top {
    border-top: 3px solid black !important;
}

.bold-text {
    font-weight: bold;
}


