/* Conversa com a Carol — pop-up em liquid glass.
   Estrutura herdada do pop-up de diagnóstico da Legacy (overlay · card 480px · progresso · voltar/continuar · LGPD),
   com o design system Vinuso. Tudo escopado em .cv-* para não colidir com o site. */
.cv-overlay {
  --b50: #F7F5EF; --b100: #EAE5D7; --b200: #D7CBB1; --b300: #BFAC85; --b400: #AC9163; --b500: #A08156;
  --b600: #876747; --b700: #6D503B; --b800: #5D4436; --b900: #513C32; --b950: #2E1F1A;
  --s50: #FAF7F2; --s100: #F4EDE0; --s200: #EDE2CF; --s300: #D8BF99;
  --danger: #B4432F;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(30, 20, 16, 0.58);
  backdrop-filter: blur(12px) saturate(85%); -webkit-backdrop-filter: blur(12px) saturate(85%);
  font-family: "Inter", system-ui, sans-serif; letter-spacing: 0.02em; color: var(--b950);
  -webkit-font-smoothing: antialiased;
}
.cv-overlay *, .cv-overlay *::before, .cv-overlay *::after { box-sizing: border-box; }
.cv-overlay.is-open { display: flex; animation: cvFade 0.3s ease; }
@keyframes cvFade { from { opacity: 0; } to { opacity: 1; } }
html.cv-lock, html.cv-lock body { overflow: hidden; }

/* Página própria (/conversa): fundo com a foto da Carol desfocada */
.cv-overlay--page { background: var(--s100); backdrop-filter: none; -webkit-backdrop-filter: none; }
.cv-overlay--page::before { content: ""; position: fixed; inset: -40px; background: url("/assets/img/carolina-vinuso.webp") center 30% / cover; filter: blur(8px) saturate(0.9); opacity: 0.85; }
.cv-overlay--page::after { content: ""; position: fixed; inset: 0; background: linear-gradient(180deg, rgba(250, 247, 242, 0.25), rgba(237, 226, 207, 0.6)); }

.cv-svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Card (vidro) ---------- */
.cv-card {
  position: relative; z-index: 1; width: 100%; max-width: 480px;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 22px; padding: 28px 28px 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.93) 0%, rgba(253, 250, 245, 0.86) 45%, rgba(250, 247, 242, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 40px 80px -30px rgba(0, 0, 0, 0.55), 0 10px 30px -12px rgba(46, 31, 26, 0.22);
  backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
  animation: cvUp 0.4s var(--ease);
  scrollbar-width: thin; scrollbar-color: var(--b200) transparent;
}
.cv-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(120% 40% at 15% 0%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%); mix-blend-mode: soft-light; }
.cv-card > * { position: relative; }
@keyframes cvUp { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }

.cv-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; color: var(--b950); background: rgba(255, 255, 255, 0.65); box-shadow: 0 1px 0 #fff inset; transition: background 0.2s; }
.cv-close:hover { background: #fff; }
.cv-top { display: flex; align-items: center; gap: 14px; margin: -6px -8px 26px 0; }
.cv-progress { flex: 1; height: 6px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 0 1px rgba(160, 129, 86, 0.08) inset; }
.cv-progress span { display: block; height: 100%; width: var(--p, 10%); border-radius: inherit; background: linear-gradient(90deg, var(--b400), var(--b700)); transition: width 0.5s var(--ease); }

/* header da Carol (só na apresentação e no agradecimento) */
.cv-host { display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid rgba(160, 129, 86, 0.18); }
.cv-host img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; flex: none; }
.cv-host strong { display: block; font: 700 16px/1.3 "Maven Pro", system-ui, sans-serif; letter-spacing: 0; }
.cv-host span { display: block; font-size: 12.5px; color: var(--b700); }
.cv-host .cv-close { margin: -6px -8px 0 auto; align-self: flex-start; }

