/* MSA Viewer Styles */
.msa-viewer-container {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.msa-controls {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem;
}

.msa-controls-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.msa-control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.msa-control-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.msa-control-group input[type="number"] {
  width: 6rem;
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
}

.msa-control-group input[type="number"]:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.msa-control-group select {
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
}

.msa-control-group select:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.msa-nav-buttons {
  display: flex;
  gap: 0.5rem;
}

.msa-nav-button {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  background-color: white;
  cursor: pointer;
}

.msa-nav-button:hover {
  background-color: #f8fafc;
}

.msa-nav-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.msa-nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.msa-export-button {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background-color: #3b82f6;
  cursor: pointer;
}

.msa-export-button:hover {
  background-color: #2563eb;
}

.msa-export-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.msa-row {
  display: flex !important;
  border-bottom: 1px solid #e2e8f0;
  min-height: 28px;
  align-items: stretch;
  width: max-content;
  min-width: 100%;
}

.msa-row:hover {
  background-color: #f8fafc;
}

.msa-row:last-child {
  border-bottom: 0;
}

.msa-header {
  width: 12rem; /* 48 * 0.25rem = 12rem */
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: #334155;
  border-right: 1px solid #cbd5e1;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: #f8fafc; /* slate-50 */
}

/* When msa-header is in the ruler row (sticky header), use slate-100 background */
.sticky.top-0 .msa-header {
  background-color: #f1f5f9; /* slate-100 */
}

.msa-sequence {
  flex: 1;
  padding: 0.5rem 1rem;
  font-family: 'Courier New', Consolas, Monaco, monospace;
  font-size: 0.75rem;
  white-space: nowrap;
  letter-spacing: 0;
  align-items: center;
  overflow: visible;
  min-width: max-content;
}

/* Nucleotide colors - Original color scheme */
.nucleotide-a,
.nucleotide-t,
.nucleotide-u,
.nucleotide-g,
.nucleotide-c,
.nucleotide-n,
.nucleotide-gap,
.nucleotide-dash,
.nucleotide-unknown {
  display: inline-block;
  width: 0.8rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  line-height: 1.5;
}

.nucleotide-a {
  color: #ff6b6b;
}

.nucleotide-t,
.nucleotide-u {
  color: #4ecdc4;
}

.nucleotide-g {
  color: #45b7d1;
}

.nucleotide-c {
  color: #96ceb4;
}

.nucleotide-n {
  color: #95a5a6;
  font-weight: 400;
}

.nucleotide-gap,
.nucleotide-dash {
  color: #2c3e50;
  font-weight: 400;
}

.nucleotide-unknown {
  color: #64748b;
}

/* Ruler styling */
.position-marker,
.tick-mark,
.tick-dot {
  display: inline-block;
  width: 0.8rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.5;
}

.position-marker {
  color: #334155;
  font-weight: 600;
}

.tick-mark {
  color: #64748b;
}

.tick-dot {
  color: #cbd5e1;
}

/* Info panel */
.msa-info {
  background-color: #eff6ff;
  border-top: 1px solid #bfdbfe;
  padding: 1rem;
  font-size: 0.875rem;
  color: #1e40af;
}

.msa-info-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .msa-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.msa-info-item {
  display: flex;
  flex-direction: column;
}

.msa-info-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.msa-info-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e3a8a;
}
