/* PWA Install & Update Styles */

/* Install Button */
#pwa-install-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 12px 24px;
  background: linear-gradient(135deg, #7b79d9, #9d9ae0);
  color: white;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(123, 121, 217, 0.4);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulse-install 2s infinite;
}

#pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(123, 121, 217, 0.6);
}

#pwa-install-btn i {
  margin-right: 8px;
}

@keyframes pulse-install {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(123, 121, 217, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(123, 121, 217, 0.7);
  }
}

/* Update Banner */
.pwa-update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #7b79d9, #9d9ae0);
  color: white;
  padding: 12px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
}

.pwa-update-banner .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pwa-update-banner p {
  margin: 0;
  font-family: 'Nunito', sans-serif;
}

.pwa-update-banner button {
  background: white;
  color: #7b79d9;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-update-banner button:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

/* Thank You Banner */
.pwa-thank-you-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: white;
  color: #2d3436;
  padding: 16px 32px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.4s ease;
}

.pwa-thank-you-banner i {
  color: #00b894;
  margin-right: 8px;
}

.pwa-thank-you-banner p {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
}

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

/* Standalone mode adjustments */
@media (display-mode: standalone) {
  /* Add extra top padding for status bar on mobile */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  /* Hide install button when in standalone mode */
  #pwa-install-btn {
    display: none !important;
  }
}

/* iOS standalone mode */
@media (display-mode: standalone) and (max-width: 768px) {
  .navbar-fixed-top {
    padding-top: env(safe-area-inset-top);
  }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  #pwa-install-btn {
    bottom: 10px;
    right: 10px;
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .pwa-update-banner {
    font-size: 14px;
  }
  
  .pwa-update-banner .container {
    flex-direction: column;
    gap: 8px;
  }
}

/* Offline indicator */
.offline-indicator {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  background: #636e72;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.offline-indicator i {
  margin-right: 6px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
