/* ═══════════════════════════════════════════════════════════════════════════
   Flipbook Público — Estilos exclusivos do modo /livro/<uuid>/
   - Brand discreto na toolbar (substitui "Voltar")
   - 3 CTAs estratégicos (abertura, meio, fim) em modal elegante
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Brand no canto superior esquerdo (substitui "Voltar") ─────────────── */
.fb-public-brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(168,85,247,0.16), rgba(244,114,182,0.12));
  border: 1px solid rgba(168,85,247,0.30);
  color: #E9D5FF;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.01em;
  user-select: none;
}
.fb-public-brand svg { color: #F472B6; }

/* ═══════════════════════════════════════════════════════════════════════════
   CTA OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */
.fb-cta-overlay {
  position: fixed; inset: 0;
  z-index: 10000;
  display: none;
  align-items: center; justify-content: center;
  padding: 1.25rem;
  background: radial-gradient(
    120% 80% at 50% 50%,
    rgba(63, 42, 110, 0.72) 0%,
    rgba(15, 8, 35, 0.92) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fb-cta-overlay-in 220ms ease-out;
  font-family: 'Inter', system-ui, sans-serif;
}
.fb-cta-overlay.open { display: flex; }

@keyframes fb-cta-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Card central ─────────────────────────────────────────────────────── */
.fb-cta-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: linear-gradient(160deg, #1A1130 0%, #2A1547 100%);
  border: 1px solid rgba(168,85,247,0.40);
  border-radius: 22px;
  padding: 2.4rem 2rem 1.75rem;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.04),
    0 0 60px rgba(168,85,247,0.25);
  animation: fb-cta-card-in 320ms cubic-bezier(0.34, 1.4, 0.64, 1);
  overflow: hidden;
}

/* Brilho decorativo de fundo */
.fb-cta-card::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 20% 0%, rgba(244, 114, 182, 0.22), transparent 60%),
    radial-gradient(50% 70% at 90% 100%, rgba(168, 85, 247, 0.28), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.fb-cta-card > * { position: relative; z-index: 1; }

@keyframes fb-cta-card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Botão fechar (canto sup. direito) ──────────────────────────────── */
.fb-cta-close {
  position: absolute; top: 0.75rem; right: 0.85rem;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.78);
  font-size: 1.3rem; line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 160ms ease;
  z-index: 2;
}
.fb-cta-close:hover {
  background: rgba(168,85,247,0.20);
  border-color: rgba(168,85,247,0.40);
  color: #fff;
  transform: scale(1.05);
}

/* ── Ícone decorativo (sparkles) ────────────────────────────────────── */
.fb-cta-sparkle {
  width: 56px; height: 56px;
  margin: 0 auto 1.1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(244,114,182,0.20), rgba(168,85,247,0.12));
  border: 1px solid rgba(244,114,182,0.35);
  color: #F472B6;
  box-shadow: 0 4px 16px rgba(244,114,182,0.20);
  animation: fb-sparkle-pulse 2.4s ease-in-out infinite;
}
.fb-cta-sparkle svg {
  width: 28px; height: 28px;
}
@keyframes fb-sparkle-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ── Título ─────────────────────────────────────────────────────────── */
.fb-cta-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.7rem;
  background: linear-gradient(135deg, #F472B6, #C084FC);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ── Copy ───────────────────────────────────────────────────────────── */
.fb-cta-copy {
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
  color: rgba(226, 232, 240, 0.88);
  margin: 0 0 1.5rem;
}

/* ── Form ───────────────────────────────────────────────────────────── */
.fb-cta-form { margin: 0; }

.fb-cta-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(192, 132, 252, 0.85);
  margin-bottom: 0.45rem;
}

.fb-cta-input-row {
  display: flex; gap: 0.55rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,85,247,0.30);
  border-radius: 14px;
  padding: 0.35rem 0.4rem 0.35rem 0.95rem;
  transition: all 200ms ease;
}
.fb-cta-input-row:focus-within {
  background: rgba(255,255,255,0.06);
  border-color: rgba(244,114,182,0.55);
  box-shadow: 0 0 0 4px rgba(168,85,247,0.18);
}