/* ---------- Passos ---------- */
.cv-step[hidden] { display: none; }
.cv-step { animation: cvStep 0.45s var(--ease); }
.cv-step.is-back { animation-name: cvStepBack; }
@keyframes cvStep { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes cvStepBack { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.cv-step:focus { outline: none; }

.cv-kicker { margin: 0 0 8px; font: 600 12px/1.3 "Inter", system-ui, sans-serif; letter-spacing: 0.04em; color: var(--b600); }
.cv-title { margin: 0 0 10px; font: 600 24px/1.14 "Maven Pro", system-ui, sans-serif; letter-spacing: -0.02em; color: var(--b950); text-wrap: balance; }
.cv-title:focus { outline: none; }
.cv-sub { margin: 0 0 28px; font-size: 14px; line-height: 1.55; color: var(--b700); }
.cv-sub:empty { display: none; }

/* apresentação: tudo centralizado, foto pequena à esquerda */
.cv-intro { text-align: center; }
.cv-intro .cv-title { max-width: 22ch; margin-inline: auto; }
.cv-intro .cv-text p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: var(--b700); }
.cv-quote { margin: 14px 0 0 !important; padding-top: 14px; border-top: 1px solid rgba(160, 129, 86, 0.25); font: 600 16px/1.35 "Maven Pro", system-ui, sans-serif !important; letter-spacing: -0.01em; color: var(--b950) !important; }
.cv-pill { display: inline-flex; align-items: center; gap: 6px; margin: 16px 0 18px; padding: 7px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 500; color: var(--b800); background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(255, 255, 255, 0.9); }
.cv-pill .cv-svg { width: 15px; height: 15px; }

/* ---------- Campos ---------- */
.cv-field { margin-bottom: 24px; }
.cv-field[hidden] { display: none; }
.cv-label { display: block; margin-bottom: 10px; font-size: 13.5px; font-weight: 600; line-height: 1.45; color: var(--b950); }
.cv-label em { font-style: normal; font-weight: 500; font-size: 11px; padding: 2px 8px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; background: rgba(255, 255, 255, 0.75); color: var(--b600); white-space: nowrap; }
.cv-input {
  width: 100%; padding: 15px 16px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.85); color: var(--b950); font: 500 15px/1.45 "Inter", system-ui, sans-serif; letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(46, 31, 26, 0.05) inset; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
textarea.cv-input { min-height: 150px; resize: vertical; }
.cv-title--solo { margin-bottom: 26px; }
.cv-input::placeholder { color: var(--b400); }
.cv-input:focus { outline: none; background: rgba(255, 255, 255, 0.92); border-color: var(--b400); box-shadow: 0 0 0 4px rgba(160, 129, 86, 0.18); }
.cv-prefix { margin: 0 0 10px; font: 600 18px/1.3 "Maven Pro", system-ui, sans-serif; letter-spacing: -0.01em; color: var(--b800); }

/* Sim / Não e escolhas: pílulas */
.cv-opts { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.cv-opt { position: relative; }
.cv-opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.cv-opt span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 99px;
  font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--b900);
  background: rgba(255, 255, 255, 0.8); border: 1.5px solid rgba(160, 129, 86, 0.18);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.cv-opt:hover span { background: rgba(255, 255, 255, 0.85); }
.cv-opt input:focus-visible + span { box-shadow: 0 0 0 4px rgba(160, 129, 86, 0.25); }
.cv-opt input:checked + span { background: var(--b950); border-color: var(--b950); color: var(--s50); }
.cv-opts--yn .cv-opt span { min-width: 84px; justify-content: center; }
.cv-opts--stack { flex-direction: column; }
.cv-opts--stack .cv-opt span { width: 100%; border-radius: 14px; }
.cv-opts--multi .cv-opt input:checked + span { background: var(--b100); border-color: var(--b400); color: var(--b950); }
.cv-opts--multi .cv-opt input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 700; color: var(--b700); }

/* perguntas Sim/Não em sequência: linha divisória suave */
.cv-field--yn + .cv-field--yn { padding-top: 20px; border-top: 1px solid rgba(160, 129, 86, 0.14); }

