/**
 * Video Walkthrough Wizard Styles
 * US-301: Fullscreen Wizard Interface
 * US-302: Step-by-Step Instructions
 * US-303: Visual Icons for Instructions
 * US-304: Large Readable Typography
 * US-305: Wizard Progress Indicator
 * US-306: Skip Tutorial Option
 */

/* =============================================================================
   Overlay - Fullscreen (US-301)
   ============================================================================= */

.video-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--papyrus-light, #faf3e8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-wizard-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* =============================================================================
   Wizard Container
   ============================================================================= */

.video-wizard {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--space-md, 16px);
  /* Safe area insets for notched devices */
  padding-top: calc(var(--space-md, 16px) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--space-md, 16px) + env(safe-area-inset-bottom, 0px));
  padding-left: calc(var(--space-md, 16px) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--space-md, 16px) + env(safe-area-inset-right, 0px));
  overflow: hidden;
}

/* =============================================================================
   Header - Skip Button (US-306)
   ============================================================================= */

.wizard-header {
  display: flex;
  justify-content: flex-end;
  padding-bottom: var(--space-md, 16px);
  flex-shrink: 0;
}

.wizard-skip-btn {
  padding: var(--space-sm, 8px) var(--space-md, 16px);
  font-size: var(--font-size-base, 14px);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--navy-blue, #1a2b66);
  background: transparent;
  border: 2px solid var(--navy-blue, #1a2b66);
  border-radius: var(--border-radius-md, 8px);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 44px;
  min-width: 44px;
}

.wizard-skip-btn:hover,
.wizard-skip-btn:focus {
  background: var(--navy-blue, #1a2b66);
  color: white;
  outline: none;
}

.wizard-skip-btn:focus {
  box-shadow: 0 0 0 3px rgba(26, 43, 102, 0.3);
}

/* =============================================================================
   Content - Step Display (US-302)
   ============================================================================= */

.wizard-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md, 16px);
  overflow-y: auto;
  cursor: pointer;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
  animation: fadeIn 0.3s ease;
}

.wizard-step[hidden] {
  display: none;
}

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

/* =============================================================================
   Icon Styling (US-303) - 48px+ requirement
   ============================================================================= */

.wizard-step-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--navy-blue, #1a2b66);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg, 24px);
}

.wizard-step-icon i {
  font-size: 48px;
  color: var(--papyrus-gold, #f5e6d3);
}

/* =============================================================================
   Typography (US-304) - WCAG AAA Contrast
   ============================================================================= */

/* Heading: 24px as specified */
.wizard-step-title {
  font-size: 24px;
  font-weight: var(--font-weight-bold, 700);
  line-height: 1.2;
  color: var(--navy-blue, #1a2b66);
  margin: 0 0 var(--space-md, 16px) 0;
  /* WCAG AAA: Navy blue (#1a2b66) on papyrus-light (#faf3e8) = 9.8:1 contrast */
}

/* Body: 18px as specified */
.wizard-step-description {
  font-size: 18px;
  font-weight: var(--font-weight-normal, 500);
  line-height: 1.5;
  color: var(--navy-blue, #1a2b66);
  margin: 0;
  /* Keep sentences short (<10 words) */
}

.wizard-step-action {
  font-size: var(--font-size-md, 16px);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--orange-grade, #E67234);
  margin-top: var(--space-md, 16px);
}

/* =============================================================================
   Footer - Progress & Navigation
   ============================================================================= */

.wizard-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg, 24px);
  padding-top: var(--space-md, 16px);
}

/* =============================================================================
   Progress Indicator - Dots (US-305)
   ============================================================================= */

.wizard-progress {
  display: flex;
  justify-content: center;
  gap: var(--space-sm, 8px);
}

.wizard-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--papyrus-medium, #f0ddc0);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wizard-dot:hover {
  background: var(--navy-blue, #1a2b66);
  opacity: 0.6;
}

.wizard-dot:focus {
  outline: 2px solid var(--navy-blue, #1a2b66);
  outline-offset: 2px;
}

.wizard-dot.active {
  background: var(--navy-blue, #1a2b66);
  transform: scale(1.2);
}

/* =============================================================================
   Navigation Buttons
   ============================================================================= */

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md, 16px);
}

.wizard-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm, 8px);
  padding: var(--space-md, 16px) var(--space-lg, 24px);
  font-size: var(--font-size-md, 16px);
  font-weight: var(--font-weight-semibold, 600);
  border-radius: var(--border-radius-md, 8px);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  min-height: 48px;
  min-width: 100px;
}

.wizard-prev-btn {
  background: transparent;
  color: var(--navy-blue, #1a2b66);
  border: 2px solid var(--navy-blue, #1a2b66);
}

.wizard-prev-btn:hover:not(:disabled),
.wizard-prev-btn:focus:not(:disabled) {
  background: var(--papyrus-medium, #f0ddc0);
}

.wizard-prev-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wizard-next-btn {
  background: var(--navy-blue, #1a2b66);
  color: white;
  border: 2px solid var(--navy-blue, #1a2b66);
  flex: 1;
  max-width: 200px;
}

.wizard-next-btn:hover,
.wizard-next-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 43, 102, 0.3);
}

.wizard-nav-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 43, 102, 0.3);
}

.wizard-nav-btn i {
  font-size: 14px;
}

/* =============================================================================
   Responsive Adjustments
   ============================================================================= */

@media (min-width: 768px) {
  .wizard-step-icon {
    width: 120px;
    height: 120px;
  }

  .wizard-step-icon i {
    font-size: 56px;
  }

  .wizard-step-title {
    font-size: 28px;
  }

  .wizard-step-description {
    font-size: 20px;
  }

  .wizard-step {
    max-width: 400px;
  }
}

/* =============================================================================
   Reduced Motion Support
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  .video-wizard-overlay {
    transition: none;
  }

  .wizard-step {
    animation: none;
  }

  .wizard-dot {
    transition: none;
  }

  .wizard-nav-btn {
    transition: none;
  }
}

/* =============================================================================
   High Contrast Mode Support
   ============================================================================= */

@media (prefers-contrast: high) {
  .wizard-step-icon {
    border: 3px solid var(--navy-blue, #1a2b66);
  }

  .wizard-dot {
    border: 2px solid var(--navy-blue, #1a2b66);
  }

  .wizard-nav-btn {
    border-width: 3px;
  }
}
