// Welcome Component - Using Design Tokens Only
// NO hardcoded colors, sizes, or values

.welcome-container {
  min-height: 100vh;
  padding: 40px 24px;
  background-color: var(--bg-page);
  overflow: auto;
  max-height: 100vh;
}

// Header Section
.welcome-header {
  text-align: center;
  margin-bottom: 48px;
}

.welcome-title {
  margin: 0 0 12px 0;
  font-size: 48px;
  font-weight: var(--font-weight-semiBold);
  background: linear-gradient(
    135deg,
    var(--action-primary-default),
    var(--action-primary-hover)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.welcome-subtitle {
  margin: 0;
  font-size: var(--font-size-md);
  // color: var(--text-secondary);
  font-weight: var(--font-weight-regular);
  background: linear-gradient(
    to right,
    var(--border-focus) 20%,
    var(--border-success) 30%,
    var(--border-warning) 70%,
    var(--border-focus) 80%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 500% auto;
  animation: textShine 5s ease-in-out infinite alternate;
}

// Content Wrapper
.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

// Card Styles
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: calc(var(--size-radius-l) * 1px);
  overflow: hidden;
  transition: all 0.3s ease;

  &:hover {
    border-color: var(--border-focus);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

.card-header {
  padding: 20px 24px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  margin: 0;
  font-size: var(--font-size-key);
  font-weight: var(--font-weight-semiBold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card-body {
  padding: 24px;
  background-color: var(--bg-subtle);
}

// Version Badge
.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background-color: var(--badge-success-bg);
  color: var(--text-status-success);
  border-radius: calc(var(--size-radius-l) * 1px);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

// Feature List
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background-color: var(--bg-subtle);
  border-radius: calc(var(--size-radius-m) * 1px);
  transition: all 0.2s ease;

  &:hover {
    background-color: var(--bg-hover);
    transform: translateX(4px);
  }
}

.feature-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--action-primary-default);
  color: var(--text-onPrimary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;

  svg {
    width: 16px;
    height: 16px;
  }
}

.feature-text {
  flex: 1;
  font-size: var(--font-size-md);
  color: var(--text-primary);
  font-weight: var(--font-weight-regular);
}

// Releases Section
.releases-description {
  margin: 0 0 20px 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.releases-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.release-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: calc(var(--size-radius-m) * 1px);
  color: var(--text-link);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all 0.2s ease;

  &:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-focus);
    color: var(--action-primary-hover);

    .release-icon {
      transform: translateX(4px);
    }
  }

  &:active {
    background-color: var(--bg-surface);
  }
}

.release-icon {
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.more-link {
  background-color: var(--bg-surface);
  border-color: var(--border-focus);
  color: var(--action-primary-default);
  font-weight: var(--font-weight-semiBold);

  &:hover {
    background-color: var(--action-primary-default);
    color: var(--text-onPrimary);
    border-color: var(--action-primary-default);

    .release-icon {
      color: var(--text-onPrimary);
    }
  }
}

// Video Card (Optional)
.video-card {
  .card-body {
    padding: 24px;
    background-color: var(--bg-subtle);
  }
}

.video-selection {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.video-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-radio-button {
  padding: 8px 12px;
  border-radius: calc(var(--size-radius-m) * 1px);
  transition: background-color 0.2s ease;

  &:hover {
    background-color: var(--bg-hover);
  }
}

// Responsive Design
@media (max-width: 768px) {
  .welcome-container {
    padding: 24px 16px;
  }

  .welcome-title {
    font-size: 32px;
  }

  .welcome-subtitle {
    font-size: var(--font-size-sm);
  }

  .content-wrapper {
    gap: 16px;
  }

  .card-header {
    padding: 16px 20px;
  }

  .card-body {
    padding: 20px;
    background-color: var(--bg-subtle);
  }

  .card-title {
    font-size: var(--font-size-md);
    flex-direction: column;
    align-items: flex-start;
  }

  .feature-item {
    padding: 10px;
  }

  .feature-text {
    font-size: var(--font-size-sm);
  }
}

// Print Styles
@media print {
  .welcome-container {
    background-color: white;
  }

  .card {
    border-color: var(--border-strong);
    box-shadow: none;
    page-break-inside: avoid;
  }

  .release-link {
    color: var(--text-primary);
  }
}

// Dark Mode Support (when implemented)
[data-theme="dark"] {
  .welcome-title {
    background: linear-gradient(
      135deg,
      var(--action-primary-hover),
      var(--border-focus)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

// Accessibility
.feature-badge,
.release-icon {
  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }
}

.feature-item,
.release-link {
  @media (prefers-reduced-motion: reduce) {
    transition: none;

    &:hover {
      transform: none;
    }
  }
}

// Focus Styles for Keyboard Navigation
.release-link:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

// Animated gradient for subtitle

@keyframes textShine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
