/**
 * CompleteStep Styles
 * 
 * Enhanced final step with celebration and beautiful summary.
 */

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.4));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 16px rgba(34, 197, 94, 0.6));
  }
}

@keyframes countUp {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.Root {
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: slideInUp 300ms ease-out;
}

.Header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, transparent 100%);
  border-radius: 12px;

  .SuccessIcon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-radius: 50%;
    animation: successPulse 2s ease-in-out infinite;

    svg {
      width: 36px;
      height: 36px;
      color: var(--theme-color-success);
    }
  }

  h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-color-fg-highlight);
    margin: 0;
    text-align: center;
  }

  p {
    font-size: 14px;
    color: var(--theme-color-fg-default);
    margin: 0;
    text-align: center;
  }
}

.Stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.StatCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--theme-color-bg-3) 0%, var(--theme-color-bg-2) 100%);
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--theme-color-bg-2);
  transition: all 250ms ease-in-out;

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  }
}

.StatCardIcon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 200ms ease-in-out;

  svg {
    width: 22px;
    height: 22px;
  }
}

.StatCard.is-success .StatCardIcon {
  color: var(--theme-color-success);
  background-color: rgba(34, 197, 94, 0.15);
}

.StatCard.is-warning .StatCardIcon {
  color: var(--theme-color-warning);
  background-color: rgba(251, 191, 36, 0.15);
}

.StatCard.is-error .StatCardIcon {
  color: var(--theme-color-danger);
  background-color: rgba(239, 68, 68, 0.15);
}

.StatCard:hover .StatCardIcon {
  transform: scale(1.1) rotate(5deg);
}

.StatCardValue {
  font-size: 32px;
  font-weight: 700;
  color: var(--theme-color-fg-highlight);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  animation: countUp 400ms ease-out;
}

.StatCardLabel {
  font-size: 11px;
  color: var(--theme-color-fg-default);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.MetaInfo {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--theme-color-bg-3) 0%, var(--theme-color-bg-2) 100%);
  border-radius: 10px;
  flex-wrap: wrap;
}

.MetaItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--theme-color-bg-4);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--theme-color-fg-highlight);
  border: 1px solid var(--theme-color-bg-2);

  svg {
    width: 16px;
    height: 16px;
    color: var(--theme-color-primary);
  }
}

.Paths {
  padding: 20px;
  background: linear-gradient(135deg, var(--theme-color-bg-3) 0%, var(--theme-color-bg-2) 100%);
  border-radius: 12px;
  border: 1px solid var(--theme-color-bg-2);
  margin-bottom: 20px;

  h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color-fg-highlight);
    margin: 0 0 16px 0;
  }
}

.PathItem {
  display: flex;
  gap: 16px;
  padding: 16px;
  background-color: var(--theme-color-bg-4);
  border-radius: 8px;
  border: 1px solid var(--theme-color-bg-3);
  transition: all 200ms ease-in-out;

  &:not(:last-child) {
    margin-bottom: 12px;
  }

  svg {
    width: 20px;
    height: 20px;
    color: var(--theme-color-primary);
    flex-shrink: 0;
    margin-top: 2px;
  }

  &:hover {
    background-color: var(--theme-color-bg-3);
    border-color: var(--theme-color-primary);
  }
}

.PathContent {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  flex: 1;

  .PathLabel {
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-color-fg-default);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .PathValue {
    font-family: monospace;
    font-size: 12px;
    color: var(--theme-color-fg-highlight);
    word-break: break-all;
    background-color: var(--theme-color-bg-2);
    padding: 8px 12px;
    border-radius: 6px;
  }
}

.NextSteps {
  padding: 20px;
  background: linear-gradient(135deg, var(--theme-color-bg-3) 0%, var(--theme-color-bg-2) 100%);
  border-radius: 12px;
  border: 1px solid var(--theme-color-bg-2);
  margin-bottom: 20px;

  h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color-fg-highlight);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;

    svg {
      width: 18px;
      height: 18px;
      color: var(--theme-color-primary);
    }
  }
}

.StepsList {
  list-style: none;
  padding: 0;
  margin: 0;

  li {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: var(--theme-color-bg-4);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--theme-color-fg-default);
    transition: all 200ms ease-in-out;

    &:not(:last-child) {
      margin-bottom: 10px;
    }

    &:hover {
      background-color: var(--theme-color-bg-3);
      transform: translateX(4px);
    }

    svg {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
      margin-top: 2px;
      color: var(--theme-color-primary);
    }
  }
}

.Actions {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
