/* ============================================================
   AVCO 3D Models page
   Reuses avco-dl filter / show-bar / pagination / spinner styles
   (enqueued alongside avco-downloads.css). This file styles the
   6-column catalog table + the page header.
   ============================================================ */

body.avco-page .avco-3dm-hidden { display: none !important; }

/* Let three filter selects share the row evenly (the banner takes the rest). */
body.avco-page .avco-3dm-section .avco-dl-filter-field { flex: 1 1 0; min-width: 9rem; }

/* Keep the filters usable on mobile — the shared .avco-dl-filters is hidden
   at <=767px for the Downloads mobile-filter, which this page does not use. */
@media (max-width: 767px) {
  body.avco-page .avco-3dm-section .avco-dl-filters { display: flex; }
  body.avco-page .avco-3dm-section .avco-dl-filter-row { flex-direction: column; gap: 0.75rem; }
}

/* ── Table ── */
body.avco-page .avco-3dm-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.avco-page .avco-3dm-table {
  width: 100%;
  min-width: 1000px;
  border: 1px solid var(--avco-primary-100);
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--avco-white);
  font-family: var(--avco-font-body);
  margin: 0;
}

/* 9 columns (sheet cols L–T) — the Final Filename cell is itself the download
   link. Let columns auto-size; keep the filename on one line. The wrapper
   scrolls horizontally on narrow screens. */
body.avco-page .avco-3dm-table td.avco-3dm-file { white-space: nowrap; }

body.avco-page .avco-3dm-table thead th {
  background: var(--avco-primary-200);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--avco-primary-950);
  text-align: left;
  line-height: 1.5;
  white-space: nowrap;
  border: none;
  border-bottom: 1px solid var(--avco-primary-100);
  user-select: none;
}

body.avco-page .avco-3dm-table tbody tr {
  border-top: 1px solid var(--avco-primary-100);
  background: var(--avco-white);
  transition: background-color 0.15s ease;
}
body.avco-page .avco-3dm-table tbody tr:nth-child(even) { background: var(--avco-primary-50); }
body.avco-page .avco-3dm-table tbody tr:hover,
body.avco-page .avco-3dm-table tbody tr:nth-child(even):hover { background: var(--avco-primary-100); }

body.avco-page .avco-3dm-table tbody td {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--avco-gray-600);
  line-height: 1.5;
  vertical-align: middle;
  border: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
body.avco-page .avco-3dm-table td.avco-3dm-file {
  font-family: var(--avco-font-mono, ui-monospace, "SFMono-Regular", Menlo, monospace);
  color: var(--avco-primary-950);
}

body.avco-page .avco-3dm-table tbody tr.avco-3dm-row-empty td {
  text-align: center;
  padding: 2rem;
  color: var(--avco-gray-600);
}

/* ── Filename download link (the Final Filename cell IS the download action) ── */
body.avco-page .avco-3dm-file-link {
  color: var(--avco-primary-800);
  text-decoration: none;
}
body.avco-page .avco-3dm-file-link:hover { text-decoration: underline; }
