/* ──────────────────────────────────────────────────────────────────────────
   Convites — sistema de engajamento subtil (Premium · Instagram · WhatsApp · Topics)
   Dois formatos: cartão inline (passivo) + bottom-sheet (raro, após uma "vitória").
   Tema Dossiê (tokens --paper / --card / --ink / --c / --gold / --line-2 ...).
   ────────────────────────────────────────────────────────────────────────── */

/* Slots inline vazios não ocupam espaço. */
[data-convite-slot]:empty { display: none !important; }

/* ── Logo / chip (tile branco; logos da marca centrados) ── */
.cv-logo {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px;
  background: #fff; border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cv-logo img, .cv-logo svg { width: 32px; height: 32px; display: block; }
.cv-logo.cv-prem {
  background: linear-gradient(135deg, var(--gold), #a9781f);
  border-color: transparent; color: #1a1d22;
}
.cv-logo.cv-prem svg { width: 26px; height: 26px; }

/* ── CTA ── */
/* Base = neutro, só outline (sem fundo) — usado pelos convites de comunidade (IG/WhatsApp/Topics). */
.cv-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  padding: 8px 14px; border-radius: 10px;
  background: transparent; color: var(--ink); border: 1.5px solid var(--line-2);
  transition: background .15s, border-color .15s; cursor: pointer;
}
.cv-cta:hover { background: var(--paper-2, #efe9da); border-color: var(--ink-3); }
/* Premium mantém-se preenchido (dourado) — é o de conversão. */
.cv-cta.cv-cta-prem { background: var(--gold); border-color: var(--ink); color: var(--ink); font-weight: 700; }
.cv-cta.cv-cta-prem:hover { background: var(--gold); border-color: var(--ink); filter: brightness(.96); }
.cv-cta svg { width: 15px; height: 15px; }

/* ── Cartão inline ── */
.cv-card {
  position: relative; display: flex; gap: 13px; align-items: center;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 16px; padding: 14px 15px;
}
.cv-card .cv-body { flex: 1; min-width: 0; }
.cv-card .cv-title { font-weight: 600; font-size: 14.5px; color: var(--ink); line-height: 1.25; padding-right: 18px; }
.cv-card .cv-text { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin-top: 3px; }
.cv-card .cv-cta { margin-top: 10px; }
.cv-x {
  position: absolute; top: 8px; right: 9px; width: 26px; height: 26px;
  border: none; background: none; color: var(--ink-3); cursor: pointer;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.cv-x:hover { background: var(--paper-2, #efe9da); color: var(--ink); }

/* ── Bottom-sheet (raro) ── */
.cv-sheet-back {
  position: fixed; inset: 0; background: rgba(20,20,22,.42);
  z-index: 5000; opacity: 0; transition: opacity .25s;
}
.cv-sheet-back.show { opacity: 1; }
.cv-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5001;
  background: var(--paper); border-top-left-radius: 22px; border-top-right-radius: 22px;
  padding: 8px 20px calc(env(safe-area-inset-bottom, 0px) + 22px);
  box-shadow: 0 -10px 40px rgba(0,0,0,.22);
  transform: translateY(110%); transition: transform .32s cubic-bezier(.22,1,.36,1);
  max-width: 520px; margin: 0 auto;
}
.cv-sheet.show { transform: translateY(0); }
.cv-grip { width: 40px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 9px auto 16px; }
.cv-sheet .cv-logo { width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 15px; }
.cv-sheet .cv-logo img, .cv-sheet .cv-logo svg { width: 42px; height: 42px; }
.cv-sheet .cv-logo.cv-prem svg { width: 34px; height: 34px; }
.cv-sheet h3 {
  font-family: var(--font-display, 'Instrument Serif', serif); font-weight: 400;
  font-size: 24px; color: var(--ink); text-align: center; margin: 0 0 7px; line-height: 1.15;
}
.cv-sheet p {
  font-size: 13.5px; color: var(--ink-2); text-align: center;
  line-height: 1.5; margin: 0 auto 19px; max-width: 340px;
}
.cv-sheet .cv-actions { display: flex; flex-direction: column; gap: 8px; }
.cv-sheet .cv-cta { justify-content: center; padding: 13px; font-size: 14.5px; border-radius: 13px; }
.cv-sheet .cv-skip {
  background: none; border: none; color: var(--ink-3);
  font-size: 13px; font-family: var(--font-mono, monospace); cursor: pointer; padding: 9px;
}
.cv-sheet .cv-skip:hover { color: var(--ink-2); }

/* Desktop: sheet vira modal centrado. */
@media (min-width: 560px) {
  .cv-sheet {
    bottom: auto; top: 50%; left: 50%; right: auto; width: 420px;
    border-radius: 22px; padding: 26px 26px 24px;
    transform: translate(-50%, -46%) scale(.96); opacity: 0;
    transition: opacity .25s, transform .28s cubic-bezier(.22,1,.36,1);
  }
  .cv-sheet.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .cv-grip { display: none; }
}
