/* =========================================================================
   Guia OS · embed inline — layout do designer (O Segredo).
   Dois estados: MINIMIZADO (barra escura .osgc-seed) e MAXIMIZADO
   (card creme .osgc-chatcard). A barra EXPANDE no lugar (in-flow, estilo
   signo): o card cresce dentro do próprio container. Nada de position:fixed.
   A expansão é disparada por clique/foco → o reflow não conta como CLS.
   Avatar usa a marca do O Segredo (cadeado) no lugar do robô.
   Classes .osgc-* preservam os hooks do JS; visual = mockup aprovado.
   ========================================================================= */
.osgc-embed, .osgc-embed *{ box-sizing:border-box; }
.osgc-embed{
  --coral:#ff532c; --coral-2:#ff6a3d; --coral-deep:#e23d18;
  --ink:#1c1814; --ink-2:#4a423a; --muted:#847a6e; --soft:#a89a83;
  --cream:#f5f1ea; --cream-2:#efeae1; --paper:#fff; --paper-warm:#faf7f1;
  --dark:#1c1512; --dark-2:#120c0a; --hair:#e7dfd2; --line:#ece4d6;
  --green:#3ecf6a;
  --gf-sans:"Figtree",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --gf-mono:"Geist Mono",ui-monospace,Menlo,Consolas,monospace;
  --radius:22px;
  margin:22px 0; font-family:var(--gf-sans);
}
.osgc-embed--dark{ margin:22px clamp(20px,3vw,36px); }

/* Avatar da marca (cadeado O Segredo) — quadrado arredondado escuro. */
.osgc-av{ width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit; }

/* =========================================================================
   MINIMIZADO — barra escura (destaca no meio do conteúdo, não some)
   ========================================================================= */
.osgc-seed{
  display:flex; align-items:center; gap:16px;
  border-radius:var(--radius); padding:18px 22px;
  background:
    radial-gradient(90% 200% at 6% 30%, rgba(255,83,44,.16), transparent 40%),
    linear-gradient(120deg,var(--dark),var(--dark-2));
  border:1px solid rgba(255,255,255,.05);
}
.osgc-seed__bot{
  width:64px; height:64px; border-radius:26%; flex-shrink:0; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center; background:var(--dark);
}
.osgc-seed__mid{ flex:1; min-width:0; display:flex; flex-direction:column; gap:12px; }
.osgc-seed__tag{
  display:inline-flex; align-items:center; gap:9px;
  font-family:var(--gf-mono); font-size:12px; font-weight:600; letter-spacing:.16em;
  text-transform:uppercase; color:rgba(255,255,255,.72);
}
.osgc-seed__tag b{ color:var(--green); font-weight:600; }
.osgc-seed__dot{ width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 8px var(--green); }
.osgc-seed__form{ display:flex; align-items:center; gap:12px; }
.osgc-seed__field{ flex:1; min-width:0; display:flex; align-items:center; height:52px; padding:0 20px; border-radius:999px; background:var(--paper); }
.osgc-seed__input{ flex:1; min-width:0; height:100%; border:0; outline:0; background:transparent; font-family:var(--gf-sans); font-size:15px; color:var(--ink); }
.osgc-seed__input::placeholder{ color:var(--soft); }
.osgc-seed__field:focus-within{ box-shadow:0 0 0 3px rgba(255,255,255,.14); }
.osgc-seed__send{
  width:52px; height:52px; flex-shrink:0; border:0; cursor:pointer; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; transition:.16s;
  background:linear-gradient(135deg,var(--coral-2),var(--coral-deep)) !important; color:#fff !important;
}
.osgc-seed__send:hover{ filter:brightness(1.07); transform:scale(1.05); }
.osgc-seed__send svg{ width:19px; height:19px; }
.osgc-seed__hint{
  margin-top:2px; display:inline-flex; align-items:center; gap:6px;
  font-family:var(--gf-sans); font-size:11px; color:rgba(255,255,255,.45);
}
.osgc-seed__hint svg{ width:12px; height:12px; color:var(--coral-2); flex-shrink:0; }
.osgc-seed__hint kbd{
  font-family:var(--gf-mono); font-size:9.5px; padding:1px 6px; border-radius:4px;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.16); color:rgba(255,255,255,.7);
}
/* Mobile: a marca fica AO LADO da conversa (como se O Segredo estivesse falando
   com a pessoa). Antes o flex-wrap + flex-basis:100% empurravam a logo para uma
   linha só dela, criando um bloco escuro alto e vazio no meio da leitura. */
