/* Porta dos Agentes de IA da HubClub: a janela de entrar e o aviso do plano Diamante, na página de vendas
   (servida pelo serviço hubclub-agentes-porta em /porta/porta.css). Usa as cores, as letras e os botões da página
   (pagina.css: --fundo, --texto, --azul-claro, --ouro, --tit, --txt, .bt, .bt-p, .bt-ouro, .ic); aqui só o que é da janela,
   tudo com o prefixo "hap-". Só azuis e branco; dourado só no que é do Diamante.
   O vidro é a receita da janela "Cadastre-se" do painel de vagas (hubclubgo.com.br/vagas): a luz azul que dá a volta na
   borda em 12 s, a mesma luz difusa por dentro e a tinta escura; o desfoque fica no fundo preso na tela (::backdrop). */

html.hap-sem-rolar { overflow: hidden; }

.hap-janela { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0;
  background: transparent; color: var(--texto, #f2f7fa); overflow-y: auto; overscroll-behavior: contain; }
.hap-janela[open] { display: grid; place-items: center; }
.hap-janela::backdrop { background: rgba(1, 4, 7, .82); }
@supports ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .hap-janela::backdrop { background: rgba(1, 5, 9, .58); -webkit-backdrop-filter: blur(14px) saturate(1.25); backdrop-filter: blur(14px) saturate(1.25); }
}

.hap-caixa { --hap-raio: 24px; position: relative; isolation: isolate; width: min(460px, 100%); padding: 34px 30px 26px; border-radius: var(--hap-raio);
  text-align: center; box-shadow: 0 50px 120px -30px #000, 0 0 90px -30px rgba(58, 160, 216, .5); animation: hap-entra .24s cubic-bezier(.2, .7, .2, 1); }
@keyframes hap-entra { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* o vidro: o anel de 1px com a luz que gira, e o miolo com a luz difusa e a tinta */
.hap-vidro { position: absolute; inset: 0; z-index: -1; border-radius: var(--hap-raio); overflow: hidden; overflow: clip; pointer-events: none; }
.hap-luz { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.hap-gira { position: absolute; left: -600px; top: -600px; width: 1200px; height: 1200px; animation: hap-gira 12s linear infinite; will-change: transform; }
.hap-anel { position: absolute; inset: 0; padding: 1px; border-radius: var(--hap-raio); overflow: hidden; overflow: clip; background: rgba(118, 183, 213, .2);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.hap-conica { background: conic-gradient(from 225deg, transparent 0, rgba(140, 205, 238, .98) 90deg, transparent 90deg); }
.hap-miolo { position: absolute; inset: 1px; border-radius: calc(var(--hap-raio) - 1px); overflow: hidden; overflow: clip; background: rgba(5, 14, 22, .92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.hap-difusa { background: conic-gradient(from 225deg, transparent 0, rgba(58, 160, 216, .7) 90deg, transparent 90deg); filter: blur(46px); }
.hap-tinta { position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 32%), linear-gradient(170deg, rgba(12, 35, 52, .34), rgba(4, 12, 19, .5) 68%); }
@supports ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .hap-miolo { background: rgba(5, 14, 22, .62); }
}
@keyframes hap-gira { to { transform: rotate(360deg); } }

.hap-corpo { position: relative; }
.hap-fechar { position: absolute; top: 14px; right: 14px; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  color: var(--texto-2, #b6c5cf); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.hap-fechar:hover { color: #fff; background: rgba(118, 183, 213, .14); border-color: rgba(118, 183, 213, .4); }
.hap-fechar .ic { width: 18px; height: 18px; }

/* o topo de cada fase */
.hap-selo { width: 58px; height: 58px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 18px; color: #e3f4ff;
  background: linear-gradient(135deg, #3f97bd, #0c4a69); box-shadow: 0 18px 40px -16px rgba(58, 160, 216, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.hap-selo .ic { width: 26px; height: 26px; }
.hap-selo-ouro { color: #2a1c05; background: linear-gradient(135deg, #f8e2a6 0%, #e6bd5d 50%, #bf8d31 100%);
  box-shadow: 0 18px 40px -16px rgba(236, 200, 113, .85), inset 0 1px 0 rgba(255, 255, 255, .5); }
.hap-esperando .ic { animation: hap-pulsa 1.4s ease-in-out infinite; }
@keyframes hap-pulsa { 50% { opacity: .45; transform: scale(.9); } }

.hap-olho { margin-bottom: 8px; font: 600 .74rem/1.3 var(--tit, 'Poppins', sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--ouro, #ecc871); }
.hap-janela[data-fase="codigo"] .hap-olho { color: var(--azul-claro, #76b7d5); }
.hap-caixa h2 { padding: 0 22px; font-size: clamp(1.2rem, 1.1vw + 1rem, 1.5rem); line-height: 1.26; text-wrap: balance; }
.hap-texto { margin-top: 12px; font-size: .95rem; line-height: 1.55; color: var(--texto-2, #b6c5cf); overflow-wrap: anywhere; }
.hap-texto b { font-weight: 600; color: #fff; }

/* o formulário (e-mail ou código) */
.hap-form { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
.hap-rotulo { font: 600 .82rem/1.2 var(--tit, 'Poppins', sans-serif); color: var(--texto-2, #b6c5cf); }
.hap-campo { width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(118, 183, 213, .3); background: rgba(2, 10, 16, .72);
  color: #fff; font: 500 1rem var(--txt, 'Inter', sans-serif); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.hap-campo::placeholder { color: var(--texto-3, #8497a4); opacity: 1; }
.hap-campo:focus { border-color: var(--azul-claro, #76b7d5); box-shadow: 0 0 0 3px rgba(58, 160, 216, .25); }
.hap-campo-codigo { padding: 0 16px 0 calc(16px + .42em); text-align: center; font: 600 1.45rem/1 var(--tit, 'Poppins', sans-serif); letter-spacing: .42em; }
.hap-erro { padding: 9px 12px; border-radius: 10px; border-left: 3px solid var(--azul-claro, #76b7d5); background: rgba(118, 183, 213, .12);
  font-size: .86rem; line-height: 1.45; color: #fff; }
.hap-largo { width: 100%; }
.hap-form .bt { margin-top: 4px; }
.hap-ocupado .bt { opacity: .75; cursor: progress; }
.hap-ocupado .bt .ic { display: none; }

.hap-acoes { display: grid; gap: 10px; margin-top: 22px; }
.hap-divisa { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; font: 500 .82rem var(--tit, 'Poppins', sans-serif); color: var(--texto-3, #8497a4); }
.hap-divisa::before, .hap-divisa::after { content: ""; flex: 1; height: 1px; background: var(--linha, rgba(255, 255, 255, .09)); }
.hap-pe { margin-top: 12px; font-size: .8rem; line-height: 1.5; color: var(--texto-3, #8497a4); }
.hap-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin-top: 16px; font-size: .86rem; color: var(--texto-3, #8497a4); }
.hap-pe a, .hap-links a, .hap-links button { color: var(--azul-claro, #76b7d5); text-decoration: underline; text-underline-offset: 3px; }
.hap-pe a:hover, .hap-links a:hover, .hap-links button:hover:not(:disabled) { color: #fff; }
.hap-links button { padding: 4px 2px; font: inherit; background: none; border: 0; cursor: pointer; }
.hap-links button:disabled { color: var(--texto-3, #8497a4); text-decoration: none; cursor: default; }

/* o "Entrar" do topo: depois de entrar com o Diamante, vira o selo dourado */
.hap-topo-diamante { display: inline-flex; align-items: center; gap: 7px; color: var(--ouro, #ecc871) !important; }
.hap-topo-diamante .ic { width: 16px; height: 16px; }
.bt.hap-topo-diamante { border-color: rgba(236, 200, 113, .45); background: rgba(236, 200, 113, .08); }

@media (max-width: 560px) {
  .hap-janela { padding: 12px; }
  .hap-caixa { --hap-raio: 22px; padding: 30px 20px 22px; }
  .hap-caixa h2 { padding: 0 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .hap-gira, .hap-caixa, .hap-esperando .ic { animation: none; }
}
