/**
 * Downloads Components Styles
 * Shared styles for all download pages
 */

/* Common breadcrumb styles */
.dl-breadcrumb {
  margin-bottom: 16px;
  font-size: 14px;
}

.dl-breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.dl-breadcrumb a:hover {
  color: white;
}

.dl-breadcrumb-sep {
  color: rgba(255,255,255,0.4);
  margin: 0 8px;
}

.dl-breadcrumb span:last-child {
  color: white;
}

/* ===================
   Downloads Hub Page
   =================== */
.downloads-page {
  background: #f8fafc;
  min-height: 80vh;
}

.downloads-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  padding: 100px 40px 80px;
  text-align: center;
}

.downloads-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.downloads-hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: white;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.downloads-hero-sub {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.downloads-section {
  padding: 60px 40px 80px;
}

.downloads-content {
  max-width: 800px;
  margin: 0 auto;
}

.downloads-category {
  margin-bottom: 40px;
}

.downloads-category:last-child {
  margin-bottom: 0;
}

.downloads-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.downloads-category-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 8px;
}

.downloads-category-icon svg {
  width: 20px;
  height: 20px;
  color: #475569;
}

.downloads-category-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.downloads-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.downloads-link {
  display: block;
  padding: 20px 24px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.downloads-link:hover {
  border-color: #1e40af;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.downloads-link-text {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 4px;
}

.downloads-link-desc {
  display: block;
  font-size: 14px;
  color: #64748b;
}

@media (max-width: 600px) {
  .downloads-hero {
    padding: 60px 24px 50px;
  }

  .downloads-hero h1 {
    font-size: 32px;
  }

  .downloads-section {
    padding: 40px 24px 60px;
  }

  .downloads-link {
    padding: 16px 20px;
  }
}

/* Downloads Hub - CMS Card Layout */
.downloads-loading,
.downloads-empty {
  text-align: center;
  color: #64748b;
  padding: 40px;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.downloads-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.downloads-card:hover {
  border-color: #1e40af;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.downloads-card-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 14px;
}

.downloads-card-icon svg {
  width: 28px;
  height: 28px;
  color: #1e40af;
}

.downloads-card-content {
  flex: 1;
  min-width: 0;
}

.downloads-card-title {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.downloads-card-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.downloads-card-count {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.downloads-card-arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.2s;
}

.downloads-card:hover .downloads-card-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.downloads-card-arrow svg {
  width: 20px;
  height: 20px;
  color: #1e40af;
}

@media (max-width: 600px) {
  .downloads-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .downloads-card {
    padding: 20px;
  }

  .downloads-card-icon {
    width: 48px;
    height: 48px;
  }

  .downloads-card-icon svg {
    width: 24px;
    height: 24px;
  }

  .downloads-card-title {
    font-size: 16px;
  }
}

/* ===================
   Downloads Software
   =================== */
.dl-software-page {
  background: #f8fafc;
  min-height: 80vh;
}

.dl-software-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  padding: 80px 40px 60px;
}

.dl-software-hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.dl-software-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  margin: 0;
}

.dl-software-section {
  padding: 50px 40px 80px;
}

.dl-software-content {
  max-width: 900px;
  margin: 0 auto;
}

.dl-software-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 24px;
}

.dl-software-legacy {
  background: #fafafa;
}

.dl-software-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dl-software-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e40af;
  margin: 0;
}

.dl-software-version {
  font-size: 14px;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 4px;
}

.dl-software-body {
  display: flex;
  gap: 24px;
}

.dl-software-img {
  width: 160px;
  height: auto;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  align-self: flex-start;
}

.dl-software-info {
  flex: 1;
}

.dl-software-info p {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 12px;
}

.dl-software-info p:last-of-type {
  margin-bottom: 16px;
}

.dl-software-note {
  font-size: 14px !important;
  color: #64748b !important;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 6px;
  margin-top: 16px !important;
}

.dl-software-note a {
  color: #1e40af;
  text-decoration: none;
}

