/* Vaulten PWA install card — top prompt with title, description, Install */
.v1-pwa-install-card {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  z-index: 99990;
  max-height: 96px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 36px 10px 12px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 12px 28px -4px rgba(15, 23, 42, 0.12);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.35;
  transform: translateY(calc(-120% - env(safe-area-inset-top, 0px)));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease;
}

.v1-pwa-install-card--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.v1-pwa-install-card[hidden] {
  display: none !important;
}

.v1-pwa-install-card__install:disabled {
  opacity: 0.72;
  cursor: wait;
}

.v1-pwa-install-card__install:not(.v1-pwa-install-card__install--ready) {
  opacity: 0.88;
}

@media (prefers-color-scheme: dark) {
  .v1-pwa-install-card {
    background: #1e293b;
    color: #f8fafc;
    border-color: rgba(248, 250, 252, 0.1);
    box-shadow:
      0 4px 6px -1px rgba(0, 0, 0, 0.25),
      0 12px 28px -4px rgba(0, 0, 0, 0.45);
  }

  .v1-pwa-install-card__desc {
    color: #94a3b8 !important;
  }

  .v1-pwa-install-card__close {
    color: #94a3b8 !important;
  }

  .v1-pwa-install-card__close:hover {
    background: rgba(248, 250, 252, 0.08) !important;
    color: #f8fafc !important;
  }
}

.v1-pwa-install-card__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v1-pwa-install-card__close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.v1-pwa-install-card__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
}

.v1-pwa-install-card__body {
  flex: 1;
  min-width: 0;
  padding-right: 4px;
}

.v1-pwa-install-card__title {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v1-pwa-install-card__desc {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v1-pwa-install-card__install {
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  min-width: 76px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
  transition: background 0.15s ease;
}

.v1-pwa-install-card__install:hover {
  background: #1d4ed8;
}

.v1-pwa-install-card__install:active {
  background: #1e40af;
}

.v1-pwa-install-card__install--ready {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), 0 1px 2px rgba(37, 99, 235, 0.2);
}

.v1-pwa-install-card__install--pulse {
  animation: v1-pwa-install-pulse 0.9s ease 2;
}

@keyframes v1-pwa-install-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.v1-pwa-install-card__install:disabled {
  opacity: 0.72;
  cursor: wait;
}
