/* =============================================================================
   DOWNLOAD component — default theme
   ============================================================================= */

/* Own hard max-width + centering, independent of .content-wrap — all 4
   showcase tenants run site-wide screen_width:"full", which zeroes out
   .content-wrap's max-width (see ffs-contact's .contact-columns for the
   same pattern). Without margin:auto here the page hugs the left edge. */
.page-download {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.dl-empty {
  display: block;
  padding: 32px 0;
  color: #777;
  font-style: italic;
}

.dl-release-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 28px 0 8px;
}

.dl-release-version {
  font-size: 1.1em;
  font-weight: 600;
}

.dl-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.dl-badge-latest {
  background: #e6f0ff;
  color: #1b52a8;
}

.dl-badge-stable {
  background: #e6f7ea;
  color: #1c7a35;
}

/* Group "tabs" — plain #anchor links styled as a horizontal tab bar, not a
   Wt::WTabWidget: every group's section always renders in full further
   down (see .dl-group), so nothing depends on JS or a click to become
   reachable — a no-JS client or crawler sees every group's downloads
   regardless. The nav row just jumps the viewport to one. */
.dl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 16px;
  border-bottom: 2px solid #e2e4e8;
}

.dl-tab {
  display: block;
  padding: 8px 16px;
  color: #555;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.dl-tab:hover {
  color: #1b52a8;
  border-bottom-color: #b9cbe6;
}

.dl-group {
  scroll-margin-top: 16px;
}

.dl-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 4px 0 14px;
  padding: 10px 14px;
  background: #f6f7f9;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
}

.dl-picker-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dl-picker-label {
  font-size: 0.85em;
  color: #555;
}

.dl-list {
  width: 100%;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dl-row {
  display: grid;
  grid-template-columns: 2.2fr 0.8fr 1.6fr 0.8fr;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid #eceef1;
}

.dl-row:first-of-type {
  border-top: none;
}

.dl-row-head {
  background: #f6f7f9;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
}

.dl-cell-file {
  min-width: 0;
  overflow-wrap: break-word;
}

.dl-install {
  display: block;
  font-family: monospace;
  font-size: 0.85em;
  color: #666;
  margin-top: 2px;
}

.dl-cell-sha {
  min-width: 0;
}

.dl-sha {
  display: block;
  font-family: monospace;
  font-size: 0.8em;
  word-break: break-all;
  color: #444;
}

.dl-sha-link {
  font-size: 0.8em;
  color: #1b52a8;
}

.dl-btn {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  background: #1b52a8;
  color: #fff;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
}

.dl-btn:hover {
  background: #143f82;
}

@media (max-width: 640px) {
  .dl-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .dl-row-head {
    display: none;
  }
}
