/**
 * PWA Install Styles
 * Floating install button and iOS modal
 */

/* Floating Install Button */
.pwa-install-button {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: none;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.pwa-install-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 90vw;
}

.pwa-install-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.pwa-install-content:active {
  transform: translateY(0);
}

.pwa-install-icon {
  font-size: 28px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.pwa-install-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.pwa-install-text strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.pwa-install-text small {
  font-size: 12px;
  opacity: 0.9;
}

.pwa-install-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pwa-install-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* iOS Install Modal */
.pwa-ios-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.pwa-ios-modal-content {
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 25px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  animation: slideUpModal 0.4s ease-out;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.pwa-ios-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  color: #333;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pwa-ios-modal-close:hover {
  background: #e0e0e0;
  transform: scale(1.1);
}

.pwa-ios-modal-content h3 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 22px;
  font-weight: 600;
}

.pwa-ios-modal-content p {
  color: #7f8c8d;
  margin: 0 0 20px 0;
  font-size: 15px;
  line-height: 1.5;
}

.pwa-ios-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.pwa-ios-steps li {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.pwa-ios-steps li:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.pwa-ios-steps .step-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pwa-ios-steps span:last-child {
  flex: 1;
  color: #2c3e50;
  font-size: 14px;
  line-height: 1.4;
}

.pwa-ios-steps strong {
  color: #007bff;
  font-weight: 600;
}

.pwa-ios-got-it {
  margin: 0;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
}

/* Desktop - show in header instead of floating */
@media (min-width: 768px) {
  .pwa-install-button {
    position: static;
    transform: none;
    display: inline-flex;
  }

  .pwa-install-content {
    padding: 8px 16px;
    font-size: 14px;
  }

  .pwa-install-icon {
    font-size: 20px;
  }

  .pwa-install-text strong {
    font-size: 13px;
  }

  .pwa-install-text small {
    font-size: 11px;
  }
}

/* Hide on very small screens to avoid overlap */
@media (max-width: 360px) {
  .pwa-install-content {
    padding: 10px 15px;
    gap: 8px;
  }

  .pwa-install-text small {
    display: none;
  }
}

/* Standalone mode adjustments */
@media (display-mode: standalone) {
  .pwa-install-button {
    display: none !important;
  }
}
