// Download Page Styles
// Only custom styles that cannot be achieved with Bootstrap

// Folder icon custom styling (gradient background and tab)
.folder-icon {
  width: 120px;
  height: 90px;
  background: linear-gradient(135deg, #fce7ab 0%, #facd55 100%);
  border-radius: 0 8px 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

  &::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 0;
    width: 45px;
    height: 12px;
    background: linear-gradient(135deg, #f6c041 0%, #f1bc40 100%);
    border-radius: 4px 4px 0 0;
    z-index: -1;
  }

  i {
    color: rgba(0, 0, 0, 0.25);
  }
}

// Mac platform folder styling
.platform-instructions[data-platform="mac"] .folder-icon {
  background: linear-gradient(135deg, #6BB6FF 0%, #4A9FFF 100%);

  &::before {
    background: linear-gradient(135deg, #5AA5EE 0%, #4A9FFF 100%);
    z-index: 1;
  }

  i {
    color: rgba(255, 255, 255, 0.4);
  }

  svg {
    opacity: 0.4;
    fill: white;

    path {
      fill: white;
    }
  }
}

// File icon sizing
.file-to-click {
  width: 100px;
  height: 100px;

  .brandmark {
    width: 64px;
    height: 64px;
    object-fit: contain;
  }
}

// Click indicator animation
.click-indicator {
  pointer-events: none;

  .pointer-icon {
    width: 48px;
    height: 48px;
    animation: mouse-move 3s ease-in-out infinite;

    svg {
      width: 100%;
      height: 100%;
    }
  }

  .click-pulse {
    width: 30px;
    height: 30px;
    top: -2px;
    left: -2px;
    animation: click-pulse 3s ease-in-out infinite;
    opacity: 0;
  }
}

@keyframes mouse-move {
  0% {
    transform: translate(60px, -20px);
  }
  20%, 80% {
    transform: translate(0, 0);
  }
  81%, 100% {
    transform: translate(60px, -20px);
  }
}

@keyframes click-pulse {
  0%, 30% {
    opacity: 0;
    transform: scale(0.5);
  }
  40%, 50% {
    opacity: 0.8;
    transform: scale(1.3);
  }
  55% {
    opacity: 0;
  }
  65%, 75% {
    opacity: 0.8;
    transform: scale(1.3);
  }
  80%, 100% {
    opacity: 0;
  }
}

// Wizard window sizing
.wizard-window {
  width: 250px;
  height: 150px;

  .wizard-header {
    height: 30px;
  }

  .wizard-content {
    height: calc(100% - 30px);
  }
}

// Progress bar container and animation
.progress-bar-container {
  height: 20px;

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    border-radius: 10px;
    animation: install-progress 3s ease-in-out infinite;
  }
}

@keyframes install-progress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

// Launch app icon sizing
.app-icon {
  width: 100px;
  height: 100px;

  .brandmark {
    width: 64px;
    height: 64px;
    object-fit: contain;
  }
}


@keyframes app-appear {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

// Drag indicator animation for Mac drag-to-Applications
.drag-indicator {
  pointer-events: none;
  z-index: 10;

  .pointer-icon {
    width: 48px;
    height: 48px;
    animation: mouse-drag 3s ease-in-out infinite;
    position: relative;
    z-index: 11;

    svg {
      width: 100%;
      height: 100%;
    }
  }

  .click-pulse {
    width: 30px;
    height: 30px;
    top: -2px;
    left: -2px;
    animation: drag-click-pulse 3s ease-in-out infinite;
    opacity: 0;
    z-index: 10;
  }
}

@keyframes mouse-drag {
  0%, 10% {
    transform: translate(0, 0);
  }
  40% {
    transform: translate(200px, 0);
  }
  40%, 60% {
    transform: translate(200px, 0);
  }
  61%, 100% {
    transform: translate(0, 0);
  }
}

@keyframes drag-click-pulse {
  0%, 3% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5);
  }
  7%, 10% {
    opacity: 0.6;
    transform: translate(0, 0) scale(1);
  }
  40% {
    opacity: 0.6;
    transform: translate(200px, 0) scale(1);
  }
  45%, 55% {
    opacity: 0.8;
    transform: translate(200px, 0) scale(1.3);
  }
  60%, 100% {
    opacity: 0;
    transform: translate(200px, 0) scale(0.5);
  }
}

// Folder/app double-click animation (step 1)
.folder-click-target {
  .pointer-icon {
    animation: folder-mouse-move 3s ease-in-out infinite;
  }

  .click-pulse {
    animation: folder-click-pulse 3s ease-in-out infinite;
  }
}

@keyframes folder-mouse-move {
  0% {
    transform: translate(60px, -20px);
  }
  20%, 80% {
    transform: translate(0, 0);
  }
  81%, 100% {
    transform: translate(60px, -20px);
  }
}

@keyframes folder-click-pulse {
  0%, 25% {
    opacity: 0;
    transform: scale(0.5);
  }
  // First click
  30%, 38% {
    opacity: 0.8;
    transform: scale(1.3);
  }
  42% {
    opacity: 0;
    transform: scale(0.5);
  }
  // Second click
  48%, 56% {
    opacity: 0.8;
    transform: scale(1.3);
  }
  62%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }
}

// Instruction step container
.instruction-step-container {
  min-height: 200px;
}

// Steps slideshow — uses a grid stack so all slides overlap in the same cell,
// making the container always the height of the tallest slide (no jitter).
.steps-slideshow {
  position: relative;

  .steps-slideshow-slides {
    display: grid;

    > .step-slide {
      grid-area: 1 / 1;
      text-align: center;
      visibility: hidden;
      opacity: 0;
      transition: opacity 0.35s ease-out;
      display: flex;
      flex-direction: column;

      &.active {
        visibility: visible;
        opacity: 1;
      }

      .step-number-badge,
      .step-title {
        align-self: center;
      }

      // The last child (visual content area) grows to fill remaining space
      // and centers its content vertically
      > :last-child {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
      }
    }
  }
}

// Big step number badge
.step-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

// Step title
.step-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

// Navigation bar
.steps-slideshow-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}

// Progress dots
.steps-dots {
  display: flex;
  gap: 8px;
  align-items: center;

  .step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bs-border-color);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;

    &.active {
      background: var(--bs-primary);
      transform: scale(1.3);
    }

    &:hover:not(.active) {
      background: var(--bs-secondary);
    }
  }
}

// Slide fade-in animation
@keyframes step-fade-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
