body {
    font-family: Arial, sans-serif;
    margin: 20px 20px;
    padding: 20px 20px;
    background-color: #f8f9fa;
    color:#333;
}
main {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-top: 20px;
}
a {
text-decoration: none;
color: #6a6767;
font-weight: bold;
}
h1 {
    text-align: center;
    margin-top: 20px;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    align-items: center;
    width: 85%;
}
.row-container {
display: flex;
flex-direction: row;  /* horizontal layout */
gap: 20px;
margin-top: 20px;
margin-bottom: 20px;
margin-left: auto;
margin-right: auto;
justify-content: center; /* optional, centers horizontally */
align-items: center; /* optional, centers vertically */
width: 85%;
}


.box {
    flex: 1 1 auto;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    text-align: justify;
}
.box h2 {
    margin-top: 0;
    font-size: 1.2em;
    color: #444;
}

/* change by Alex to add red highlighting to info headers */
.box em {
    color: #e00;
    font-style: normal;
    flex-wrap: wrap;
}

#sequence-plot-box {
    width: 100%;
    height: 500px;
    margin: auto;
}

#sequence-plot {
    width: 100%;
    height: 90%;
    margin: 0;
}

#plot {
    width: 0%;    
    max-width: 0px;
    height: auto;
    aspect-ratio: 1 / 1;  /* was width=100%, max-width=800px before hiding in index.html, force square container */
    margin: auto;
}
#nc-pdb-select-list {
  display: none;
  font-size: 1rem;
  color: #666;
}

input[type="checkbox"] {
    margin-right: 5px;
    accent-color: #cecece;
}
.setting-group {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    max-width: 600px; /* Optional: limit width */
}
.checkbox-grid {
display: grid;
grid-template-columns: repeat(2, minmax(80px, 1fr));
gap: 3px;
}
.checkbox-grid label {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.9rem;
}
nav.navigation {
    text-align: right;
    margin-left: auto;
    margin-bottom: 10px;
    margin-top: -10px;
    margin-right: 50px;
}
nav.navigation a {
text-decoration: none;
color: #6a6767;
font-weight: bold;
margin-right: 20px;
}
nav.navigation a:last-child {
margin-right: 0; /* Optional: remove margin on last link */
}

/* Standard-Slider
.slider {
    width: 80%;
    accent-color: #900;
} */

/* Adapted sliders for us to fit the NtoC custom style */
.slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #d3d3d3;
    border-radius: 2px;
    outline: none;
    position: relative;
    top: 9px;
}

/* ncAA slider with red track and white border */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #900;
    cursor: pointer;
    box-shadow: 0 0 3px #666;
    margin-top: -6.5px;    /* center the slider thumb on the track */
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #900;
    cursor: pointer;
    box-shadow: 0 0 3px #666;
}
.slider::-webkit-slider-runnable-track {
    height: 5px;
    background: #d3d3d3;
    border-radius: 2px;
}

.slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 5px #900;
}


#slider-value {
    display: inline-block;
    width: 12ch; /* 3 characters wide, enough for values up to 999 */
    text-align: center; /* optional, aligns numbers nicely */
  }

#sliderN-value {
    display: inline-block;
    width: 4ch; /* 3 characters wide, enough for values up to 999 */
    text-align: center; /* optional, aligns numbers nicely */
  }

#sliderC-value {
    accent-color: #009;
    display: inline-block;
    width: 4ch; /* 3 characters wide, enough for values up to 999 */
    text-align: center; /* optional, aligns numbers nicely */
  }

.spinner-parent {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    style.display = 'flex';
}


.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #555;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

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

.slider-wrapper {
     display: flex;
     vertical-align: center;
     gap: 0.5em;
     margin-top: 0.4em;
     width: 100%;
     position: relative;
}

.inner-slider-wrapper {
    position: relative;
    flex-grow: 1;
    pointer-events: all;
}


#range-slider-track {
  position: relative;
  top: 9px;
  left: 0;
  right: 0;
  height: 5px;
  background: #d3d3d3;
  border-radius: 2px;
}

#range-slider-fill {
  position: relative;
  height: 100%;
  background-color: #009;
  border-radius: 2px;
  left: 0%;
  width: 0%;
  z-index: 2;
}