.dl-software-note a:hover {
  text-decoration: underline;
}

.dl-software-download {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.dl-software-download-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.dl-software-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #1e40af;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.dl-software-download-btn:hover {
  background: #1e3a8a;
}

.dl-software-download-btn svg {
  width: 16px;
  height: 16px;
}

.dl-software-download-request {
  font-size: 14px;
  color: #64748b;
}

.dl-software-download-request a {
  color: #1e40af;
  text-decoration: none;
}

.dl-software-download-request a:hover {
  text-decoration: underline;
}

.dl-software-meta {
  font-size: 13px;
  color: #94a3b8;
}

.dl-software-support {
  margin-top: 32px;
  padding: 20px 24px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}

.dl-software-support p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.dl-software-support a {
  color: #1e40af;
  text-decoration: none;
}

.dl-software-support a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .dl-software-hero {
    padding: 60px 24px 40px;
  }

  .dl-software-hero h1 {
    font-size: 28px;
  }

  .dl-software-section {
    padding: 30px 24px 60px;
  }

  .dl-software-item {
    padding: 20px 24px;
  }

  .dl-software-body {
    flex-direction: column;
  }

  .dl-software-img {
    width: 100%;
    max-width: 200px;
  }
}

/* ===================
   Downloads Apps
   =================== */
.dl-apps-page {
  background: #f8fafc;
  min-height: 80vh;
}

.dl-apps-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  padding: 80px 40px 60px;
}

.dl-apps-hero-content {
  max-width: 1100px;
  margin: 0 auto;
}

.dl-apps-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  margin: 0 0 8px;
}

.dl-apps-hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.dl-apps-section {
  padding: 50px 40px 80px;
}

.dl-apps-content {
  max-width: 1100px;
  margin: 0 auto;
}

.dl-apps-intro {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 32px;
}

.dl-apps-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.dl-apps-main {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 32px;
}

.dl-apps-main h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.dl-apps-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 20px;
}

.dl-apps-list {
  border-top: 1px solid #e2e8f0;
}

.dl-app-item {
  border-bottom: 1px solid #e2e8f0;
}

.dl-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  cursor: pointer;
  transition: background 0.15s;
}

.dl-app-header:hover {
  background: #f8fafc;
  margin: 0 -12px;
  padding: 12px;
  border-radius: 6px;
}

.dl-app-name {
  color: #1e40af;
  font-size: 15px;
  font-weight: 500;
}

.dl-app-meta {
  color: #94a3b8;
  font-size: 13px;
}

.dl-app-item.expanded .dl-app-header {
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0;
}

.dl-app-code {
  display: none;
}

.dl-app-item.expanded .dl-app-code {
  display: block;
  padding: 16px 0;
}

.dl-code-loading, .dl-code-error {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.dl-code-error {
  color: #dc2626;
}

.dl-code-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.dl-code-download {
  font-size: 13px;
  color: #1e40af;
  text-decoration: none;
}

.dl-code-download:hover {
  text-decoration: underline;
}

.dl-code-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin: 0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.dl-code-line {
  display: flex;
  white-space: pre;
}

.dl-line-num {
  color: #94a3b8;
  user-select: none;
  padding-right: 16px;
  text-align: right;
  min-width: 40px;
  border-right: 1px solid #e2e8f0;
  margin-right: 16px;
}

.dl-line-content {
  color: #334155;
}

/* Syntax highlighting */
.hl-comment {
  color: #6b7280;
  font-style: italic;
}

.hl-keyword {
  color: #7c3aed;
  font-weight: 600;
}

.hl-string {
  color: #059669;
}

.hl-number {
  color: #0891b2;
}

.hl-register {
  color: #dc2626;
}

.hl-pin {
  color: #ea580c;
}

.hl-label {
  color: #2563eb;
  font-weight: 700;
}

.dl-apps-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dl-apps-box {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
}

.dl-apps-box h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
}

.dl-download-link {
  display: block;
  padding: 12px 16px;
  background: #1e40af;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.dl-download-link:hover {
  background: #1e3a8a;
}

