/* Pop-up installazione PWA — Aggiungi a Home */
body.install-open {
  overflow: hidden;
}

.install-prompt {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.install-prompt.is-open {
  pointer-events: auto;
  opacity: 1;
}

.install-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 4, 0, 0.52);
  backdrop-filter: blur(3px);
}

.install-card {
  position: relative;
  width: min(400px, 100%);
  padding: 1.5rem 1.35rem 1.35rem;
  text-align: center;
  background: #ffde59;
  border: 2px solid rgba(66, 0, 0, 0.2);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(26, 4, 0, 0.35);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.28s ease;
}

.install-prompt.is-open .install-card {
  transform: translateY(0) scale(1);
}

.install-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  font-size: 1.45rem;
  line-height: 1;
  color: #420000;
  background: rgba(255, 255, 255, 0.65);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.install-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 0.65rem;
  filter: drop-shadow(0 4px 12px rgba(66, 0, 0, 0.2));
}

.install-card h2 {
  margin: 0 0 0.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: #420000;
}

.install-card > p {
  margin: 0 0 1rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #2b1712;
}

.install-steps {
  margin: 0 0 1.15rem;
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #2b1712;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  list-style: none;
}

.install-steps li {
  margin-bottom: 0.55rem;
  padding-left: 1.6rem;
  position: relative;
}

.install-steps li:last-child {
  margin-bottom: 0;
}

.install-steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  color: #ffde59;
  background: #420000;
  border-radius: 50%;
}

.install-steps {
  counter-reset: step;
}

.install-ico {
  font-style: normal;
}

.install-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-install-primary,
.btn-install-ghost {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.15s ease;
  touch-action: manipulation;
}

.btn-install-primary {
  color: #ffde59;
  background: #420000;
  border: 2px solid #420000;
}

.btn-install-primary:hover {
  background: #c0341d;
  border-color: #c0341d;
}

.btn-install-ghost {
  color: #420000;
  background: transparent;
  border: 2px solid rgba(66, 0, 0, 0.35);
}

.btn-install-ghost:hover {
  background: rgba(66, 0, 0, 0.08);
}

@media (min-width: 520px) {
  .install-prompt {
    align-items: center;
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .install-prompt,
  .install-card {
    transition: none;
  }
  .install-card {
    transform: none;
  }
}
