/* install-assistant.css - Live install overlay for Scouq */

.ia-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 7, 0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  padding: 24px;
}

.ia-overlay.ia-visible {
  opacity: 1;
  pointer-events: all;
}

.ia-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 40px 40px 36px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(24px);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.ia-overlay.ia-visible .ia-card {
  transform: translateY(0);
}

.ia-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  transition: background 0.15s, color 0.15s;
  font-size: 16px;
  line-height: 1;
}

.ia-close:hover {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.8);
}

.ia-header {
  margin-bottom: 32px;
}

.ia-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.ia-subtitle {
  font-size: 13px;
  color: #666;
}

/* Steps list */
.ia-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ia-step {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  position: relative;
  transition: opacity 0.22s ease;
}

.ia-step + .ia-step {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Connector line between steps */
.ia-step-indicator-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 2px;
}

.ia-step-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.22s, background 0.22s;
  flex-shrink: 0;
  position: relative;
}

/* Pending state: empty circle */
.ia-step[data-state="pending"] .ia-step-indicator {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
}

/* Active state: pulsing dot */
.ia-step[data-state="active"] .ia-step-indicator {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.ia-step[data-state="active"] .ia-step-indicator::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: ia-pulse-dot 1.2s ease-in-out infinite;
}

@keyframes ia-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* Done state: check */
.ia-step[data-state="done"] .ia-step-indicator {
  border-color: rgba(110, 231, 183, 0.6);
  background: rgba(16, 185, 129, 0.12);
}

.ia-step[data-state="done"] .ia-step-indicator::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='1.5,5 4,7.5 8.5,2' stroke='%236ee7b7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  animation: ia-check-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes ia-check-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.ia-step-content {
  flex: 1;
  min-width: 0;
}

.ia-step-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  transition: color 0.22s;
}

.ia-step[data-state="pending"] .ia-step-label {
  color: rgba(255, 255, 255, 0.35);
}

.ia-step[data-state="done"] .ia-step-label {
  color: rgba(110, 231, 183, 0.85);
}

.ia-step-desc {
  font-size: 12px;
  color: #555;
  margin-top: 3px;
  line-height: 1.5;
  transition: color 0.22s;
}

.ia-step[data-state="active"] .ia-step-desc {
  color: #888;
}

.ia-step[data-state="pending"] .ia-step-desc {
  color: rgba(255, 255, 255, 0.18);
}

/* Download progress bar */
.ia-progress-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
  display: none;
}

.ia-step[data-state="active"] .ia-progress-bar {
  display: block;
}

.ia-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.9));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Illustration area (for step 2 and 3) */
.ia-step-illustration {
  display: none;
  margin-top: 10px;
}

.ia-step[data-state="active"] .ia-step-illustration {
  display: block;
}

/* SVG illustrations */
.ia-illustration-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* Mobile hint: spinner in step 4 */
.ia-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: ia-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 6px;
}

@keyframes ia-spin {
  to { transform: rotate(360deg); }
}

/* Celebration card */
.ia-celebration {
  display: none;
  text-align: center;
  padding: 8px 0 4px;
}

.ia-celebration.ia-visible {
  display: block;
}

.ia-steps-wrap.ia-hidden {
  display: none;
}

.ia-celebration-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  display: block;
}

.ia-celebration-headline {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.6px;
  margin-bottom: 8px;
}

.ia-celebration-sub {
  font-size: 14px;
  color: #666;
  margin-bottom: 28px;
  line-height: 1.5;
}

.ia-celebration-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.ia-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  background: #fff;
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  font: 600 14px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
}

.ia-btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.ia-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font: 500 14px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.ia-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.9);
}

.ia-help-link {
  margin-top: 20px;
  font-size: 12px;
  color: #444;
  text-align: center;
}

.ia-help-link a {
  color: #666;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ia-help-link a:hover {
  color: #888;
}

/* Mobile responsive */
@media (max-width: 560px) {
  .ia-card {
    padding: 28px 22px 24px;
  }

  .ia-title {
    font-size: 15px;
  }

  .ia-step-label {
    font-size: 13px;
  }

  .ia-celebration-headline {
    font-size: 22px;
  }

  .ia-celebration-actions {
    flex-direction: column;
  }

  .ia-btn-primary,
  .ia-btn-ghost {
    text-align: center;
    justify-content: center;
    width: 100%;
  }
}

/* Mobile-on-desktop fallback card */
.ia-mobile-card {
  text-align: center;
  padding: 8px 0;
}

.ia-mobile-card .ia-mobile-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
}

.ia-mobile-card .ia-mobile-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.ia-mobile-card .ia-mobile-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 20px;
}

.ia-qr-placeholder {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ia-qr-placeholder svg {
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.2);
}