/* exemplos clicáveis (igual à Legacy) */
.cv-chips-label { margin: 12px 0 8px; font-size: 12px; font-weight: 600; color: var(--b600); }
.cv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cv-chip { padding: 7px 12px; border-radius: 99px; border: 1.5px solid rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.55); color: var(--b800); font: 500 12.5px "Inter", system-ui, sans-serif; cursor: pointer; transition: background 0.2s; }
.cv-chip:hover { background: rgba(255, 255, 255, 0.9); }
.cv-chip[aria-pressed="true"] { background: var(--b100); border-color: var(--b300); color: var(--b950); font-weight: 600; }

/* consentimento LGPD */
.cv-consent { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.45); border: 1px solid rgba(255, 255, 255, 0.8); font-size: 12.5px; line-height: 1.5; color: var(--b800); cursor: pointer; }
.cv-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--b950); cursor: pointer; }

.cv-error { display: none; margin: 8px 0 0; font-size: 12.5px; font-weight: 500; color: var(--danger); }
.cv-field.is-err .cv-error { display: block; }
.cv-field.is-err .cv-input { border-color: rgba(180, 67, 47, 0.6); box-shadow: 0 0 0 4px rgba(180, 67, 47, 0.1); }
.cv-field.is-err .cv-opt span { border-color: rgba(180, 67, 47, 0.45); }
.cv-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Ações ---------- */
.cv-actions { display: flex; gap: 10px; margin-top: 32px; }
.cv-intro .cv-actions { margin-top: 0; }
.cv-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 14px; cursor: pointer; text-decoration: none;
  background: var(--b950); color: var(--s50); font: 700 16px "Inter", system-ui, sans-serif; letter-spacing: 0.02em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 12px 28px -12px rgba(46, 31, 26, 0.6);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.cv-btn:hover { background: var(--b800); transform: translateY(-1px); }
.cv-btn .cv-svg { transition: transform 0.4s var(--ease); }
.cv-btn:hover .cv-svg { transform: translateX(4px); }
.cv-btn:focus-visible, .cv-back:focus-visible, .cv-close:focus-visible { outline: 3px solid var(--b500); outline-offset: 2px; }
.cv-btn[disabled] { opacity: 0.65; cursor: progress; transform: none; }
.cv-btn--soft { background: rgba(255, 255, 255, 0.6); color: var(--b950); box-shadow: none; border: 1.5px solid rgba(255, 255, 255, 0.9); }
.cv-btn--soft:hover { background: rgba(255, 255, 255, 0.9); }
.cv-spin { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(250, 247, 242, 0.3); border-top-color: var(--s50); border-radius: 50%; animation: cvSpin 0.7s linear infinite; }
.cv-btn.is-loading .cv-spin { display: inline-block; }
.cv-btn.is-loading .cv-svg { display: none; }
@keyframes cvSpin { to { transform: rotate(360deg); } }
.cv-back { flex: none; min-height: 52px; padding: 0 18px; border-radius: 14px; cursor: pointer; background: rgba(255, 255, 255, 0.55); border: 1.5px solid rgba(255, 255, 255, 0.9); color: var(--b900); font: 600 14px "Inter", system-ui, sans-serif; }
.cv-back:hover { background: rgba(255, 255, 255, 0.85); }
.cv-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 12.5px; font-weight: 500; color: var(--b700); text-align: center; }
.cv-note .cv-svg { width: 15px; height: 15px; }
.cv-net { display: none; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(180, 67, 47, 0.08); color: var(--danger); font-size: 13px; font-weight: 500; }
.cv-net.is-on { display: block; }
.cv-demo { margin: 0 0 16px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.6); border: 1px dashed var(--b300); font-size: 12px; color: var(--b700); text-align: center; }

/* ---------- Agradecimento ---------- */
.cv-thanks { text-align: center; }
.cv-heart { width: 64px; height: 64px; margin: 4px auto 16px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.7); box-shadow: 0 10px 24px -12px rgba(46, 31, 26, 0.35); }
.cv-heart svg { width: 30px; height: 30px; fill: var(--b600); stroke: none; animation: cvBeat 1.6s ease-in-out 0.3s 2; }
@keyframes cvBeat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } 60% { transform: scale(0.97); } }
.cv-thanks p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.65; color: var(--b800); }
.cv-thanks .cv-big { margin: 18px 0; font: 700 22px/1.2 "Maven Pro", system-ui, sans-serif; letter-spacing: 0.02em; color: var(--b950); }
.cv-thanks .cv-next { margin: 18px 0 22px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.85); font-size: 13.5px; text-align: left; }
.cv-thanks .cv-actions { flex-direction: column; }

