/* CaloriesSnap v2.26 - Professional Install Modal */

/* Install Modal Overlay */
.install-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.install-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.install-modal {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  padding: 40px 30px;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.install-modal-overlay.active .install-modal {
  transform: scale(1);
}

.install-modal-header {
  text-align: center;
  margin-bottom: 30px;
}

.install-modal-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.install-modal-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin: 0 0 8px 0;
}

.install-modal-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.install-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

.install-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.install-steps {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.install-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  animation: slideIn 0.5s ease forwards;
  opacity: 0;
}

.install-step:nth-child(1) { animation-delay: 0.1s; }
.install-step:nth-child(2) { animation-delay: 0.2s; }
.install-step:nth-child(3) { animation-delay: 0.3s; }
.install-step:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.install-step:last-child {
  margin-bottom: 0;
}

.install-step-number {
  width: 32px;
  height: 32px;
  background: white;
  color: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  margin-right: 16px;
}

.install-step-content {
  flex: 1;
}

.install-step-title {
  color: white;
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.install-step-icon {
  font-size: 20px;
}

.install-step-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.install-modal-actions {
  display: flex;
  gap: 12px;
}

.install-modal-button {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.install-modal-button.primary {
  background: white;
  color: #667eea;
}

.install-modal-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.install-modal-button.secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.install-modal-button.secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Platform specific styling */
.install-modal.ios .install-modal-icon {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.install-modal.android .install-modal {
  background: linear-gradient(135deg, #34a853 0%, #137333 100%);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .install-modal {
    padding: 32px 24px;
    margin: 0 16px;
    max-height: 85vh;
    overflow-y: auto;
  }
  
  .install-modal-title {
    font-size: 24px;
  }
  
  .install-modal-icon {
    font-size: 48px;
  }
  
  .install-modal-actions {
    flex-direction: column;
  }
  
  .install-modal-button {
    width: 100%;
  }
}

/* Animation for success */
.install-success {
  text-align: center;
  padding: 40px 20px;
}

.install-success-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.install-success-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px 0;
}

.install-success-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 30px 0;
}

/* Loading state */
.install-modal-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.install-modal-button .spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.install-modal-button.primary .spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
}

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

/* Highlight effect for important text */
.highlight {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* Device frame illustration */
.device-frame {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}

.device-frame img {
  max-width: 100%;
  border-radius: 8px;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .install-modal-overlay {
    background: rgba(0, 0, 0, 0.85);
  }
}
