/* 文件描述：产品下载详情页（cloud-downloads 主题区）样式 */
.dp-page {
  background: #f7f9fc;
}

.dp-wrap {
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 0 var(--space-gutter, 24px);
}

/* Hero 背景图走 industry-hero + topbanner.png；高度对齐 news_hero（约 532px） */
#download-portal-hero.hero-wrap.industry-hero .hero-inner {
  min-height: 532px;
}

.dp-hero .hero-p {
  margin-bottom: 12px;
}

.dp-hero-agree {
  margin: 0;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary, #64748b);
}

.dp-hero-agree a {
  color: var(--color-primary, #00579c);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dp-main {
  padding: 40px 0 80px;
}

/* 分类栏：取消贴顶，避免 sticky 白条压在导航下难看 */
.dp-page .pd-type-bar.dp-type-bar {
  position: static;
  top: auto;
  z-index: auto;
  margin: 0 0 24px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dp-page .pd-type-bar.dp-type-bar.is-stuck {
  border-color: rgba(15, 27, 45, 0.08);
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dp-layout {
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 0 var(--space-gutter, 24px);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* 版本侧栏：卡片化，覆盖旧 pd-sidebar 裸列表样式 */
.dp-sidebar.pd-sidebar {
  position: sticky;
  top: calc(var(--nav-height, 64px) + 16px);
  z-index: 12;
  width: 100%;
  max-width: none;
  flex: none;
  align-self: start;
  max-height: calc(100vh - var(--nav-height, 64px) - 32px);
  margin: 0;
  padding: 18px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  background: #fff;
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-left: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.03);
}

.dp-sidebar .dp-sidebar-title,
.dp-sidebar .pd-sidebar-title {
  margin: 0 0 12px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.dp-sidebar .pd-version-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dp-sidebar .pd-version-item {
  margin: 0;
}

.dp-sidebar .pd-version-btn {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: none;
  border-left: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.dp-sidebar .pd-version-btn:hover {
  color: var(--color-primary, #00579c);
  background: rgba(0, 87, 156, 0.06);
}

.dp-sidebar .pd-version-btn.is-active {
  color: var(--color-primary, #00579c);
  background: rgba(0, 87, 156, 0.1);
  font-weight: 600;
  box-shadow: none;
  position: relative;
}

.dp-sidebar .pd-version-btn.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--color-primary, #00579c);
}

.dp-sidebar .pd-version-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.dp-sidebar .pd-version-item--more .pd-version-btn {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.dp-sidebar .pd-version-item--more .pd-version-btn:hover {
  color: var(--color-primary, #00579c);
}

.dp-product-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: 16px;
}

.dp-product-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b376c, #3398cc);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dp-product-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-title, #0f1b2d);
  line-height: 1.3;
}

/* 标题与 Latest / Released 标签同行 */
.dp-product-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 10px;
}

.dp-product-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dp-tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: var(--radius-pill, 999px);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.dp-tag--ver {
  color: var(--color-primary, #00579c);
  background: rgba(0, 87, 156, 0.1);
}

.dp-tag--date {
  color: #475569;
  background: rgba(15, 27, 45, 0.06);
}

.dp-product-latest {
  display: none;
}

.dp-product-desc {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text, #5b6b7c);
}

.dp-btn-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary, #3398cc);
  text-decoration: none;
}

.dp-btn-note:hover {
  text-decoration: underline;
}

.dp-btn-note-ic {
  display: inline-flex;
  width: 12px;
  height: 12px;
}

.dp-btn-note-ic svg {
  width: 12px;
  height: 12px;
}

.dp-file-card {
  background: #fff;
}

/* 文件卡：标题 / 说明 / 元信息+按钮底栏 */
.dp-file-card .pd-file-card-head {
  margin-bottom: 8px;
}

.dp-file-card .pd-file-card-body {
  margin-bottom: 14px;
}

.dp-file-card .pd-file-card-body p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dp-file-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 27, 45, 0.06);
  text-align: left;
}

.dp-file-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-width: 0;
  flex: 1 1 280px;
}

.dp-file-meta-item {
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}

.dp-file-meta-item--md5 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

/* 文件卡下载：主色胶囊按钮（对齐聚合页 pd-btn-dl） */
.dp-file-card .pd-file-card-action--btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  padding: 0 18px;
  border-radius: var(--radius-pill, 999px);
  background: var(--color-primary, #00579c);
  color: #fff;
  font-family: var(--font-sans, inherit);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dp-file-card .pd-file-card-action--btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.dp-file-card .pd-file-card-action--btn:hover {
  background: var(--color-primary-dim, #004a86);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(0, 87, 156, 0.55);
}

.dp-file-card .pd-file-card-action--btn:focus-visible {
  outline: 2px solid var(--color-primary, #00579c);
  outline-offset: 2px;
}

/* 文件卡 Download loading */
.dp-file-card .pd-file-card-action--btn.is-loading {
  pointer-events: none;
  cursor: wait;
  opacity: 0.9;
  transform: none;
  box-shadow: none;
}

.dp-file-card .pd-file-card-action--btn .pd-file-card-action-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pd-dl-btn-spin 0.7s linear infinite;
}

@keyframes pd-dl-btn-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .dp-file-card .pd-file-card-action--btn .pd-file-card-action-spin {
    animation: none;
    border-color: #fff;
  }
}

@media (max-width: 900px) {
  .dp-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .dp-sidebar.pd-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 14px;
  }

  .dp-sidebar .pd-version-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
  }

  .dp-sidebar .pd-version-list::-webkit-scrollbar {
    display: none;
  }

  .dp-sidebar .pd-version-item {
    flex-shrink: 0;
  }

  .dp-sidebar .pd-version-btn {
    width: auto;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: none;
  }

  .dp-sidebar .pd-version-btn.is-active {
    box-shadow: none;
    background: var(--color-primary, #00579c);
    color: #fff;
  }

  .dp-sidebar .pd-version-item--more .pd-version-btn {
    margin-top: 0;
  }
}
