/* Floating PWA install bubble — does not affect page layout */
.nc-pwa {
  position: fixed;
  top: 50%;
  right: max(12px, env(safe-area-inset-right, 0px));
  left: auto;
  bottom: auto;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.nc-pwa[hidden] {
  display: none !important;
}

.nc-pwa-card {
  pointer-events: auto;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 132px;
  padding: 0.7rem 0.5rem 0.6rem;
  overflow: visible;
  text-align: center;
  background: radial-gradient(circle at 35% 28%, #1aa39a 0%, #0e7c7b 68%, #0a6463 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(14, 124, 123, 0.12),
    0 0 18px rgba(14, 124, 123, 0.12);
  animation: nc-pwa-in 0.38s ease-out, nc-pwa-float 3.2s ease-in-out 0.38s infinite;
}

.nc-pwa-card::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 58%;
  width: 14px;
  height: 14px;
  background: #0e7c7b;
  border-radius: 4px 0 8px 0;
  box-shadow: -3px 4px 10px rgba(15, 23, 42, 0.08);
  transform: rotate(42deg);
}

.nc-pwa-card::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 22px;
  width: 32px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.nc-pwa-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(14, 124, 123, 0.22);
}

.nc-pwa-title {
  margin: 0.22rem 0 0;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.15;
}

.nc-pwa-sub {
  margin: 0.08rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.48rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nc-pwa-ios {
  margin: 0.14rem 0 0;
  max-width: 6.8rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.44rem;
  font-weight: 500;
  line-height: 1.25;
}

.nc-pwa-ios[hidden] {
  display: none !important;
}

.nc-pwa-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.7rem;
  margin-top: 0.22rem;
  padding: 0.22rem 0.5rem;
  border: 0;
  border-radius: 999px;
  background: #ff6b5b;
  color: #ffffff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(255, 107, 91, 0.7);
}

.nc-pwa-install:hover {
  transform: scale(1.03);
}

.nc-pwa-install:active {
  transform: scale(0.97);
}

@keyframes nc-pwa-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.86);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes nc-pwa-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 420px) {
  .nc-pwa {
    right: max(8px, env(safe-area-inset-right, 0px));
  }

  .nc-pwa-card {
    width: 116px;
    height: 116px;
    padding: 0.55rem 0.4rem 0.5rem;
  }

  .nc-pwa-logo {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nc-pwa-card {
    animation: none;
  }
}
