/* css/conversion-popup.css — Persönliches Conversion-Pop-up (preise.html) */

/* ── Wrapper — bottom center ──────────────────────────────── */
.conv-popup {
  position: fixed;
  bottom: 1.75rem;
  left: 0;
  right: 0;
  margin: 0 auto; /* centers a fixed element when left:0 + right:0 are both set */
  z-index: 9050;
  width: min(520px, calc(100vw - 2.5rem));
  pointer-events: none;
}

.conv-popup:not([hidden]) {
  pointer-events: auto;
}

.conv-popup[hidden] {
  display: none;
}

/* ── Card ─────────────────────────────────────────────────── */
.conv-popup__card {
  background: var(--c-black, #0a0a0b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.5rem 1.6rem 1.45rem;
  position: relative;
  animation: cpIn 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.conv-popup__card.is-leaving {
  animation: cpOut 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Green accent line at top */
.conv-popup__card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 2rem;
  right: 2rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--avio-green, #1ea336) 30%, var(--avio-green, #1ea336) 70%, transparent);
  border-radius: 0 0 2px 2px;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes cpIn {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes cpOut {
  to { opacity: 0; transform: translateY(14px) scale(0.97); }
}

/* ── Close button ─────────────────────────────────────────── */
.conv-popup__close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  padding: 0;
  line-height: 1;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

.conv-popup__close:hover {
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.85);
}

/* ── Personal header ──────────────────────────────────────── */
.conv-popup__header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  padding-right: 2.5rem; /* space for close btn */
}

.conv-popup__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(30, 163, 54, 0.4);
  flex-shrink: 0;
}

.conv-popup__from {
  display: flex;
  align-items: center;
}

.conv-popup__from-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* ── Content ──────────────────────────────────────────────── */
.conv-popup__headline {
  font-size: 1.18rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.26;
  letter-spacing: -0.024em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

.conv-popup__text {
  font-size: 0.855rem;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

/* ── Actions ──────────────────────────────────────────────── */
.conv-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Primary CTA */
.conv-popup__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  background: var(--avio-green, #1ea336);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(30, 163, 54, 0.32);
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .conv-popup__cta:hover {
    background: #22c43e;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(30, 163, 54, 0.44);
  }
}

/* WhatsApp secondary link */
.conv-popup__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.32);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: color 0.18s, background 0.18s;
}

.conv-popup__wa:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.conv-popup__wa svg {
  flex-shrink: 0;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 560px) {
  .conv-popup {
    bottom: 0;
    width: 100%;
    border-radius: 0;
  }

  .conv-popup__card {
    border-radius: 20px 20px 0 0;
    padding: 1.4rem 1.35rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
    animation: cpInMobile 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .conv-popup__card.is-leaving {
    animation: cpOutMobile 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
  }

  .conv-popup__card::before {
    border-radius: 20px 20px 0 0;
    left: 1.5rem;
    right: 1.5rem;
  }

  @keyframes cpInMobile {
    from { opacity: 0; transform: translateY(52px); }
    to   { opacity: 1; transform: none; }
  }

  @keyframes cpOutMobile {
    to { opacity: 0; transform: translateY(52px); }
  }

  .conv-popup__headline {
    font-size: 1rem;
  }

  .conv-popup__avatar {
    width: 46px;
    height: 46px;
  }
}