.dl-file-info {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

.dl-doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dl-doc-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.dl-doc-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dl-doc-list a {
  color: #1e40af;
  text-decoration: none;
  font-size: 14px;
}

.dl-doc-list a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .dl-apps-layout {
    grid-template-columns: 1fr;
  }

  .dl-apps-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dl-apps-box {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 600px) {
  .dl-apps-hero {
    padding: 60px 24px 40px;
  }

  .dl-apps-hero h1 {
    font-size: 28px;
  }

  .dl-apps-section {
    padding: 30px 24px 60px;
  }

  .dl-apps-main {
    padding: 20px 24px;
  }

  .dl-app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .dl-apps-sidebar {
    flex-direction: column;
  }

  .dl-code-block {
    font-size: 12px;
  }
}

/* ===================
   Downloads CAD
   =================== */
.dl-cad-page {
  background: #f8fafc;
  min-height: 80vh;
}

.dl-cad-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  padding: 80px 40px 60px;
}

.dl-cad-hero-content {
  max-width: 1000px;
  margin: 0 auto;
}

.dl-cad-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  margin: 0 0 8px;
}

.dl-cad-hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.dl-cad-section {
  padding: 50px 40px 80px;
}

.dl-cad-content {
  max-width: 1000px;
  margin: 0 auto;
}

.dl-cad-category {
  margin-bottom: 48px;
}

.dl-cad-category:last-child {
  margin-bottom: 0;
}

.dl-cad-category h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.dl-cad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.dl-cad-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dl-cad-item:hover {
  border-color: #1e40af;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dl-cad-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.dl-cad-icon-dxf {
  background: #eff6ff;
}

.dl-cad-icon-dxf svg {
  width: 20px;
  height: 20px;
  color: #1e40af;
}

.dl-cad-icon-pdf {
  background: #fef2f2;
}

.dl-cad-icon-pdf svg {
  width: 20px;
  height: 20px;
  color: #dc2626;
}

.dl-cad-info {
  flex: 1;
  min-width: 0;
}

.dl-cad-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.4;
}

.dl-cad-meta {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

@media (max-width: 800px) {
  .dl-cad-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .dl-cad-hero {
    padding: 60px 24px 40px;
  }

  .dl-cad-hero h1 {
    font-size: 28px;
  }

  .dl-cad-section {
    padding: 30px 24px 60px;
  }

  .dl-cad-item {
    padding: 14px 16px;
  }
}

/* ===================
   Downloads TT Configurator
   =================== */
.dl-tt-page {
  background: #f8fafc;
  min-height: 80vh;
}

.dl-tt-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  padding: 80px 40px 60px;
}

.dl-tt-hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.dl-tt-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  margin: 0;
}

.dl-tt-section {
  padding: 50px 40px 80px;
}

.dl-tt-content {
  max-width: 900px;
  margin: 0 auto;
}

.dl-tt-main {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 32px;
}

.dl-tt-body {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.dl-tt-img {
  width: 100px;
  height: auto;
  flex-shrink: 0;
}

.dl-tt-info {
  flex: 1;
}

.dl-tt-info p {
  font-size: 16px;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 24px;
}

.dl-tt-info strong {
  color: #0f172a;
}

.dl-tt-download {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dl-tt-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #1e40af;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s;
}

.dl-tt-download-btn:hover {
  background: #1e3a8a;
}

.dl-tt-download-btn svg {
  width: 18px;
  height: 18px;
}

.dl-tt-meta {
  font-size: 14px;
  color: #94a3b8;
}

@media (max-width: 600px) {
  .dl-tt-hero {
    padding: 60px 24px 40px;
  }

  .dl-tt-hero h1 {
    font-size: 28px;
  }

  .dl-tt-section {
    padding: 30px 24px 60px;
  }

  .dl-tt-main {
    padding: 24px;
  }

  .dl-tt-body {
    flex-direction: column;
    gap: 20px;
  }

  .dl-tt-img {
    width: 80px;
  }
}