.fb-cta-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.55rem 0;
}
.fb-cta-input::placeholder { color: rgba(255,255,255,0.35); }

.fb-cta-submit {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #A855F7, #EC4899);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 180ms ease;
  box-shadow: 0 4px 16px rgba(168,85,247,0.40);
  white-space: nowrap;
}
.fb-cta-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(244,114,182,0.50);
}
.fb-cta-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* ── Mensagem de feedback ───────────────────────────────────────────── */
.fb-cta-msg {
  font-size: 0.82rem;
  text-align: center;
  margin-top: 0.85rem;
  min-height: 1.2em;
  line-height: 1.4;
  font-weight: 500;
}
.fb-cta-msg.success { color: #6EE7B7; }
.fb-cta-msg.error   { color: #FCA5A5; }

/* ── Footnote ───────────────────────────────────────────────────────── */
.fb-cta-footnote {
  font-size: 0.7rem;
  text-align: center;
  color: rgba(203, 213, 225, 0.55);
  margin: 1.1rem 0 0;
  letter-spacing: 0.01em;
}

/* ── Responsivo ─────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .fb-cta-card { padding: 2rem 1.4rem 1.4rem; border-radius: 18px; }
  .fb-cta-title { font-size: 1.3rem; }
  .fb-cta-copy { font-size: 0.85rem; }
  .fb-cta-input-row {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
  }
  .fb-cta-input { width: 100%; }
  .fb-cta-submit { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESS RESTRICTED — /livro/<uuid>/ quando is_public=False ou UUID inválido
   ═══════════════════════════════════════════════════════════════════════════ */
.fb-ar-stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: radial-gradient(
    120% 80% at 50% 50%,
    rgba(63, 42, 110, 0.65) 0%,
    rgba(10, 6, 24, 0.96) 100%
  );
  font-family: 'Inter', system-ui, sans-serif;
  overflow: hidden;
  z-index: 9999;
}

/* Orbes decorativos com blur — sensação etérea */
.fb-ar-bg { position: absolute; inset: 0; pointer-events: none; }
.fb-ar-orb {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: fb-ar-float 14s ease-in-out infinite;
}
.fb-ar-orb-1 {
  top: -100px; left: -120px;
  background: radial-gradient(circle, rgba(168,85,247,0.55), transparent 70%);
}
.fb-ar-orb-2 {
  bottom: -120px; right: -100px;
  background: radial-gradient(circle, rgba(244,114,182,0.45), transparent 70%);
  animation-delay: -7s;
}
@keyframes fb-ar-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.08); }
}

/* ── Card ──────────────────────────────────────────────────────────── */
.fb-ar-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(160deg, rgba(26, 17, 48, 0.86) 0%, rgba(42, 21, 71, 0.92) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(168,85,247,0.40);
  border-radius: 24px;
  padding: 2.4rem 2rem 1.8rem;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.04),
    0 0 60px rgba(168,85,247,0.25);
  animation: fb-ar-in 360ms cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes fb-ar-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fb-ar-out {
  to { opacity: 0; transform: translateY(-12px) scale(0.98); }
}

/* Ícone superior (cadeado / check) */
.fb-ar-icon, .fb-ar-check {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px;
}
.fb-ar-icon {
  background: linear-gradient(135deg, rgba(244,114,182,0.20), rgba(168,85,247,0.12));
  border: 1px solid rgba(244,114,182,0.40);
  color: #F472B6;
  box-shadow: 0 6px 22px rgba(244,114,182,0.20);
}
.fb-ar-icon svg { width: 30px; height: 30px; }

