/* css/data-access.css */

.data-access-page {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Ensure table containers can scroll */
.data-access-page .table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Section Styling - specific to data-access */
.data-access-page section {
  margin-bottom: 4rem;
  overflow-x: visible; /* Let the table-container handle overflow */
}

.data-access-page section:last-child {
  margin-bottom: 1.5rem;
}

.data-access-page section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.data-access-page section h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.data-access-page section p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.data-access-page .section-description {
  margin-bottom: 2rem;
}

/* Table error notation styling */
.error-notation {
  display: inline-grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  margin-left: 0.1em;
  line-height: 1;
  vertical-align: middle;
}

.data-access-page .data-table .error-notation sup,
.data-access-page .data-table sup {
  font-size: 0.65em;
  color: #28a745;
  grid-row: 1;
  align-self: end;
  line-height: 1;
  margin: 0;
}

.data-access-page .data-table .error-notation sub,
.data-access-page .data-table sub {
  font-size: 0.65em;
  color: #dc3545;
  grid-row: 2;
  align-self: start;
  line-height: 1;
  margin: 0;
}

/* Specifications Table */
.spec-table {
  margin-bottom: 2.5rem;
}

.spec-table .data-table {
  width: auto;
  min-width: auto;
  max-width: 100%;
}

.spec-table .data-table th,
.spec-table .data-table td {
  white-space: normal;
}

/* Cluster Table - more specific selectors to override universal styles */
.cluster-table {
  margin-top: 2rem;
}

.cluster-table .data-table {
  font-size: 0.9rem;
  min-width: 1800px;
}

.cluster-table .data-table th,
.cluster-table .data-table td {
  padding: 0.7rem 0.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.cluster-table .data-table th:first-child,
.cluster-table .data-table td:first-child {
  min-width: 120px;
  max-width: 120px;
  position: sticky;
  left: 0;
  background-color: inherit;
  z-index: 1;
}

.cluster-table .data-table th:first-child {
  background-color: var(--primary-color, #0a2342);
}

/* Download Section */
.download-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.download-item {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.download-item h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #333;
  font-size: 1.25rem;
}

.download-item p {
  margin-bottom: 1.25rem;
  color: #666;
  line-height: 1.5;
  font-size: 1.1rem;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color, #4dabf7);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.download-button:hover {
  background-color: var(--accent-color-hover, #1e88e5);
  color: white;
  text-decoration: none;
}

.vizier-button {
  background-color: #2c5530;
}

.vizier-button:hover {
  background-color: #1e3a22;
}

.github-button {
  background-color: #333;
}

.github-button:hover {
  background-color: #24292e;
}

.vizier-logo {
  height: 20px;
  width: auto;
}

.arxiv-logo {
   height: 1.3em;
   width: auto;
   vertical-align: middle;
   margin-left: 0.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .download-links {
      grid-template-columns: 1fr;
      gap: 1.5rem;
  }
  
  .cluster-table .data-table {
      font-size: 0.8rem;
  }
  
  .cluster-table .data-table th,
  .cluster-table .data-table td {
      padding: 0.5rem 0.4rem;
      font-size: 0.8rem;
  }
  
  .data-access-page section h2 {
      flex-direction: column;
      align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .cluster-table .data-table {
      font-size: 0.75rem;
  }
  
  .cluster-table .data-table th,
  .cluster-table .data-table td {
      padding: 0.4rem 0.3rem;
      font-size: 0.75rem;
  }
}