@media (max-width: 520px) {
  /* No celular a tela inteira rola (não só o card): o topo e o ✕ ficam sempre alcançáveis,
     com margem garantida em cima, nas laterais e embaixo. */
  .cv-overlay { display: none; padding: calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .cv-overlay.is-open { display: block; }
  .cv-card { margin: 0 auto; max-height: none; overflow: visible; padding: 18px 16px 14px; border-radius: 22px; }
  /* elementos um pouco menores para caber mais na tela */
  .cv-top { margin: -4px -6px 16px 0; }
  .cv-close { width: 32px; height: 32px; font-size: 14px; }
  .cv-host { margin-bottom: 14px; padding-bottom: 12px; }
  .cv-host img { width: 44px; height: 44px; }
  .cv-host strong { font-size: 15px; }
  .cv-kicker { font-size: 11.5px; margin-bottom: 6px; }
  .cv-title { font-size: 19px; margin-bottom: 8px; }
  .cv-title--solo { margin-bottom: 18px; }
  .cv-sub { font-size: 13px; margin-bottom: 18px; }
  .cv-intro .cv-text p { font-size: 13.5px; line-height: 1.55; margin-bottom: 8px; }
  .cv-quote { font-size: 14.5px !important; margin-top: 10px !important; padding-top: 10px; }
  .cv-pill { margin: 12px 0 14px; }
  .cv-field { margin-bottom: 16px; }
  .cv-label { font-size: 13px; margin-bottom: 7px; }
  .cv-input { padding: 12px 14px; font-size: 16px; }
  textarea.cv-input { min-height: 110px; }
  .cv-opt span { min-height: 40px; padding: 8px 15px; font-size: 13.5px; }
  .cv-field--yn + .cv-field--yn { padding-top: 14px; }
  .cv-actions { margin-top: 20px; }
  .cv-btn, .cv-back { min-height: 48px; font-size: 15px; }
  .cv-back { padding: 0 14px; }
  .cv-note { margin-top: 12px; font-size: 11.5px; }
  .cv-consent-box { margin-top: 14px; }
  .cv-consent { padding: 10px 12px; font-size: 12px; }
  .cv-heart { width: 54px; height: 54px; margin-bottom: 12px; }
  .cv-thanks p { font-size: 13.5px; }
  .cv-thanks .cv-big { font-size: 19px; margin: 14px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-overlay.is-open, .cv-card, .cv-step, .cv-heart svg { animation: none !important; }
  .cv-progress span { transition: none; }
}

/* autorização abaixo do Continuar: pedido destacado quando ela tenta seguir sem autorizar */
.cv-consent-box { margin-top: 18px; border-radius: 16px; transition: box-shadow 0.4s, background 0.4s; }
.cv-consent-box .cv-field { margin-bottom: 0; }
.cv-consent-ask { display: none; margin: 0 0 10px; font-size: 13.5px; font-weight: 600; line-height: 1.45; color: var(--b900); }
.cv-consent-box.is-asking { padding: 14px; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 2px var(--b500), 0 12px 30px -14px rgba(46, 31, 26, 0.45); animation: cvAsk 1.2s var(--ease) 2; }
.cv-consent-box.is-asking .cv-consent-ask { display: block; }
.cv-consent-box.is-asking .cv-consent { background: #fff; border-color: var(--b300); font-weight: 600; color: var(--b950); }
.cv-consent-box.is-ok { padding: 14px; background: rgba(221, 230, 213, 0.6); box-shadow: 0 0 0 2px #7FB58A; }
@keyframes cvAsk { 0%, 100% { box-shadow: 0 0 0 2px var(--b500), 0 12px 30px -14px rgba(46, 31, 26, 0.45); } 50% { box-shadow: 0 0 0 6px rgba(160, 129, 86, 0.35), 0 12px 30px -14px rgba(46, 31, 26, 0.45); } }
@media (prefers-reduced-motion: reduce) { .cv-consent-box.is-asking { animation: none; } }
