/* css/components/welcome-wizard.css */
/* v1.5 - 10/9/25 10:30pm - Added QR code styles for Screen 6 */
/* v1.4 - 10/9/25 10:05pm - Fixed modal height, added loading spinner */
/* v1.3 - 10/9/25 9:50pm - Added column button layout and tertiary button for Screen 4 */
/* v1.2 - 10/9/25 9:35pm - Added styles for Screen 3 message types */
/* v1.1 - 10/9/25 - Forced white theme, opaque backdrop */

/* ===== OVERLAY ===== */
.welcome-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95); /* Opaque like loading screen */
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.welcome-wizard-overlay.active {
  opacity: 1;
}

/* ===== MODAL ===== */
.welcome-wizard-modal {
  background: #ffffff; /* Force white background */
  color: #000000; /* Force black text */
  border-radius: 16px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh; /* Changed from 600px to 90vh for better fit */
  min-height: 500px;
  height: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.welcome-wizard-content {
  width: 100%;
  flex: 1;
  position: relative;
  min-height: 400px;
  overflow-y: auto; /* Allow scrolling if content is tall */
}

/* ===== SCREENS ===== */
.welcome-screens {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 400px;
  overflow-y: auto; /* Allow scrolling */
  overflow-x: hidden; /* Keep horizontal hidden for slide animation */
}

.welcome-screen {
  /* Removed absolute positioning - now flows naturally */
  width: 100%;
  padding: 40px 40px 60px 40px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  display: none;
}

.welcome-screen.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.welcome-screen.sliding-in {
  animation: slideInFromRight 0.3s ease forwards;
}

.welcome-screen.sliding-out {
  animation: slideOutToLeft 0.3s ease forwards;
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutToLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

/* ===== SCREEN CONTENT ===== */
.welcome-screen-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.welcome-logo img {
  width: 200px;
  height: auto;
  margin-bottom: 20px;
}

.welcome-icon {
  color: var(--accent-secondary, #EE9828);
  margin-bottom: 10px;
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  color: #000000; /* Force black */
  margin: 0;
  line-height: 1.2;
}

.welcome-subtitle {
  font-size: 18px;
  color: #666666; /* Force gray */
  margin: 0;
  line-height: 1.5;
}

.welcome-question {
  font-size: 20px;
  color: #000000; /* Force black */
  margin: 0;
  line-height: 1.5;
}

.welcome-question strong {
  color: var(--accent-secondary, #EE9828);
}

.welcome-message {
  font-size: 18px;
  color: #000000; /* Force black */
  margin: 0;
  line-height: 1.6;
}

.welcome-message strong {
  color: var(--accent-secondary, #EE9828);
}

.welcome-hint-text {
  font-size: 15px;
  color: #666666; /* Force gray */
  margin: 0;
  line-height: 1.5;
}

.welcome-question strong {
  color: #EE9828; /* Keep orange accent */
}

/* ===== INPUT FIELDS ===== */
.welcome-input-group {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 20px 0;
}

.welcome-input {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  border: 2px solid #d1d1d6; /* Force gray border */
  border-radius: 8px;
  background: #f5f5f7; /* Force light gray background */
  color: #000000; /* Force black text */
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.welcome-input:focus {
  outline: none;
  border-color: #EE9828; /* Keep orange accent */
  box-shadow: 0 0 0 3px rgba(238, 152, 40, 0.2);
}

.welcome-input.error {
  border-color: #ff3b30;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.welcome-input-label {
  position: absolute;
  top: -10px;
  left: 12px;
  background: #ffffff; /* Force white */
  padding: 0 8px;
  font-size: 14px;
  color: #666666; /* Force gray */
  font-weight: 500;
}

/* ===== BUTTONS ===== */
.welcome-actions {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.welcome-btn {
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  min-width: 160px;
}

.welcome-btn-primary {
  background: #EE9828; /* Force orange */
  color: #000000; /* Force black */
}

.welcome-btn-primary:hover {
  background: #f5a940;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(238, 152, 40, 0.4);
}

.welcome-btn-primary:focus {
  outline: 3px solid rgba(238, 152, 40, 0.5);
  outline-offset: 2px;
}

.welcome-btn-secondary {
  background: transparent;
  color: #000000; /* Force black */
  border: 2px solid #d1d1d6; /* Force gray border */
}

.welcome-btn-secondary:hover {
  border-color: #000000; /* Force black */
  transform: translateY(-2px);
}

.welcome-btn-secondary:focus {
  outline: 3px solid rgba(0, 0, 0, 0.3);
  outline-offset: 2px;
}

.welcome-btn-tertiary {
  background: transparent;
  color: #666666; /* Force gray */
  border: 2px solid transparent;
  font-weight: 500;
}

.welcome-btn-tertiary:hover {
  color: #000000; /* Force black */
  border-color: #d1d1d6;
  transform: translateY(-2px);
}

.welcome-btn-tertiary:focus {
  outline: 3px solid rgba(0, 0, 0, 0.2);
  outline-offset: 2px;
}

/* ===== BUTTON LAYOUTS ===== */
/* Column layout for Screen 4 (3 vertical buttons) */
.welcome-actions-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto; /* Center the button column */
}

.welcome-actions-column .welcome-btn {
  width: 100%;
}

/* ===== LOADING SPINNER ===== */
.welcome-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  border-radius: 16px;
}

.welcome-loading-content {
  text-align: center;
}

.welcome-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #EE9828;
  border-radius: 50%;
  animation: welcome-spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes welcome-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.welcome-loading-content p {
  font-size: 16px;
  color: #666666;
  margin: 0;
}

/* ===== INLINE LOADING (for location detection) ===== */
.location-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 20px;
}

.welcome-inline-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #EE9828;
  border-radius: 50%;
  animation: welcome-spin 1s linear infinite;
}

.location-prompt {
  /* No special styles needed - just a wrapper for toggling */
}

/* ===== QR CODE ===== */
.welcome-qr-code {
  margin: 20px auto;
  padding: 20px;
  background: #ffffff;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-qr-code img {
  display: block;
  margin: 0 auto;
}

/* ===== PHOTO THUMBNAILS ===== */
.welcome-photo-thumbnails {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  height: 120px;
  position: relative;
}

.welcome-photo-thumb {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin: 0 -15px; /* Overlap effect */
  transition: transform 0.2s ease;
}

.welcome-photo-thumb:hover {
  transform: scale(1.1) translateY(-5px);
}

/* ===== HINT TEXT ===== */
.welcome-hint {
  font-size: 14px;
  color: #999999; /* Force gray */
  margin-top: 20px;
  font-style: italic;
}

/* ===== SKIP CONFIRMATION MODAL ===== */
.welcome-skip-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.welcome-skip-content {
  background: #ffffff; /* Force white */
  color: #000000; /* Force black */
  border-radius: 12px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.welcome-skip-content h2 {
  font-size: 28px;
  color: #000000; /* Force black */
  margin: 0 0 16px 0;
}

.welcome-skip-content p {
  font-size: 16px;
  color: #666666; /* Force gray */
  margin: 0 0 32px 0;
  line-height: 1.5;
}

.welcome-skip-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ===== REMOVE ALL LIGHT THEME OVERRIDES ===== */
/* No longer needed - always white */

/* ===== TV OPTIMIZATIONS ===== */
@media (min-width: 1200px) {
  .welcome-wizard-modal {
    max-width: 900px;
    max-height: 700px;
  }
  
  .welcome-title {
    font-size: 40px;
  }
  
  .welcome-subtitle,
  .welcome-question {
    font-size: 22px;
  }
  
  .welcome-btn {
    font-size: 20px;
    padding: 18px 36px;
  }
  
  .welcome-logo img {
    width: 240px;
  }
}

/* ===== PERMISSIONS SCREEN ===== */
.welcome-permissions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
  width: 100%;
  max-width: 400px;
}

.welcome-permission-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  transition: all 0.2s ease;
}

.welcome-permission-item.granted {
  background: #e8f5e9;
  border-color: #4caf50;
}

.welcome-permission-item.needed {
  background: #fff3e0;
  border-color: #ff9800;
}

.welcome-permission-icon {
  font-size: 24px;
  width: 32px;
  text-align: center;
}

.welcome-permission-item.granted .welcome-permission-icon {
  color: #4caf50;
}

.welcome-permission-item.needed .welcome-permission-icon {
  color: #ff9800;
}

.welcome-permission-label {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.welcome-permission-status {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.welcome-permission-item.granted .welcome-permission-status {
  color: #4caf50;
}

.welcome-permission-item.needed .welcome-permission-status {
  color: #ff9800;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
  .welcome-wizard-modal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  
  .welcome-screen {
    padding: 40px 20px;
  }
  
  .welcome-title {
    font-size: 28px;
  }
  
  .welcome-subtitle,
  .welcome-question {
    font-size: 16px;
  }
  
  .welcome-btn {
    font-size: 16px;
    padding: 14px 24px;
    min-width: 140px;
  }
  
  .welcome-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .welcome-btn {
    width: 100%;
  }
  
  /* Mobile photo thumbnails */
  .welcome-photo-thumbnails {
    height: 90px;
  }
  
  .welcome-photo-thumb {
    width: 75px;
    height: 75px;
    margin: 0 -10px;
  }
}
