body {
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
}

h1, h3, label {
  color: #333;
}

.container {
  max-width: 1200px;
}

#matrixOutput td {
  padding: 4px;
  font-size: 0.85rem;
}

#url-display {
  display: none;
  background-color: #f5f5f5;
  color: #333;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  white-space: pre-wrap;
  margin: 5px auto;
  width: fit-content;
  max-width: 100%;
  text-align: left;
  overflow-x: auto;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

table.table td {
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-word;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-check {
  margin-bottom: 0.5rem;
}

input.form-control, select.custom-select {
  width: 100%;
}

.btn {
  margin-top: 1rem;
}

/* Tables in output sections */
#output table,
#outputNew table {
  width: 100%;
  max-width: 1200px;
  border: 1px solid black;
  border-radius: 5px;
  border-collapse: collapse;
}

#output thead th,
#outputNew thead th {
  background-color: #556B2F;
  color: white;
  text-align: center;
  border: 1px solid black;
}

#output td,
#output th,
#outputNew td,
#outputNew th {
  text-align: center;
  padding: 8px;
  border: 1px solid black;
}

input:focus::placeholder {
  color: transparent;
}

.rounded {
  border-radius: .25rem !important;
}

@media (max-width: 768px) {
  .row > div {
    margin-bottom: 2rem;
  }
}

#matrixOutput {
  max-height: 20em; /* ~2em per row × 10 rows */
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #ccc;
  margin-bottom: 1.5rem;
}

#matrixOutput table {
  border-collapse: collapse;
  font-size: 0.8rem;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

#matrixOutput th,
#matrixOutput td {
  border: 1px solid #ccc;
  text-align: center;
  padding: 4px 6px;
  white-space: nowrap;
}

#matrixOutput thead th {
  background-color: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: bold;
}

#matrixOutput tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#matrixOutput tbody td:first-child {
  font-weight: bold;
  background-color: #fff;
  position: sticky;
  left: 0;
  z-index: 1;
}

#matrixOutput thead th:first-child {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 4; /* ensure it's above the others */
  background-color: #f8f9fa;
}

/* Matrix RINEX color styles */
.rinex-two {
  background-color: #17becf; /* Blue */
  color: white;
  font-weight: bold;
}

.rinex-three {
  background-color: #ff7f0e; /* Orange */
  color: white;
  font-weight: bold;
}

.rinex-both {
  background-color: #9467bd; /* Purple */
  color: white;
  font-weight: bold;
}