@media (max-width:560px){
  .osgc-seed{ flex-wrap:nowrap; align-items:center; gap:12px; padding:14px; }
  .osgc-seed__bot{ width:46px; height:46px; }
  .osgc-seed__mid{ flex:1 1 auto; min-width:0; gap:8px; }
  .osgc-seed__tag{ font-size:10.5px; letter-spacing:.1em; }
  .osgc-seed__field{ height:46px; padding:0 16px; }
  .osgc-seed__input{ font-size:14px; }
  .osgc-seed__send{ width:46px; height:46px; }
  .osgc-seed__send svg{ width:17px; height:17px; }
  .osgc-seed__hint{ font-size:10px; gap:5px; }
}
/* Telas bem estreitas: a linha de aviso vira só o essencial. */
@media (max-width:400px){
  .osgc-seed__hint kbd{ display:none; }
  .osgc-seed__hint{ font-size:9.5px; }
}

/* =========================================================================
   MAXIMIZADO — card creme, in-flow (a barra some, o card aparece)
   ========================================================================= */
.osgc-chatcard{ display:none; }
.osgc-embed.is-expanded .osgc-seed{ display:none; }
.osgc-embed.is-expanded .osgc-chatcard{
  display:flex; flex-direction:column; overflow:hidden;
  border-radius:var(--radius); background:var(--cream); border:1px solid rgba(0,0,0,.06);
  animation:osgc-grow .2s ease-out;
}
@keyframes osgc-grow{ from{ opacity:.4; transform:translateY(8px); } to{ opacity:1; transform:none; } }

/* Cabeçalho escuro (compacto) */
.osgc-cc__head{
  display:flex; align-items:center; gap:15px; padding:14px 20px;
  background:
    radial-gradient(120% 180% at 92% 0%, rgba(255,83,44,.18), transparent 55%),
    linear-gradient(120deg,var(--dark),var(--dark-2));
}
.osgc-cc__bot{ width:50px; height:50px; border-radius:26%; flex-shrink:0; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center; background:var(--dark); }
.osgc-cc__id{ flex:1; min-width:0; }
/* Blindagem contra o tema: ele força margin/line-height/cor grandes nos títulos
   do conteúdo, o que inflava o topo escuro e deixava o "Guia OS" quase invisível
   (escuro no escuro). Fixa tudo aqui. */
