/* VOCPhone Versions Page Styles
 * Portal design system for the all-versions page
 */

/* Page wrapper */
.page-wrapper {
  min-height: 100vh;
  background: var(--portal-bg);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ============================================
   HEADER SECTION
   ============================================ */
.versions-header {
  background:
    linear-gradient(135deg, rgba(7, 61, 84, 0.3) 0%, rgba(10, 82, 112, 0.2) 100%),
    url('/assets/images/abstract_background.webp') center / cover no-repeat;
  background-color: #073d54;
  background-blend-mode: normal, overlay;
  color: #ffffff;
  text-align: center;
  padding: 40px 24px 36px;
}

.versions-header-content {
  max-width: 640px;
  margin: 0 auto;
}

.versions-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.versions-header p {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.85;
  margin: 0;
}

/* ============================================
   CHANNELS LIST
   ============================================ */
.channels-list {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ============================================
   CHANNEL CARD
   ============================================ */
.channel-card {
  background: var(--portal-white);
  border-radius: var(--portal-radius-card);
  box-shadow: var(--portal-shadow-card-sm);
  overflow: hidden;
}

.channel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--portal-border);
}

.channel-card-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--portal-navy);
  margin: 0;
  text-transform: capitalize;
}

.channel-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
  vertical-align: middle;
}

.channel-badge.beta {
  background: #f59e0b;
  color: #ffffff;
}

.channel-badge.alpha {
  background: #ef4444;
  color: #ffffff;
}

.channel-latest {
  font-size: 0.8125rem;
  color: var(--portal-text-muted);
  font-weight: 500;
}

/* ============================================
   RELEASE SECTION
   ============================================ */
.release-item {
  padding: 20px 28px;
  border-top: 1px solid var(--portal-border);
}

.release-item:first-child {
  border-top: none;
}

.release-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.release-item-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--portal-navy);
  margin: 0;
}

.latest-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--portal-orange);
  color: #ffffff;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
  vertical-align: middle;
}

.release-date {
  font-size: 0.8125rem;
  color: var(--portal-text-muted);
}

.release-notes {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--portal-bg);
  border-radius: var(--portal-radius-sm);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--portal-text-muted);
  white-space: pre-wrap;
}

/* ============================================
   ARTIFACT TABLE
   ============================================ */
.artifact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.artifact-table th,
.artifact-table td {
  text-align: left;
  padding: 10px 12px;
}

.artifact-table thead th {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--portal-text-muted);
  border-bottom: 1px solid var(--portal-border);
}

.artifact-table tbody tr + tr {
  border-top: 1px solid var(--portal-border);
}

.artifact-table tbody tr:hover {
  background: var(--portal-bg);
}

.artifact-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  color: var(--portal-navy);
  word-break: break-all;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--portal-radius-sm);
  background: var(--portal-orange);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.download-link:hover {
  background: var(--portal-orange-light);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.download-link:active {
  background: var(--portal-orange-dark);
  transform: translateY(0);
}

.download-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.no-files {
  color: var(--portal-text-muted);
  font-size: 0.875rem;
  font-style: italic;
  padding: 12px 0;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  max-width: 480px;
  margin: 80px auto;
  padding: 36px;
  text-align: center;
  background: var(--portal-white);
  border-radius: var(--portal-radius-card);
  box-shadow: var(--portal-shadow-card-sm);
}

.empty-state h2 {
  font-size: 1.25rem;
  color: var(--portal-navy);
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--portal-text-muted);
  font-size: 0.9375rem;
}

/* ============================================
   PAGE FOOTER
   ============================================ */
.page-footer {
  margin-top: auto;
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--portal-border);
  background: var(--portal-white);
}

.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--portal-teal);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--portal-navy);
  text-decoration: underline;
}

.footer-divider {
  color: var(--portal-border);
  font-size: 0.875rem;
}

.page-footer .terms-text {
  color: var(--portal-text-muted);
  font-size: 0.75rem;
  margin: 0;
}

/* ============================================
   LOADING & ERROR STATES
   ============================================ */
.loading-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--portal-text-muted);
  font-size: 1rem;
}

.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--portal-border);
  border-top-color: var(--portal-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  max-width: 480px;
  margin: 80px auto;
  padding: 36px;
  text-align: center;
  background: var(--portal-white);
  border-radius: var(--portal-radius-card);
  box-shadow: var(--portal-shadow-card-sm);
}

.error-state h2 {
  font-size: 1.25rem;
  color: var(--portal-navy);
  margin-bottom: 12px;
}

.error-state p {
  color: var(--portal-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 24px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .versions-header {
    padding: 32px 20px 28px;
  }

  .versions-header h1 {
    font-size: 1.5rem;
  }

  .versions-header p {
    font-size: 0.9375rem;
  }

  .channels-list {
    padding: 24px 16px 40px;
    gap: 20px;
  }

  .channel-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 20px;
  }

  .release-item {
    padding: 16px 20px;
  }

  .release-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .artifact-table th,
  .artifact-table td {
    padding: 8px;
  }

  /* Hide arch column on tablets */
  .artifact-table th:nth-child(3),
  .artifact-table td:nth-child(3) {
    display: none;
  }

  .release-notes {
    font-size: 0.8125rem;
    padding: 10px 14px;
  }

  .download-link {
    padding: 8px 14px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .versions-header {
    padding: 28px 16px 24px;
  }

  .versions-header h1 {
    font-size: 1.25rem;
  }

  .versions-header p {
    font-size: 0.875rem;
  }

  .channels-list {
    padding: 20px 12px 36px;
    gap: 16px;
  }

  .channel-card-header {
    padding: 14px 16px;
  }

  .channel-card-header h2 {
    font-size: 1.0625rem;
  }

  .release-item {
    padding: 14px 16px;
  }

  .release-item-header h3 {
    font-size: 0.9375rem;
  }

  /* Hide platform and size columns on mobile */
  .artifact-table th:nth-child(2),
  .artifact-table td:nth-child(2),
  .artifact-table th:nth-child(4),
  .artifact-table td:nth-child(4) {
    display: none;
  }

  .artifact-name {
    font-size: 0.75rem;
  }

  .page-footer {
    padding: 24px 16px;
  }
}
