/* PWA-specific styles */

/* Update and success notifications */
.update-notification, .install-success-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: slide-in 0.3s ease-out;
}

.update-notification {
  background-color: var(--primary-color);
  color: white;
}

.install-success-notification {
  background-color: var(--success-color, #28a745);
  color: white;
}

.update-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.update-content p {
  margin: 0;
}

#update-button {
  background-color: white;
  color: var(--primary-color);
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

#update-button:hover {
  background-color: #eaeaea;
}

/* Install button */
#pwa-install-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9900;
  padding: 10px;
  border-radius: 8px;
  animation: slide-in 0.3s ease-out;
}

/* Fixed position for install button when in app view */
.pwa-install-fixed {
  display: block !important;
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  left: auto !important;
  z-index: 9999 !important;
}

#install-pwa {
  background-color: var(--accent-color);
  color: var(--text-primary-color);
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

#install-pwa:before {
  content: "📲";
  font-size: 1.2rem;
}

#install-pwa:hover {
  background-color: #1bd9bf;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Offline indicator */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--warning-color);
  color: white;
  text-align: center;
  padding: 8px;
  font-weight: bold;
  z-index: 9999;
}

/* Animations */
@keyframes slide-in {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Fallback install dialog */
.pwa-install-fallback {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.3s ease-out;
}

.fallback-content {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 90%;
  width: 350px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.fallback-content h4 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.4rem;
}

.fallback-content ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.fallback-content li {
  margin-bottom: 8px;
}

#close-fallback {
  width: 100%;
  padding: 12px;
  border: none;
  background-color: var(--primary-color);
  color: white;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .update-notification {
    bottom: 0;
    right: 0;
    left: 0;
    border-radius: 0;
  }
  
  .update-content {
    flex-direction: column;
    gap: 10px;
  }
  
  #update-button {
    width: 100%;
    padding: 10px;
  }
  
  .fallback-content {
    max-width: 95%;
    width: 320px;
    padding: 15px;
  }
}