/* PWA Install Floating Button */
.pwa-install-floating {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4);
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  animation: pulse-install 2s infinite;
}

.pwa-install-floating:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 123, 255, 0.6);
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.pwa-install-floating:active {
  transform: scale(0.95);
}

/* Pulse animation for attention */
@keyframes pulse-install {
  0% {
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.8), 0 0 0 10px rgba(0, 123, 255, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4);
  }
}

/* Tooltip for better UX */
.pwa-install-floating::before {
  content: "Ana Ekrana Ekle";
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.pwa-install-floating::after {
  content: "";
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pwa-install-floating:hover::before,
.pwa-install-floating:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Icon inside the button */
.pwa-install-floating .install-icon {
  font-size: 28px;
  line-height: 1;
}

/* Alternative larger button with text */
.pwa-install-floating.with-text {
  width: auto;
  height: 50px;
  padding: 0 20px;
  border-radius: 25px;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

.pwa-install-floating.with-text .install-icon {
  font-size: 20px;
}

.pwa-install-floating.with-text::before {
  display: none;
}

/* Hide button by default */
.pwa-install-container.d-none {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pwa-install-floating {
    bottom: 90px; /* Avoid bottom navigation if present */
    right: 15px;
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
  
  .pwa-install-floating::before {
    right: 66px;
    font-size: 13px;
    padding: 6px 10px;
  }
  
  .pwa-install-floating::after {
    right: 56px;
  }
}

/* Dark mode support */
.dark-mode .pwa-install-floating {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
}

.dark-mode .pwa-install-floating:hover {
  background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
  box-shadow: 0 6px 25px rgba(40, 167, 69, 0.6);
}

@keyframes pulse-install-dark {
  0% {
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.8), 0 0 0 10px rgba(40, 167, 69, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
  }
}

.dark-mode .pwa-install-floating {
  animation: pulse-install-dark 2s infinite;
}

/* Success state when installed */
.pwa-install-floating.installed {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  animation: none;
}

.pwa-install-floating.installed::before {
  content: "Yüklendi!";
}