.fb-ar-check {
  background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(16,185,129,0.10));
  border: 1px solid rgba(34,197,94,0.45);
  color: #6EE7B7;
  box-shadow: 0 6px 22px rgba(34,197,94,0.30);
  animation: fb-ar-check-pop 480ms cubic-bezier(0.34, 1.6, 0.64, 1);
}
.fb-ar-check svg { width: 30px; height: 30px; }
@keyframes fb-ar-check-pop {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

/* Título */
.fb-ar-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #F472B6, #C084FC);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fb-ar-title-success {
  background: linear-gradient(135deg, #6EE7B7, #34D399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fb-ar-copy {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(226,232,240,0.88);
  margin: 0 0 1.5rem;
}

/* ── Form: input + botão verde com blur ───────────────────────────── */
.fb-ar-form { margin: 0 0 0.4rem; }
.fb-ar-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(110, 231, 183, 0.85);
  margin-bottom: 0.5rem;
  text-align: left;
}
.fb-ar-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,85,247,0.30);
  border-radius: 14px;
  padding: 0.72rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #fff;
  outline: none;
  margin-bottom: 1rem;
  transition: all 200ms ease;
}
.fb-ar-input::placeholder { color: rgba(255,255,255,0.35); }
.fb-ar-input:focus {
  background: rgba(255,255,255,0.06);
  border-color: rgba(34,197,94,0.55);
  box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
}

/* Botão verde com glow blur — efeito "envolto em luz" */
.fb-ar-submit {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 220ms ease;
  overflow: visible;
  box-shadow:
    0 6px 22px rgba(16, 185, 129, 0.40),
    0 0 0 1px rgba(255,255,255,0.06) inset;
}
.fb-ar-submit-glow {
  position: absolute; inset: -8px;
  border-radius: 22px;
  background: radial-gradient(60% 80% at 50% 50%, rgba(16,185,129,0.55), transparent 75%);
  filter: blur(18px);
  opacity: 0.7;
  pointer-events: none;
  animation: fb-ar-glow-pulse 2.6s ease-in-out infinite;
  z-index: -1;
}
@keyframes fb-ar-glow-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.05); }
}
.fb-ar-submit-label {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.fb-ar-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 10px 30px rgba(16, 185, 129, 0.55),
    0 0 0 1px rgba(255,255,255,0.08) inset;
}
.fb-ar-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.fb-ar-msg {
  font-size: 0.82rem;
  margin-top: 0.85rem;
  min-height: 1.2em;
  text-align: center;
  font-weight: 500;
}
.fb-ar-msg.success { color: #6EE7B7; }
.fb-ar-msg.error   { color: #FCA5A5; }

/* ── Sucesso: divisor + link de cadastro ──────────────────────────── */
.fb-ar-divider {
  display: flex; align-items: center; gap: 0.85rem;
  margin: 1.4rem 0 1.1rem;
}
.fb-ar-divider::before,
.fb-ar-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.30), transparent);
}
.fb-ar-divider span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(192,132,252,0.75);
  font-weight: 600;
}

.fb-ar-cta-register {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(226,232,240,0.85);
  margin: 0 0 1.1rem;
}
.fb-ar-cta-register strong {
  color: #fff;
  font-weight: 700;
}

.fb-ar-register-btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: linear-gradient(135deg, #A855F7, #EC4899);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.5rem;
  border-radius: 14px;
  font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 200ms ease;
  box-shadow: 0 6px 22px rgba(168,85,247,0.40);
}
.fb-ar-register-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(244,114,182,0.55);
}

/* Rodapé do card */
.fb-ar-footnote {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin: 1.5rem 0 0;
  font-size: 0.72rem;
  color: rgba(192,132,252,0.55);
  letter-spacing: 0.04em;
}
.fb-ar-footnote svg { color: #F472B6; }

/* Mobile */
@media (max-width: 540px) {
  .fb-ar-card { padding: 1.9rem 1.4rem 1.4rem; border-radius: 20px; }
  .fb-ar-title { font-size: 1.3rem; }
  .fb-ar-copy { font-size: 0.85rem; }
  .fb-ar-orb { width: 280px; height: 280px; filter: blur(60px); }
}
