/* Troubleshooting Wizard - Tech Diagnostic Console Design */

/* ===== CSS VARIABLES ===== */
:root {
  --wizard-accent: #00d4aa;
  --wizard-accent-dim: rgba(0, 212, 170, 0.15);
  --wizard-accent-glow: rgba(0, 212, 170, 0.4);
  --wizard-danger: #ff6b6b;
  --wizard-danger-dim: rgba(255, 107, 107, 0.15);
  --wizard-warning: #ffd93d;
  --wizard-warning-dim: rgba(255, 217, 61, 0.15);
  --wizard-success: #6bcb77;
  --wizard-success-dim: rgba(107, 203, 119, 0.15);
  --wizard-card-bg: rgba(255, 255, 255, 0.03);
  --wizard-card-border: rgba(255, 255, 255, 0.08);
  --wizard-text: #e8e8e8;
  --wizard-text-dim: #888;
  --wizard-bg-gradient: linear-gradient(145deg, #1a1f2e 0%, #0f1318 100%);
  --wizard-glass: rgba(255, 255, 255, 0.02);
}

/* Light mode overrides */
[data-md-color-scheme="default"] {
  --wizard-card-bg: rgba(0, 0, 0, 0.02);
  --wizard-card-border: rgba(0, 0, 0, 0.08);
  --wizard-text: #2d3748;
  --wizard-text-dim: #718096;
  --wizard-bg-gradient: linear-gradient(145deg, #f7fafc 0%, #edf2f7 100%);
  --wizard-glass: rgba(0, 0, 0, 0.02);
  --wizard-accent: #00a88a;
  --wizard-accent-dim: rgba(0, 168, 138, 0.1);
  --wizard-accent-glow: rgba(0, 168, 138, 0.25);
}

/* ===== MAIN CONTAINER ===== */
#wizard-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== WIZARD CARD ===== */
.wizard-card {
  background: var(--wizard-bg-gradient);
  border: 1px solid var(--wizard-card-border);
  border-radius: 16px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wizard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wizard-accent), transparent);
  opacity: 0.8;
}

/* Animated corner accent */
.wizard-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--wizard-accent-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

/* ===== STEP INDICATOR ===== */
.wizard-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--wizard-card-border);
}

.wizard-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--wizard-accent-dim);
  border: 1px solid var(--wizard-accent);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wizard-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wizard-step-badge svg {
  width: 14px;
  height: 14px;
}

.wizard-step-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--wizard-text-dim);
}

/* ===== QUESTION STYLES ===== */
.wizard-question {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--wizard-text);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.wizard-help {
  color: var(--wizard-text-dim);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  padding: 0.75rem 1rem;
  background: var(--wizard-glass);
  border-radius: 10px;
  border-left: 3px solid var(--wizard-accent);
}

.wizard-help strong {
  color: var(--wizard-text);
  display: block;
  margin-bottom: 0.5rem;
}

.wizard-help p {
  margin: 0.5rem 0;
}

.wizard-help p:first-child {
  margin-top: 0;
}

.wizard-help p:last-child {
  margin-bottom: 0;
}

/* ===== WARNING BOX ===== */
.wizard-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--wizard-warning-dim);
  border: 1px solid rgba(255, 217, 61, 0.3);
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.wizard-warning::before {
  content: '⚠';
  font-size: 0.9rem;
  flex-shrink: 0;
}

.wizard-warning-text {
  color: var(--wizard-text);
}

/* ===== CHOICE BUTTONS ===== */
.wizard-choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wizard-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid var(--wizard-card-border);
  background: var(--wizard-card-bg);
  color: var(--wizard-text);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.wizard-choice::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--wizard-accent);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-choice::after {
  content: '→';
  margin-left: auto;
  font-size: 1rem;
  color: var(--wizard-text-dim);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-choice:hover {
  border-color: var(--wizard-accent);
  background: var(--wizard-accent-dim);
  transform: translateX(4px);
}

.wizard-choice:hover::before {
  width: 4px;
}

.wizard-choice:hover::after {
  color: var(--wizard-accent);
  transform: translateX(4px);
}

.wizard-choice:active {
  transform: translateX(2px) scale(0.995);
}

/* ===== YES/NO BUTTONS ===== */
.wizard-yesno {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.wizard-btn {
  position: relative;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.wizard-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.wizard-btn:active::before {
  width: 300px;
  height: 300px;
}

.wizard-btn-primary {
  background: linear-gradient(135deg, var(--wizard-accent) 0%, #00b894 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--wizard-accent-glow);
}

.wizard-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--wizard-accent-glow);
}

.wizard-btn-secondary {
  background: var(--wizard-card-bg);
  border: 2px solid var(--wizard-card-border);
  color: var(--wizard-text);
}

.wizard-btn-secondary:hover {
  border-color: var(--wizard-accent);
  color: var(--wizard-accent);
}

.wizard-btn-yes {
  background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 212, 170, 0.3);
}

.wizard-btn-yes::after {
  content: ' ✓';
  opacity: 0.8;
}

.wizard-btn-yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
}

.wizard-btn-no {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.3);
}

.wizard-btn-no::after {
  content: ' ✗';
  opacity: 0.8;
}

.wizard-btn-no:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* ===== STEPS LIST ===== */
.wizard-steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.wizard-steps li {
  counter-increment: step-counter;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--wizard-card-bg);
  border: 1px solid var(--wizard-card-border);
  border-radius: 8px;
  line-height: 1.5;
  font-size: 0.85rem;
  color: var(--wizard-text);
  transition: all 0.2s;
}