.osgc-embed .osgc-chatcard .osgc-cc__id h3{ margin:0 0 2px !important; padding:0 !important; font-family:var(--gf-sans) !important; font-size:19px !important; font-weight:800 !important; letter-spacing:-.01em !important; color:#fff !important; line-height:1.15 !important; }
.osgc-cc__status{ display:inline-flex; align-items:center; gap:7px; font-family:var(--gf-mono); font-size:11.5px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--green); margin:0 !important; line-height:1.2 !important; }
.osgc-embed .osgc-av{ margin:0 !important; max-width:100% !important; border-radius:inherit !important; }
.osgc-cc__status i{ position:relative; width:7px; height:7px; border-radius:50%; background:var(--green); }
.osgc-cc__status i::after{ content:""; position:absolute; inset:-4px; border-radius:50%; border:1px solid rgba(62,207,106,.5); animation:osgc-pg 2.4s ease-out infinite; }
@keyframes osgc-pg{ 0%{ inset:-2px; opacity:.8; } 100%{ inset:-9px; opacity:0; } }
.osgc-cc__min{ width:40px; height:40px; flex-shrink:0; border:0; cursor:pointer; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; transition:.16s;
  background:rgba(255,255,255,.08); color:#fff; }
.osgc-cc__min:hover{ background:rgba(255,255,255,.16); }
.osgc-cc__min svg{ width:18px; height:18px; }

/* Corpo creme com mensagens */
.osgc-cc__thread{ padding:24px; display:flex; flex-direction:column; gap:14px; background:var(--cream);
  overflow-y:auto; max-height:min(56vh,460px); -webkit-overflow-scrolling:touch; }
.osgc-pmsg{ display:flex; gap:14px; align-items:flex-start; max-width:92%; }
.osgc-pmsg--me{ align-self:flex-end; flex-direction:row-reverse; max-width:80%; }
.osgc-pmsg__bot{ width:46px; height:46px; border-radius:26%; flex-shrink:0; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center; background:var(--dark); }
.osgc-pbubble{ padding:16px 20px; border-radius:6px 18px 18px 18px; background:var(--paper); border:1px solid var(--line);
  font-size:15.5px; line-height:1.6; color:var(--ink); word-wrap:break-word; overflow-wrap:break-word; }
.osgc-pmsg--me .osgc-pbubble{ background:linear-gradient(120deg,var(--coral),var(--coral-2)); border-color:transparent; color:#fff; border-radius:18px 18px 6px 18px; }
.osgc-pbubble p{ margin:0 0 8px; } .osgc-pbubble p:last-child{ margin-bottom:0; }
.osgc-pbubble ul,.osgc-pbubble ol{ margin:7px 0; padding-left:19px; } .osgc-pbubble li{ margin:3px 0; }
.osgc-pbubble strong{ font-weight:700; } .osgc-pbubble em{ font-style:italic; }
.osgc-pbubble a{ color:var(--coral-deep); text-decoration:underline; } .osgc-pmsg--me .osgc-pbubble a{ color:#fff; }

/* =========================================================================
   BLINDAGEM contra o CSS de artigo. O chat agora vive DENTRO do conteúdo do
   texto (.entry-content/.mow_fn_content...), então o balão herda o que o tema
   aplica na leitura: drop-cap (::first-letter), primeira-linha, espaçamento de
   parágrafo, cor de link, recuo, etc. Aqui a gente ANULA tudo isso — só dentro
   do balão. !important vence as regras normais do tema (importância > herança/
   especificidade), então é robusto mesmo sem saber a regra exata do tema.
   ========================================================================= */
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble::first-letter,
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble *::first-letter{
  font-size:inherit !important; font-weight:inherit !important; font-style:inherit !important;
  line-height:inherit !important; color:inherit !important; background:none !important;
  float:none !important; margin:0 !important; padding:0 !important; border:0 !important;
  text-transform:none !important; letter-spacing:inherit !important; vertical-align:baseline !important;
  -webkit-initial-letter:normal !important; initial-letter:normal !important;
}
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble::first-line,
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble *::first-line{
  font-size:inherit !important; font-weight:inherit !important; letter-spacing:inherit !important;
  text-transform:none !important; color:inherit !important; background:none !important;
}
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble p,
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble li{
  margin:0 0 8px !important; padding:0 !important; text-indent:0 !important;
  font-size:15.5px !important; line-height:1.6 !important; color:inherit !important;
  font-family:inherit !important; letter-spacing:normal !important;
}
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble li{ margin:3px 0 !important; }
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble p:last-child{ margin-bottom:0 !important; }
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble ul,
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble ol{ margin:7px 0 !important; padding:0 0 0 19px !important; list-style-position:outside !important; }
.osgc-embed .osgc-chatcard .osgc-pbubble.osgc-pbubble a{ color:var(--coral-deep) !important; text-decoration:underline !important; background:none !important; }
.osgc-embed .osgc-chatcard .osgc-pmsg--me .osgc-pbubble.osgc-pbubble,
.osgc-embed .osgc-chatcard .osgc-pmsg--me .osgc-pbubble.osgc-pbubble p,
.osgc-embed .osgc-chatcard .osgc-pmsg--me .osgc-pbubble.osgc-pbubble a{ color:#fff !important; }

.osgc-ptyping{ display:inline-flex; gap:5px; padding:18px 20px; background:var(--paper); border:1px solid var(--line); border-radius:6px 18px 18px 18px; }
.osgc-ptyping i{ width:7px; height:7px; border-radius:50%; background:var(--coral); animation:osgc-dot 1.4s infinite; }
.osgc-ptyping i:nth-child(2){ animation-delay:.2s; } .osgc-ptyping i:nth-child(3){ animation-delay:.4s; }
@keyframes osgc-dot{ 0%,60%,100%{ opacity:.25; transform:translateY(0); } 30%{ opacity:1; transform:translateY(-3px); } }

/* Chips de sugestão */
.osgc-cc__chips{ display:flex; flex-wrap:wrap; gap:8px; padding:0 24px 20px; background:var(--cream); }
.osgc-cc__chip{ display:inline-flex; align-items:center; gap:7px; padding:9px 15px; border-radius:999px;
  background:var(--paper); border:1px solid var(--line); font-family:var(--gf-sans); font-size:13px; font-weight:500;
  color:var(--ink-2); cursor:pointer; transition:.15s; }
.osgc-cc__chip:hover{ border-color:var(--coral); color:var(--coral); background:#fff7f4; }
.osgc-cc__chip svg{ width:14px; height:14px; color:var(--coral); }

/* Aviso de saldo (baixo / esgotado) — encaixado antes do campo */
.osgc-cc__banner{ padding:11px 24px; font-size:12.5px; background:#fff6f2; color:var(--ink); border-top:1px solid var(--line); }
.osgc-cc__banner a{ color:var(--coral-deep); font-weight:600; }
.osgc-cc__banner--empty{ background:#fff0eb; color:#a83218; font-weight:600; }
.osgc-cc__banner--low{ background:#fff6ef; color:#8a5a1a; }

/* Rodapé branco com campo (borda coral) + envio */
.osgc-cc__composer{ display:flex; align-items:center; gap:12px; padding:16px 24px 22px; background:var(--paper); border-top:1px solid var(--line); }
.osgc-cc__field{ flex:1; min-width:0; display:flex; align-items:center; height:56px; padding:0 18px; border-radius:14px;
  background:var(--paper); border:1.5px solid var(--coral); transition:.15s; }
.osgc-cc__field input{ flex:1; min-width:0; height:100%; font-family:var(--gf-sans); font-size:15.5px; color:var(--ink); }
.osgc-cc__field input::placeholder{ color:var(--soft); }
.osgc-cc__field:focus-within{ box-shadow:0 0 0 3px rgba(255,83,44,.12); }
/* Blindagem contra o tema: ele força borda/box-shadow/appearance nos inputs, o
   que criava uma borda "dupla" (uma no wrapper .osgc-*__field, outra no próprio
   input). Zera tudo no input — a borda visível fica SÓ no wrapper. */
.osgc-embed input[type="text"]{
  border:0 !important; outline:0 !important; box-shadow:none !important;
  background:transparent !important; border-radius:0 !important; min-height:0 !important;
  margin:0 !important; -webkit-appearance:none !important; appearance:none !important;
}
.osgc-cc__composer button[type=submit]{ width:52px; height:52px; flex-shrink:0; border:0; cursor:pointer; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; transition:.16s;
  background:linear-gradient(135deg,var(--coral-2),var(--coral-deep)); color:#fff; }
.osgc-cc__composer button[type=submit]:hover{ filter:brightness(1.07); transform:scale(1.05); }
.osgc-cc__composer button[type=submit] svg{ width:20px; height:20px; }

/* Sem minutos: esconde as sugestões e troca o campo pelo botão de recarga */
.osgc-chatcard.is-empty .osgc-cc__chips{ display:none; }
.osgc-cc__buy{ display:flex; align-items:center; justify-content:center; gap:8px; width:100%;
  padding:15px 18px; border-radius:14px; text-decoration:none;
  background:linear-gradient(135deg,var(--coral-2),var(--coral-deep)); color:#fff; font-size:15px; font-weight:700; }
.osgc-cc__buy svg{ width:16px; height:16px; }

/* Dica + aviso de bem-estar */
.osgc-cc__hint{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
  padding:12px 24px 20px; background:var(--paper); font-family:var(--gf-sans); font-size:11.5px; color:var(--muted); }
/* Contador do chamariz ("X de 3 mensagens grátis") — discreto, tom da marca */
.osgc-cc__free{ font-family:var(--gf-mono); font-size:10.5px; font-weight:600; letter-spacing:.08em;
  text-transform:uppercase; color:var(--coral-deep); }
.osgc-cc__hint kbd{ font-family:var(--gf-mono); font-size:10px; padding:2px 7px; border-radius:5px; background:var(--cream-2); border:1px solid var(--line); color:var(--ink-2); }
.osgc-cc__safe{ display:inline-flex; align-items:center; gap:6px; color:var(--muted); }
.osgc-cc__safe svg{ width:13px; height:13px; color:var(--coral); flex-shrink:0; }

/* CTA no fio da conversa (salvar plano / conhecer premium) */
.osgc-pcta{ padding-left:60px; }
.osgc-pcta__btn{ display:inline-flex; align-items:center; gap:8px; padding:11px 18px; border-radius:12px; border:0; cursor:pointer;
  background:linear-gradient(135deg,var(--coral-2),var(--coral-deep)); color:#fff !important; font-family:var(--gf-sans); font-size:13.5px; font-weight:700; text-decoration:none !important; }
.osgc-pcta__btn svg{ width:15px; height:15px; }
.osgc-pnote{ padding-left:60px; font-size:13px; line-height:1.5; color:var(--muted); }
.osgc-pnote a{ color:var(--coral-deep); font-weight:600; }

@media (max-width:560px){
  .osgc-cc__head{ padding:18px; gap:12px; }
  .osgc-cc__thread{ padding:18px; }
  .osgc-cc__chips{ padding:0 18px 16px; }
  .osgc-cc__composer{ padding:14px 18px 18px; }
  .osgc-cc__hint{ padding:12px 18px 16px; }
  .osgc-pcta,.osgc-pnote{ padding-left:0; }
}
@media (prefers-reduced-motion:reduce){
  .osgc-embed.is-expanded .osgc-chatcard{ animation:none; }
  .osgc-cc__status i::after,.osgc-ptyping i{ animation:none; }
}
