#downloads,
#downloads * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#downloads {
  width: 100%;
  color: #1f2937;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px;
  padding-top: 30px;
  gap: 24px;
}

#downloads .header-container {
  width: 100%;
  max-width: 1440px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
}

#downloads .title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#downloads .page-title {
  font-weight: 700;
  font-size: 32px;
  line-height: 44px;
  color: #404040;
}

#downloads .page-subtitle {
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #404040;
}

#downloads .search-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 360px;
  height: 40px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  gap: 12px;
}

#downloads .search-input {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  font-size: 14px;
  line-height: 24px;
  color: #1f2937;
}

#downloads .search-input::placeholder {
  color: #747474;
}

#downloads .search-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#downloads-table {
  width: 100%;
}

#downloads .downloads-card {
  width: 100%;
  /* max-width: 1120px; */
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  padding-bottom: 32px;
  gap: 32px;
}

#downloads .table-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #d1d5db;
  font-weight: 700;
  font-size: 18px;
  line-height: 20px;
  color: #374151;
}

#downloads .product-section {
  display: flex;
  flex-direction: column;
  padding: 0px 32px;
  gap: 16px;
}

#downloads .section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#downloads .case-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
}

#downloads .case-label {
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#downloads .purchase-date {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #999999;
}

#downloads .product-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#downloads .type-date-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
}

#downloads .purchase-date {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #999999;
  white-space: nowrap;
}

#downloads .product-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 28px;
  color: #1f2937;
  text-transform: none;
}

#downloads .product-type {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #666666;
}

#downloads .license-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  padding: 6px 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  line-height: 20px;
  position: relative;
  white-space: nowrap;
  max-width: 100%;
}

#downloads .license-label {
  font-weight: 400;
  color: #4b5563;
  white-space: nowrap;
  flex-shrink: 0;
}

#downloads .license-code {
  font-weight: 400;
  color: #1f2937;
  font-family: monospace, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#downloads .copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

#downloads .copy-btn:active {
  transform: scale(0.9);
}

/* Temporary Copied Feedback Text */
#downloads .copy-feedback {
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  display: none;
  animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#downloads .files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

#downloads .file-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

#downloads .file-row:hover {
  background-color: #f9fafb;
}

#downloads .file-row.is-hidden {
  display: none;
}

#downloads .file-details {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

#downloads .file-name {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #1f2937;
  word-break: break-word;
}

#downloads .file-size {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #4b5563;
  opacity: 0.6;
  flex-shrink: 0;
}

#downloads .download-icon svg path {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  stroke: #4b5563;
}

#downloads .file-row.active-row,
#downloads .file-row:hover {
  background: #faebe8;
  border-color: #c9321a;
}

#downloads .file-row.active-row svg path,
#downloads .file-row:hover svg path {
  stroke: #a12815;
}

#downloads .file-row.active-row .file-name,
#downloads .file-row.active-row .file-size,
#downloads .file-row:hover .file-name,
#downloads .file-row:hover .file-size {
  color: #a12815;
}

#downloads .show-more-btn {
  background: none;
  border: none;
  color: #a12815;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
  padding: 4px 0 0 0;
  align-self: flex-start;
}

#downloads .show-more-btn:hover {
  text-decoration: underline;
}

#downloads .section-divider {
  margin: 0 16px;
  border: none;
  border-top: 1px solid #e5e7eb;
  height: 0px;
}

@media (max-width: 1024px) {
  #downloads .downloads-card {
    max-width: 728px;
    margin: 0 auto;
    gap: 32px;
  }

  #downloads .product-section {
    padding: 0px 32px;
  }

  #downloads .section-divider {
    margin: 0 16px;
  }
}

@media (max-width: 640px) {
  #downloads {
    gap: 16px;
  }

  #downloads .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  #downloads .search-bar {
    width: 100%;
  }

  #downloads .downloads-card {
    gap: 24px;
  }

  #downloads .product-section {
    padding: 0px 16px;
    gap: 16px;
  }

  #downloads .section-header {
    gap: 16px;
  }

  #downloads .case-row {
    flex-direction: row;
    align-items: flex-start;
  }

  #downloads .product-name {
    line-height: 28px;
  }

  #downloads .license-badge {
    max-width: 100%;
  }

  #downloads .file-row {
    align-items: flex-start;
    padding: 12px 16px;
    gap: 12px;
    min-height: 44px;
  }

  #downloads .file-details {
    flex-grow: 1;
    align-items: flex-start;
    gap: 12px;
  }

  #downloads .file-name {
    flex-grow: 1;
    line-height: 20px;
  }

  #downloads .download-icon {
    padding: 4px 2px;
    margin-top: -2px;
  }

  #downloads .section-divider {
    margin: 0 16px;
  }
}

#downloads-table {
  position: relative;
  min-height: 200px;
}

#downloads-table::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.75);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
}

#downloads-table::after {
  content: "";
  position: absolute;
  top: min(250px, 50%);
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #c9321a;
  background-image: radial-gradient(
    circle at 20px 10px,
    #ffffff 4px,
    transparent 5px
  );
  z-index: 101;
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
}

#downloads-table.loading::before,
#downloads-table.loading::after {
  opacity: 1;
  pointer-events: auto;
}

#downloads-table.loading::after {
  animation: downloadsLoaderSpinner 0.8s linear infinite;
}

@keyframes downloadsLoaderSpinner {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

#downloads .downloads-pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 48px auto 20px auto;
  width: 100%;
  font-family: "Open Sans", sans-serif;
}

#downloads .downloads-pagination {
  display: flex;
  align-items: center;
  gap: 24px;
}

#downloads .downloads-page-number {
  background: transparent;
  border: none;
  outline: none;
  padding: 4px 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#downloads .downloads-page-link {
  color: #c9321a;
}

#downloads .downloads-page-link:hover {
  color: #a02310;
}

#downloads .downloads-page-number.downloads-current {
  color: #6b7280;
  font-weight: 500;
  cursor: default;
  pointer-events: none;
}

#downloads .downloads-page-number:focus,
#downloads .downloads-page-number:active,
#downloads .downloads-page-number:focus-visible {
  outline: none;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
#downloads .downloads-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

#downloads .downloads-empty-state .empty-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ca3af;
  margin-bottom: 20px;
}

#downloads .downloads-empty-state .empty-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  color: #1f2937;
  margin-bottom: 8px;
}

#downloads .downloads-empty-state .empty-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: #6b7280;
  max-width: 420px;
  margin-bottom: 24px;
}

#downloads .downloads-empty-state .empty-shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #ffffff;
  background-color: #c9321a;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

#downloads .downloads-empty-state .empty-shop-btn:hover {
  background-color: #a02310;
}