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-full {
    width: 100%;
    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: left;
}

.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;
}

#plot {
    width: 100%;
    max-width: 800px;
    height: auto;
    aspect-ratio: 1 / 1;  /* force square container */
    margin: auto;
}
#nc-pdb-select-list {
  display: none;
}
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(auto-fit, 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 {
    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;
}

.info-boxes {
display: flex;
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-title {
font-size: 0.8rem;
color: #666;
}

.info-value {
font-size: 1.2rem;
font-weight: bold;
margin-top: 0.2rem;
}
.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;
}

/* 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;
}

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

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

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

.tabs-vertical-wrapper {
  display: flex;
  flex-direction: row; /* Force horizontal alignment */
  align-items: flex-start;
  width: 100%;
  margin-top: 20px;
}

.tab-buttons-vertical {
  display: flex;
  flex-direction: column; /* Stack vertically */
  min-width: 150px;
}

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

.tab-buttons-vertical button.active {
  background: white;
  position: relative;
  left: 2px; /* Pull right to overlap the content border */
  z-index: 2;
  border-right: 2px solid white; /* Hide the border when active */
}


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

.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: #f00;
    }

tfoot input {
        width: 100%;
        padding: 1px;
        box-sizing: border-box;
        color: #f00;
    }

/* 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 */
}

.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: #900;
    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-iframe {
  width: 100%;
  height: 100%;  /* make the viewer fill its wrapper */
  border: none;
}

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

#morpheusTable {
  margin-left: 20%;
  margin-right: auto;
  border-collapse: collapse;
  width: 70%;
  table-layout: evenly; /* evenly distributes columns */
}

#morpheusTable td {
  padding: 2px;
  width: 50%;
  vertical-align: top;
}

#morpheusTable td {
  padding: 0px;
}


#morpheusTable a {
  color: #44e;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: normal;
}

#morpheusTable a:hover {
  text-decoration: underline;
}

#morpheusTable .indent {
  padding-left: 3em;
}