#ncaa-slider-track {
  position: relative;
  top: 9px;
  left: 0;
  right: 0;
  height: 5px;
  background: #d3d3d3;
  border-radius: 2px;
}

#ncaa-slider-fill {
  position: relative;
  height: 100%;
  background-color: #900;
  border-radius: 2px;
  left: 0%;
  width: 0%;
  z-index: 3;
}


#sliderNtoC input[type="range"] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  height: 5px;
  top: 9px;
  margin: 0;
  padding: 0;
}

#sliderNtoC input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #009;
  cursor: pointer;
  box-shadow: 0 0 3px #666;
  position: relative;
  z-index: 3;
}


/* Firefox */
#sliderNtoC input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #009;
  cursor: pointer;
  box-shadow: 0 0 3px #666;
  position: relative;
  z-index: 3;
}


#sliderNtoC input[type="range"] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  height: 5px;
  top: 9px;
  margin: 0;
  padding: 0;
}


#sliderNCAA input[type="range"] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  height: 5px;
  top: 9px;
  margin: 0;
  padding: 0;
}

#sliderNCAA input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #900;
  cursor: pointer;
  box-shadow: 0 0 3px #666;
  position: relative;
  z-index: 3;
}


/* Firefox */
#sliderNCAA input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #900;
  cursor: pointer;
  box-shadow: 0 0 3px #666;
  position: relative;
  z-index: 3;
}


#sliderNCAA input[type="range"] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  height: 5px;
  top: 9px;
  margin: 0;
  padding: 0;
}

.setting-group label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: 500;
}

#feature-request-form {
  max-width: 600px;   /* wider form */
  margin: 20px auto;  /* center on page */
  font-size: 1.2rem;  /* larger text */
}

/* Make textarea match the box style */
#feature-request-form textarea {
width: 100%;
min-height: 120px;
padding: 12px;
line-height: 1.4;
border: 1px solid #ccc;
border-radius: 6px;
box-sizing: border-box;
resize: vertical;
}

#feature-request-form button {
margin-top: 12px;
padding: 12px 20px;
border: none;
border-radius: 6px;
background-color: #59a89c; /* green from our color scheme */
color: white;
cursor: pointer;
}

#feature-request-form button:hover {
background-color: #45a049;
}

.wrap {
    flex-wrap: wrap;
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;"
}

.info-boxes {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 1rem;
}

