/* Body */
body { 
  background: #eee;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
}

/* Side bar */
#side_nav {
  background: #87B5C9;
  min-width: 250px;
  max-width: 250px;
  transition: all 0.3s;
}
.content {
  min-height: 100vh;
  width: 100%;
}
hr.h-color { background: #eee; }
.sidebar li.active {
  background: #eee;
  border-radius: 8px;
}
.sidebar li.active a,
.sidebar li.active a:hover { color: #000; }
.sidebar li a { color: #fff; }
.sidebar ul li a:hover {
    background-color: white; /* Bootstrap primary blue */
    color: #87B5C9;
    border-radius: 8px;
}
.sidebar ul li a:hover i {
    color: #87B5C9;
}
@media(max-width: 767px) {
  #side_nav {
    margin-left: -250px;
    position: absolute;
    min-height: 100vh;
    z-index: 1;
  }
  #side_nav.active { margin-left: 0; }
}
a {
  color: #3366cc;  /* Softer, more elegant blue */
  text-decoration: none;
}

a:hover {
  color: #254b9e;  /* Slightly darker blue on hover */
  text-decoration: underline;
}

/* Inputs */
input {
  width: 100px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 20px;
  border: 1px solid #aaa;
  border-radius: 10px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 10px; 
  border-bottom-right-radius: 10px; 
  padding: 6px 12px;
  height: 38px;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: center;  
}
#formFormat {
  width: 30%;
  visibility: hidden; /* hide initially to prevent flicker */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  border-radius: 8px;
}
.form-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 2rem;
  max-width: 1000px;
  margin: 20px auto;
  justify-content: center; 
}
.form-group {
  display: flex;
  flex-direction: column;
  align-items: center;   
  text-align: center;  
}
.form-group label {
  margin-bottom: 0.4rem;
  font-weight: 500;
  border-radius: 8px;
}
.drop-zone-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}
.drop-zone-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.drop-zone-item label {
  font-weight: bold;
  margin-bottom: 5px;
}
.drop-zone-item select {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 20px;
  border: 1px solid #aaa;
  border-radius: 10px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 10px; 
  border-bottom-right-radius: 10px; 
  padding: 6px 12px;
  height: 38px;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: center;  
}
#metadata-parser {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.metadata-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;  /* Left-align contents inside */
  gap: 10px;
  align-items: center;
}
.radio-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* Left-align contents inside */
  gap: 6px;
  font-size: 14px;
  font-weight: normal;       
  font-family: inherit;
  width: fit-content; 
}
.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;          
  font-weight: normal;      
  font-family: inherit;
}
label.radio-option {
  font-weight: normal;
}
.radio-group-label {
  font-weight: normal;
  font-family: inherit;
  margin-bottom: 2px;
}
.radio-option:hover {
  background-color: #f0f4f8;
}
.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #53A5C9;
  border-radius: 50%;      /* ensures it's a circle */
  margin-right: 6px;
  position: relative;
  cursor: pointer;
  background-color: white;
  padding: 0;              /* avoid browser-specific quirks */
  box-sizing: border-box;  /* important for equal sizing */
}
.radio-option input[type="radio"]:checked::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  background-color: #53A5C9;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
}

#tree-drop-area,
#csv-drop-area{
  height: 50px;
  width: 80%; /* or set a fixed width */
  border: 2px dashed #aaa;
  border-radius: 8px;
  background-color: #f5f5f5;

  display: flex;
  align-items: center;      /* vertical centering */
  justify-content: center;  /* horizontal centering */
}
#runBtn,
#resetLayoutBtn,
#download-data-btn,
#addMetadataBtn,
#parseMetadataBtn,
#parseTipsBtn{
  padding: 10px 20px;
  background-color: #53A5C9;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-items: center;      /* vertical centering */
  justify-content: center;  /* horizontal centering */
}
#resetLayoutBtn:hover,
#runBtn:hoverm,
#download-data-btn:hover{
  background-color: #87B5C9;
}
.center-button {
  text-align: center;
  margin-top: 20px;
}

#tree-container,
#tree-container-sars-cov-2{
  height: 500px;
  width: 100%; /* or set a fixed width */
  max-width: 1000px;
  border: 2px dashed #aaa;
  border-radius: 8px;
  background-color: #f5f5f5;

  display: flex;
  align-items: center;      /* vertical centering */
  justify-content: center;  /* horizontal centering */
  margin: 0 auto;          /* 👈 center horizontally */

  color: #555;
  font-size: 1rem;
  text-align: center;
  white-space: nowrap;      /* prevent wrap */
  overflow: hidden;
  text-overflow: ellipsis;  /* optional, for safety */
}
#scatter-container {
  height: 500px;
  width: 100%; /* or set a fixed width */
  max-width: 1000px;
  border: 2px dashed #aaa;
  border-radius: 8px;
  background-color: #f5f5f5;

  display: flex;
  align-items: center;      /* vertical centering */
  justify-content: center;  /* horizontal centering */
  margin: 0 auto;          /* 👈 center horizontally */

  color: #555;
  font-size: 1rem;
  text-align: center;
  white-space: nowrap;      /* prevent wrap */
  overflow: hidden;
  text-overflow: ellipsis;  /* optional, for safety */
}
#tree-status-message,
#csv-status-message,
#analysis-status-message {
  margin: 0px;
  color: green;
  font-weight: bold;
}

/* Index page styles */
.header-bar {
    width: 100%;
    margin: 0;
    padding: 100px;
    background-color: #87B5C9;  
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;     
}
.home-like {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.home-logo {
    height: 80px;
    margin-bottom: 20px;
}
h1 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #222;
}
p {
    font-size: 1rem;
    margin-bottom: 24px;
    color: #444;
}
.btn.primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
}
.btn.primary:hover {
    background-color: #0056b3;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Fixed to 3 columns */
    gap: 30px;
    margin: 60px auto;
    max-width: 1200px;
    padding: 0 20px;
}
.feature-box {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: transform 0.2s ease;
    cursor: pointer;
}
.feature-box:hover {
    transform: translateY(-3px);
}
.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 4px;
}
.feature-box h3 {
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: #006699;
}
.feature-box p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
}
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #87B5C9;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.legend-container {
  display: flex;
  flex-wrap: wrap;          /* wrap to next line if too many */
  justify-content: center;  /* center-align items horizontally */
  gap: 12px;                /* spacing between legend items */
  margin-top: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-family: sans-serif;
}

.legend-color-box {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

/* footer */
.custom-footer {
  background-color: #525252;
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 15px;
  max-width: 100%;
  margin: 0 auto;
  font-weight: 1;
}
.custom-footer p {
  color: #ffffff;
  margin: 10px 0;
}
.custom-footer > div {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 10px;
}
.custom-footer div > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
}
.custom-footer a {
  color: inherit;
  text-decoration: none;
}
.custom-footer a:hover {
  color: #ccc;
}
