/* PWA Styles */

/* Install Button */
.pwa-install-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pwa-install-btn:active {
  transform: translateY(0);
}

/* PWA Messages */
.pwa-message {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
}

.pwa-message.success {
  background: linear-gradient(135deg, #4caf50, #45a049);
}

.pwa-message.update {
  background: linear-gradient(135deg, #2196f3, #1976d2);
}

.pwa-message button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
}

.pwa-message button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Network Status Bar */
.pwa-network-status {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: white;
  animation: slideDown 0.3s ease-out;
}

.pwa-network-status.offline {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.pwa-network-status.online {
  background: linear-gradient(135deg, #4caf50, #45a049);
}

/* PWA Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
  .pwa-message {
    left: 10px;
    right: 10px;
    top: 10px;
    max-width: none;
  }
  
  .pwa-install-btn {
    font-size: 13px;
    padding: 10px 20px;
  }
}

/* PWA specific layout adjustments */
@media (display-mode: standalone) {
  /* Adjust for standalone app */
  body {
    padding-top: 0;
  }
  
  /* Add status bar padding for iOS */
  @supports (padding-top: env(safe-area-inset-top)) {
    body {
      padding-top: env(safe-area-inset-top);
    }
  }
}

/* Loading spinner for PWA operations */
.pwa-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

/* PWA Icon styles */
.pwa-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
} 