/* ==========================================================================
   A Forja — suporte (botão "Ajuda") e aviso de cookies (v1.41)
   Movimento: entradas desaceleram, saídas aceleram, sem ricochete (ver o sistema de movimento do tema).
   ========================================================================== */
.cia-ck, .cia-sup, .cia-sup-btn { --at-ease: var(--mo-ease, cubic-bezier(.2, 0, 0, 1)); --at-in: var(--mo-in, cubic-bezier(.05, .7, .1, 1)); --at-out: var(--mo-out, cubic-bezier(.3, 0, 1, 1)); font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; box-sizing: border-box; }
.cia-ck *, .cia-sup * { box-sizing: border-box; }

/* ---------------- Aviso de cookies ---------------- */
.cia-ck { position: fixed; left: 22px; bottom: 22px; z-index: 99990; width: 430px; max-width: calc(100vw - 20px); padding: 20px 22px 18px; border-radius: 16px; background: #0D0D0D; color: #F5F5F5; border: 1px solid rgba(194, 174, 141, .28); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); font-size: 13.5px; line-height: 1.55; outline: none; animation: ciaAtSobe .3s var(--at-in) both; }
.cia-ck.sai { animation: ciaAtDesce .2s var(--at-out) both; pointer-events: none; }
.cia-ck h2 { margin: 0 0 6px; padding-right: 30px; font-size: 15.5px; font-weight: 700; line-height: 1.3; color: #fff; }
.cia-ck p { margin: 0 0 14px; color: #CACACA; }
.cia-ck p a { color: #C2AE8D; text-decoration: underline; text-underline-offset: 2px; }
.cia-ck-b { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cia-ck-b button { font: inherit; font-weight: 600; font-size: 13.5px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: background-color .18s var(--at-ease), border-color .18s var(--at-ease), color .18s var(--at-ease), transform .12s var(--at-ease); }
.cia-ck-b button:active { transform: scale(.97); }
.cia-ck-b button:hover { transition-duration: .1s; }
.cia-ck-b .pri { flex: 1 1 150px; color: #181510; background: linear-gradient(110deg, #E3CFA8 0%, #C2AE8D 54%, #A58D68 100%); }
.cia-ck-b .pri:hover { filter: brightness(.97); }
/* "Só os necessários" tem o mesmo tamanho e o mesmo peso de "Aceitar todos": recusar não pode ser mais difícil */
.cia-ck-b .sec { flex: 1 1 150px; color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); }
.cia-ck-b .sec:hover { background: rgba(255, 255, 255, .16); }
.cia-ck-b .lnk { flex: 1 1 100%; min-height: 36px; background: transparent; color: #E3CFA8; text-decoration: underline; text-underline-offset: 3px; }
.cia-ck.aberto .cia-ck-b .lnk { order: -1; text-decoration: none; color: #fff; background: rgba(194, 174, 141, .14); border-color: rgba(194, 174, 141, .5); min-height: 42px; }
.cia-ck-b button:focus-visible, .cia-ck-x:focus-visible, .cia-sup-btn:focus-visible, .cia-sup-c:focus-visible, .cia-sup-l:focus-visible { outline: 2px solid #C2AE8D; outline-offset: 2px; }
.cia-ck-x { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #A3A3A3; cursor: pointer; }
.cia-ck-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.cia-ck-x svg { width: 18px; height: 18px; }
.cia-ck-op { margin: 0 0 14px; border-radius: 12px; border: 1px solid rgba(165, 141, 104, .18); overflow: hidden; animation: ciaAtDesceDentro .22s var(--at-in) both; }
.cia-ck-l { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; cursor: pointer; }
.cia-ck-l + .cia-ck-l { border-top: 1px solid rgba(165, 141, 104, .14); }
.cia-ck-l.fixo { cursor: default; }
.cia-ck-l input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cia-ck-s { flex: none; position: relative; width: 38px; height: 22px; margin-top: 1px; border-radius: 11px; background: rgba(255, 255, 255, .16); transition: background-color .18s var(--at-ease); }
.cia-ck-s::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s var(--at-ease); }
.cia-ck-l input:checked + .cia-ck-s { background: #A58D68; }
.cia-ck-l input:checked + .cia-ck-s::after { transform: translateX(16px); }
.cia-ck-l input:disabled + .cia-ck-s { opacity: .55; }
.cia-ck-l input:focus-visible + .cia-ck-s { outline: 2px solid #C2AE8D; outline-offset: 2px; }
.cia-ck-tx b { display: block; font-size: 13.5px; font-weight: 600; color: #fff; }
.cia-ck-tx small { display: block; font-size: 12px; color: #A3A3A3; line-height: 1.45; }
@keyframes ciaAtSobe { from { opacity: 0; transform: translateY(18px); } }
@keyframes ciaAtDesce { to { opacity: 0; transform: translateY(14px); } }
@keyframes ciaAtDesceDentro { from { opacity: 0; transform: translateY(-6px); } }

/* ---------------- Suporte ---------------- */
.cia-sup-btn { position: fixed; right: 22px; bottom: 22px; z-index: 9989; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px 0 14px; border-radius: 25px; border: 1px solid rgba(194, 174, 141, .45); background: #0D0D0D; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); transition: background-color .18s var(--at-ease), border-color .18s var(--at-ease), transform .12s var(--at-ease); animation: ciaAtSobe .3s var(--at-in) .4s both; }
.cia-sup-btn:hover { transition-duration: .1s; background: #191919; border-color: #C2AE8D; }
.cia-sup-btn:active { transform: scale(.97); }
.cia-sup-btn svg { color: #C2AE8D; }
.cia-sup { position: fixed; right: 22px; bottom: 84px; z-index: 9991; width: 320px; max-width: calc(100vw - 20px); padding: 18px; border-radius: 16px; background: #0D0D0D; color: #F5F5F5; border: 1px solid rgba(194, 174, 141, .28); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); font-size: 13.5px; line-height: 1.5; outline: none; transform-origin: 100% 100%; animation: ciaAtNasce .2s var(--at-in) both; }
.cia-sup.sai { animation: ciaAtSome .15s var(--at-out) both; pointer-events: none; }
.cia-sup strong { display: block; font-size: 16px; font-weight: 700; color: #fff; }
.cia-sup p { margin: 2px 0 14px; color: #A3A3A3; font-size: 12.5px; }
.cia-sup-c { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: 12px; border: 1px solid rgba(165, 141, 104, .18); background: rgba(255, 255, 255, .03); color: #fff; text-decoration: none; transition: background-color .18s var(--at-ease), border-color .18s var(--at-ease); }
.cia-sup-c:hover { transition-duration: .1s; background: rgba(194, 174, 141, .1); border-color: rgba(194, 174, 141, .5); color: #fff; }
.cia-sup-c .ic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(194, 174, 141, .14); color: #C2AE8D; }
.cia-sup-c.zap .ic { background: rgba(37, 211, 102, .14); color: #3ddc84; }
.cia-sup-c .tx { flex: 1; min-width: 0; }
.cia-sup-c .tx b { display: block; font-size: 14px; font-weight: 600; }
.cia-sup-c .tx small { display: block; font-size: 12px; color: #A3A3A3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cia-sup-c .st { flex: none; color: #858585; display: grid; }
.cia-sup-c .st svg { width: 18px; height: 18px; }
.cia-sup-l { display: block; width: 100%; margin-top: 6px; padding: 8px 0 0; border: 0; border-top: 1px solid rgba(165, 141, 104, .14); background: none; color: #A3A3A3; font: inherit; font-size: 12px; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cia-sup-l:hover { color: #fff; }
@keyframes ciaAtNasce { from { opacity: 0; transform: translateY(8px) scale(.95); } }
@keyframes ciaAtSome { to { opacity: 0; transform: translateY(6px) scale(.97); } }

/* O botão "Ajuda" não disputa o canto com outros botões flutuantes */
body.cia-tem-sup .lp-topo { bottom: 86px; }
body.cia-tem-sup .cia-fab { bottom: 86px; }
body.cia-tem-sup .cia-panel { bottom: 158px; }

/* Tema claro */
html[data-theme="light"] .cia-ck, html[data-theme="light"] .cia-sup { background: #fff; color: #202020; border-color: #D8D3C7; box-shadow: 0 24px 60px rgba(0, 0, 0, .2); }
html[data-theme="light"] .cia-ck h2, html[data-theme="light"] .cia-sup strong, html[data-theme="light"] .cia-ck-tx b, html[data-theme="light"] .cia-sup-c { color: #151515; }
html[data-theme="light"] .cia-ck p { color: #525252; }
html[data-theme="light"] .cia-ck p a, html[data-theme="light"] .cia-ck-b .lnk { color: #665635; }
html[data-theme="light"] .cia-ck-tx small,
html[data-theme="light"] .cia-sup p,
html[data-theme="light"] .cia-sup-c .tx small,
html[data-theme="light"] .cia-sup-l,
html[data-theme="light"] .cia-ck-x { color: #666666; }
html[data-theme="light"] .cia-ck-b .sec { color: #151515; background: #F2EFE8; border-color: #C9C4B8; }
html[data-theme="light"] .cia-ck-b .sec:hover { background: #E9E4D9; }
html[data-theme="light"] .cia-ck.aberto .cia-ck-b .lnk { color: #151515; background: #F2EDDF; border-color: #A58D68; }
html[data-theme="light"] .cia-ck-op, html[data-theme="light"] .cia-sup-c { border-color: #DFDACF; }
html[data-theme="light"] .cia-ck-s { background: #C9C4B8; }
html[data-theme="light"] .cia-sup-c { background: #f4f4f4; }
html[data-theme="light"] .cia-sup-c:hover { background: #F2EDDF; color: #151515; }
html[data-theme="light"] .cia-sup-btn { background: #fff; color: #151515; border-color: #A58D68; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
html[data-theme="light"] .cia-sup-btn:hover { background: #F2EDDF; }
html[data-theme="light"] .cia-sup-btn svg, html[data-theme="light"] .cia-sup-c .ic { color: #665635; }

/* Celular: o aviso ocupa a largura e fica acima da barra de atalhos; o botão vira só o ícone */
@media (max-width: 1000px) {
	body.cpm-app-body .cia-sup-btn { bottom: calc(76px + env(safe-area-inset-bottom)); }
	body.cpm-app-body .cia-sup { bottom: calc(136px + env(safe-area-inset-bottom)); }
	body.cpm-app-body .cia-ck { bottom: calc(74px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
	.cia-ck { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; padding: 14px 14px 10px; font-size: 12.5px; line-height: 1.45; max-height: calc(100vh - 16px); overflow-y: auto; }
	.cia-ck h2 { font-size: 14.5px; margin-bottom: 4px; }
	.cia-ck p { margin-bottom: 10px; }
	.cia-ck-b { gap: 6px; }
	.cia-ck-b button { min-height: 44px; padding: 0 10px; font-size: 13px; }
	.cia-ck-b .pri, .cia-ck-b .sec { flex: 1 1 0; }
	.cia-ck-b .lnk { min-height: 34px; }
	/* O aviso não esconde o fim da página: sobra espaço para rolar até o que ficou embaixo dele */
	body.cia-ck-aberto { padding-bottom: calc(var(--cia-ck-h, 0px) + 16px) !important; }
	.cia-sup-btn { right: 14px; bottom: 14px; width: 50px; padding: 0; justify-content: center; }
	.cia-sup-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
	.cia-sup { right: 10px; bottom: 74px; }
	body.cia-tem-sup .lp-topo { bottom: 144px; }
	/* Enquanto o aviso está na tela, o botão de ajuda espera: os dois não cabem no rodapé do celular */
	body.cia-ck-aberto .cia-sup-btn, body.cia-ck-aberto .cia-sup { display: none; }
	/* Página inicial: sobe quando a barra fixa de cadastro aparece */
	body:has(.lp-sticky.show) .cia-sup-btn { bottom: calc(82px + env(safe-area-inset-bottom)); }
	body:has(.lp-sticky.show) .cia-sup { bottom: calc(142px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
	.cia-ck, .cia-ck.sai, .cia-ck-op, .cia-sup, .cia-sup.sai, .cia-sup-btn { animation: none; }
	.cia-ck *, .cia-sup *, .cia-sup-btn { transition-duration: .01ms !important; }
	.cia-ck-b button:active, .cia-sup-btn:active { transform: none; }
}
@media print { .cia-ck, .cia-sup, .cia-sup-btn { display: none !important; } }

/* Contraste nos controles de consentimento e na versão clara. */
.cia-ck-l input:checked + .cia-ck-s::after { background: #151515; }
html[data-theme="light"] .cia-ck-l input:checked + .cia-ck-s { background: #A58D68; }
html[data-theme="light"] .cia-ck p a, html[data-theme="light"] .cia-ck-b .lnk { color: #665635; }
html[data-theme="light"] .cia-ck-b button:focus-visible,
html[data-theme="light"] .cia-ck-x:focus-visible,
html[data-theme="light"] .cia-sup-btn:focus-visible,
html[data-theme="light"] .cia-sup-c:focus-visible,
html[data-theme="light"] .cia-sup-l:focus-visible,
html[data-theme="light"] .cia-ck-l input:focus-visible + .cia-ck-s { outline-color: #665635; }