.info-box {
flex: 1;
background-color: #f0f0f0;
border-radius: 8px;
padding: 0.5rem 1rem;
text-align: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.info-box-red {
flex: 1;
background-color: #f0e0e0;
border-radius: 8px;
padding: 0.5rem 1rem;
text-align: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.info-box-black {
flex: 8;
border-radius: 8px;
padding: 0.5rem 1rem;
text-align: center;
}

.info-title {
min-height: 2.5rem;
font-size: 0.8rem;
color: #666;
}

.info-title-black {
font-size: 0.8rem;
color: #000;
display: flex;
}

.info-value {
font-size: 2rem;
font-weight: bold;
display: flex;
flex-direction: column;
margin-top: 0.5rem;
align-self: end;
}
.sequences {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-top: 1rem;
}


.sequence-box {
background-color: #f9f9f9;
border: 1px solid #ddd;
border-radius: 6px;
padding: 0.5rem;
max-height: 150px;        /* limit height */
width: 100%;
overflow-y: auto;          /* scroll vertically */
font-family: monospace;
font-size: 0.9rem;
box-sizing: border-box;
white-space: pre-wrap;     /* wrap long lines instead of stretching box */
word-break: break-word;    /* break really long sequences */
}

.sequence-box pre {
margin: 0;
white-space: pre-wrap;     /* wrap inside pre too */
word-break: break-word;
}

/* Tab container */
.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid #ccc;
  margin-bottom: 1em;
}

/* Each tab */
/* Tab container */
.tab-buttons {
  display: flex;
  border-bottom: 2px solid #ccc; /* baseline for inactive tabs */
  margin-bottom: -2px; /* pulls content border up to meet the tab */
}

/* Each tab */
.tab-buttons button {
  background: #f5f5f5;
  border: 2px solid #ccc;
  border-bottom: none; /* removed so it blends with card */
  border-radius: 8px 8px 0 0;
  padding: 0.5em 1.5em;
  cursor: pointer;
  margin-right: 0.3em;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background 0.2s ease;
  z-index: 3;
}

/* Active tab */
.tab-buttons button.active {
  background: white;
  border-bottom: none;
  position: relative;
  top: 2px; /* lift slightly */
  z-index: 3; /* keep on top of the card */
}

/* Tab content styled as card */
.tab-content {
  flex-wrap: wrap;
  display: none;
  border: 2px solid #ccc;
  border-radius: 0 0 8px 8px;
  padding: 1em;
  background: white;
  z-index: 1;
  position: relative;
}

.tab-content.active {
  display: block;
}


/* Grid Layout for Molecules */

.tab-buttons-horizontal {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: -1.25em;
  flex-direction: row; /* Stack vertically */
  min-width: 150px;
}

.tab-buttons-horizontal button {
  background: #f5f5f5;  /* #009 */
  border: 2px solid #ccc;
  border-bottom: none; /* Remove bottom border to blend with card */
  border-radius: 8px 8px 0 0; /* Rounded corners on the left */
  padding: 0.5em 1em;
  margin-right: 0.5em;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: bold;
  text-align: left;
  transition: background 0.2s ease;
  z-index: 2;
}

.tab-buttons-horizontal button.active {
  background: white;
  border-bottom: none;
  position: relative;
  bottom: -2px;
  z-index: 2;
}


.molecule-grid {
  display: grid;
  grid-template-rows: repeat(4, minmax(100px, 1fr)); /* 6 rows */
  grid-template-columns: repeat(6, minmax(100px, 1fr)); /* 6 rows */
  overflow-x: scroll;
  gap: 20px;
  padding: 15px;
  align-content: start;
  width: 100%;
  min-width: 100%;
  border: 2px solid #ccc;
  border-radius: 0px 0px 8px 8px;
  background: white;
  z-index: 1;
  box-sizing: border-box;
}

.molecule-grid p {
    color: #999;
    width: 100%;
    padding: 20px;
}


.table-container {
  max-width: 100%;
  overflow-x: scroll;
}

#csvTable {
  table-layout: fixed;  /* 🔑 force respect of max-widths */
  width: 100%;
}

#csvTable th,
#csvTable td {
  max-width: 200px;       /* limit column width */
  white-space: nowrap;    /* keep content in one line */
  overflow: hidden;       /* hide overflowed text */
  text-overflow: ellipsis; /* add "…" when too long */
}

thead input {
       /* font-family: Arial, sans-serif; */
        font-size: medium;
        font-weight: bold;
        opacity: 100%;
        width: 100%;
        padding: 1px;
        box-sizing: border-box;
        color: #00f;
    }

/* Added by Alex to highlight rows in data table*/
.highlight-row {
    background-color: #900;
    color: #e00;
}

.table-wrapper {
  max-height: 200px;  /* adjust to your preferred height */
  overflow-y: auto;   /* vertical scrollbar if needed */
  /*border: 1px solid #ccc; /* optional: visual boundary */
}

.molstar-tab1-wrapper {
  overflow-y: auto;   /* vertical scrollbar if needed */
  /*border: 1px solid #ccc; /* optional: visual boundary */
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  align-items: center;
  width: 60%;
}

.info-ncaa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;       
  font-family: monospace;   
  max-height: 40px;        
  overflow-y: auto;         
}

.info-ncaa-table td {
  padding: 4px 12px 4px 6px;
  /* border: 1px solid #ddd; /* optional for clarity */
}

.info-ncaa-table-selected {
    background-color: #009;
    color: white;
}

.info-ncaa-table-deselected {
    background-color: #f9f9f9;
    color: #666;
}

/* for pie charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 20px;
}

.chart-box {
    border: 1px solid #ccc;
    padding: 10px;
}

#molstar-wrapper {
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  height: 80vh;   /* makes the viewer fill most of the viewport */
  position: relative;
}

#molstar-wrapper-tab1 {  /* added by Alex v2 */
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  height: 80vh;   /* makes the viewer fill most of the viewport */
  position: relative;
}

#molstar-iframe {
  width: 100%;
  height: 100%;  /* make the viewer fill its wrapper */
  border: none;
}

/* added by Alex for PDF viewing */
.pdf-viewer {
width: 50%;
height: 400px;
border: 1px solid #ccc;
}