.wizard-steps li::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--wizard-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.wizard-steps li:hover {
  border-color: var(--wizard-accent);
  background: var(--wizard-accent-dim);
}

.wizard-steps li:last-child {
  margin-bottom: 0;
}

/* ===== INFO BOX ===== */
.wizard-info {
  background: var(--wizard-card-bg);
  border: 1px solid var(--wizard-card-border);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  font-size: 0.85rem;
  color: var(--wizard-text);
}

.wizard-info p {
  margin: 0 0 1rem 0;
}

.wizard-info p:last-child {
  margin-bottom: 0;
}

.wizard-info strong {
  color: var(--wizard-accent);
}

/* ===== SUCCESS STATE ===== */
.wizard-success {
  position: relative;
  background: var(--wizard-success-dim);
  border: 1px solid rgba(107, 203, 119, 0.3);
  padding: 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  color: var(--wizard-text);
  line-height: 1.6;
  font-size: 0.85rem;
  overflow: hidden;
}

.wizard-success::before {
  content: '✓';
  position: absolute;
  top: -20px;
  right: -10px;
  font-size: 120px;
  color: var(--wizard-success);
  opacity: 0.1;
  font-weight: bold;
  line-height: 1;
}

.wizard-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--wizard-success);
  border-radius: 50%;
  margin-bottom: 0.75rem;
  animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wizard-success-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== FAIL STATE ===== */
.wizard-message {
  background: var(--wizard-card-bg);
  border: 1px solid var(--wizard-card-border);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  font-size: 0.85rem;
  color: var(--wizard-text);
}

.wizard-fail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--wizard-card-border);
}

.wizard-fail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--wizard-danger-dim);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 50%;
  color: var(--wizard-danger);
}

/* ===== SUPPORT SUMMARY ===== */
.wizard-support-summary {
  background: var(--wizard-card-bg);
  border: 2px solid var(--wizard-accent);
  border-radius: 10px;
  padding: 1rem;
  margin: 1.25rem 0;
}

.wizard-support-summary h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wizard-accent);
}

.wizard-copy-box {
  background: var(--wizard-glass);
  border: 1px solid var(--wizard-card-border);
  padding: 0.85rem;
  border-radius: 8px;
  font-family: 'SF Mono', 'Fira Code', 'Monaco', monospace;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: var(--wizard-text);
}

.wizard-btn-copy {
  background: linear-gradient(135deg, var(--wizard-accent) 0%, #00b894 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--wizard-accent-glow);
}

.wizard-btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--wizard-accent-glow);
}

/* ===== NAVIGATION ===== */
#wizard-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--wizard-card-border);
}

#wizard-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  background: transparent;
  border: 1px solid var(--wizard-card-border);
  color: var(--wizard-text-dim);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

#wizard-back::before {
  content: '←';
  font-size: 1.1rem;
}

#wizard-back:hover {
  border-color: var(--wizard-text-dim);
  color: var(--wizard-text);
  transform: translateX(-2px);
}

/* ===== IMAGE & VIDEO ===== */
.wizard-image {
  margin: 1.5rem 0;
  text-align: center;
}

.wizard-image img {
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--wizard-card-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.wizard-video {
  margin: 1.5rem 0;
}

.wizard-video iframe,
.wizard-video video {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  border: 1px solid var(--wizard-card-border);
}

/* ===== BREADCRUMB PATH ===== */
.wizard-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  color: var(--wizard-text-dim);
}

.wizard-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  background: var(--wizard-glass);
  border-radius: 6px;
  white-space: nowrap;
}

.wizard-breadcrumb-separator {
  color: var(--wizard-text-dim);
  opacity: 0.5;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-card {
  animation: fadeSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-animate-in {
  animation: fadeSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-choice,
.wizard-steps li {
  opacity: 0;
  animation: fadeSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-choice:nth-child(1) { animation-delay: 0.05s; }
.wizard-choice:nth-child(2) { animation-delay: 0.1s; }
.wizard-choice:nth-child(3) { animation-delay: 0.15s; }
.wizard-choice:nth-child(4) { animation-delay: 0.2s; }
.wizard-choice:nth-child(5) { animation-delay: 0.25s; }

.wizard-steps li:nth-child(1) { animation-delay: 0.05s; }
.wizard-steps li:nth-child(2) { animation-delay: 0.1s; }
.wizard-steps li:nth-child(3) { animation-delay: 0.15s; }
.wizard-steps li:nth-child(4) { animation-delay: 0.2s; }
.wizard-steps li:nth-child(5) { animation-delay: 0.25s; }
.wizard-steps li:nth-child(6) { animation-delay: 0.3s; }

/* ===== PROGRESS BAR ===== */
.wizard-progress-bar {
  position: relative;
  height: 4px;
  background: var(--wizard-card-border);
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.wizard-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--wizard-accent), #00e6b8);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== START SCREEN SPECIAL ===== */
.wizard-start {
  text-align: center;
  padding: 0.5rem 0;
}

.wizard-start .wizard-question {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.wizard-start-subtitle {
  color: var(--wizard-text-dim);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.wizard-start .wizard-choices {
  max-width: 450px;
  margin: 0 auto;
}

.wizard-start .wizard-choice {
  padding: 0.85rem 1.25rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .wizard-card {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .wizard-question {
    font-size: 1rem;
  }

  .wizard-yesno {
    grid-template-columns: 1fr;
  }

  .wizard-btn {
    padding: 0.6rem 1rem;
  }

  .wizard-start .wizard-question {
    font-size: 1.1rem;
  }
}

/* ===== LOADING STATE ===== */
.wizard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.wizard-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--wizard-card-border);
  border-top-color: var(--wizard-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
