/* ==========================================================================
   CIUTEK - Painel de seguidores e seguindo (Velvet Nexus)

   Um so painel para as duas listas. No computador ele e uma janela centrada;
   no celular ele sobe do rodape como uma folha. Cada medida pedida esta
   anotada ao lado da propria linha, para ficar facil de conferir.

   Nada aqui altera a tela antiga da plataforma: ela e apenas escondida por
   ciutek-conexoes.js, que nunca deixa a navegacao chegar nela.
   ========================================================================== */

.ck-cx {
  /* cores do painel, todas derivadas do preto e do roxo do tema */
  --ck-cx-fundo:        #0b0510;
  --ck-cx-fundo-topo:   rgba(16, 8, 26, .96);
  --ck-cx-borda:        rgba(150, 96, 255, .28);
  --ck-cx-borda-forte:  rgba(150, 96, 255, .45);
  --ck-cx-texto:        #f3eefc;
  --ck-cx-apagado:      #a99bbd;
  --ck-cx-roxo:         var(--ck-roxo-500, #7a41f0);
  --ck-cx-roxo-claro:   var(--ck-roxo-400, #9a6bff);
  --ck-cx-linha:        rgba(255, 255, 255, .06);
  --ck-cx-realce:       rgba(150, 96, 255, .10);

  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.ck-cx[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   1. Fundo
   -------------------------------------------------------------------------- */
.ck-cx__fundo {
  position: absolute;
  inset: 0;
  background: rgba(4, 1, 8, .72);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  opacity: 0;
  transition: opacity .22s ease;
}
.ck-cx.ck-cx--visivel .ck-cx__fundo { opacity: 1; }

/* --------------------------------------------------------------------------
   2. A caixa
   -------------------------------------------------------------------------- */
.ck-cx__caixa {
  position: relative;
  width: 100%;
  max-width: 640px;              /* medida: 640px no computador */
  max-height: 78vh;              /* medida: 78vh no computador */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;           /* medida: cantos de 24px */
  border: 1px solid var(--ck-cx-borda);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(122, 65, 240, .20), transparent 60%),
    var(--ck-cx-fundo);
  color: var(--ck-cx-texto);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, .70),
    0 0 0 1px rgba(255, 255, 255, .03) inset,
    0 1px 0 rgba(255, 255, 255, .06) inset;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transition: opacity .22s ease, transform .22s cubic-bezier(.2, .8, .3, 1);
}
.ck-cx.ck-cx--visivel .ck-cx__caixa { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   3. Cabecalho fixo
   -------------------------------------------------------------------------- */
.ck-cx__topo {
  flex: 0 0 auto;
  position: relative;
  padding: 18px 56px 14px 20px;
  border-bottom: 1px solid var(--ck-cx-linha);
  background: var(--ck-cx-fundo-topo);
}
.ck-cx__punho { display: none; }

.ck-cx__titulo {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.25;
}
.ck-cx__resumo {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ck-cx-apagado);
}

.ck-cx__fechar {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;                   /* medida: alvo de toque de 44px */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ck-cx-apagado);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.ck-cx__fechar:hover { background: var(--ck-cx-realce); color: var(--ck-cx-texto); }
.ck-cx__fechar svg { width: 20px; height: 20px; }

/* busca */
.ck-cx__busca {
  position: relative;
  margin-top: 12px;
}
.ck-cx__busca input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 0 14px 0 38px;
  border-radius: 12px;
  border: 1px solid var(--ck-cx-linha);
  background: rgba(255, 255, 255, .04);
  color: var(--ck-cx-texto);
  font-size: 14px;
  outline: none;
  transition: border-color .16s ease, background .16s ease;
}
.ck-cx__busca input::placeholder { color: var(--ck-cx-apagado); }
.ck-cx__busca input:focus {
  border-color: var(--ck-cx-borda-forte);
  background: rgba(255, 255, 255, .06);
}
.ck-cx__busca svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: var(--ck-cx-apagado);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Corpo rolavel
   -------------------------------------------------------------------------- */
.ck-cx__corpo {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 8px 10px;
}
.ck-cx__corpo::-webkit-scrollbar { width: 10px; }
.ck-cx__corpo::-webkit-scrollbar-thumb {
  background: rgba(150, 96, 255, .28);
  border: 3px solid transparent;
  border-radius: 10px;
  background-clip: padding-box;
}

/* --------------------------------------------------------------------------
   5. Cada pessoa
   -------------------------------------------------------------------------- */
.ck-cx__linha {
  display: flex;
  align-items: center;
  gap: 12px;                     /* medida: 12px entre foto e nome */
  min-height: 76px;              /* medida: linha de 76px */
  padding: 0 16px;               /* medida: 16px nas laterais */
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: background .16s ease;
}
.ck-cx__linha:hover { background: var(--ck-cx-realce); }

.ck-cx__foto {
  flex: 0 0 auto;
  width: 48px;                   /* medida: foto de 48px */
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1024;
  border: 1px solid var(--ck-cx-linha);
}

.ck-cx__quem {
  flex: 1 1 auto;
  min-width: 0;
}

/* o selo fica sempre colado no nome, na mesma linha, e nunca e cortado */
.ck-cx__nome {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
}
.ck-cx__nome > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ck-cx__selo {
  flex: 0 0 auto;
  display: inline-flex;
  width: 17px;
  height: 17px;
  overflow: visible;
}
/* sem selo nao sobra buraco: o elemento simplesmente nao e criado */

.ck-cx__usuario {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ck-cx-apagado);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ck-cx__info {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ck-cx-roxo-claro);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   6. Botao de acompanhar - quatro tratamentos
   -------------------------------------------------------------------------- */
.ck-cx__acao {
  flex: 0 0 auto;
  min-width: 104px;              /* medida: 104px de largura minima */
  min-height: 40px;              /* medida: 40px de altura */
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.ck-cx__acao:active { transform: scale(.97); }
.ck-cx__acao[disabled] { opacity: .6; cursor: default; }
.ck-cx__acao[aria-busy="true"] { cursor: progress; }

/* 6.1 tratamento comum: roxo cheio quando ainda nao segue */
.ck-cx__acao--comum {
  background: linear-gradient(135deg, var(--ck-cx-roxo-claro), var(--ck-cx-roxo));
  color: #fff;
  box-shadow: 0 6px 18px rgba(122, 65, 240, .32);
}
.ck-cx__acao--comum:hover { box-shadow: 0 8px 24px rgba(122, 65, 240, .45); }

/* estado "ja segue" e sempre discreto, para o realce ficar em quem falta seguir */
.ck-cx__acao--seguindo,
.ck-cx__acao--pendente {
  background: rgba(255, 255, 255, .07);
  color: var(--ck-cx-texto);
  box-shadow: inset 0 0 0 1px var(--ck-cx-linha);
}
.ck-cx__acao--seguindo:hover { background: rgba(255, 90, 90, .14); color: #ffb4b4; }

/* 6.2 selo azul: contorno luminoso em volta do botao */
.ck-cx__acao--azul {
  background: rgba(56, 132, 255, .10);
  color: #cfe2ff;
  box-shadow: inset 0 0 0 1.5px rgba(56, 132, 255, .70), 0 0 18px rgba(56, 132, 255, .30);
}
.ck-cx__acao--azul:hover { box-shadow: inset 0 0 0 1.5px rgba(56, 132, 255, .95), 0 0 26px rgba(56, 132, 255, .48); }
.ck-cx__acao--azul.ck-cx__acao--seguindo { color: #9db8e6; }

/* 6.3 selo dourado: botao Black Premium */
.ck-cx__acao--ouro {
  background: linear-gradient(160deg, #16120a 0%, #0a0806 60%, #1c1710 100%);
  color: #f4dfa4;
  box-shadow:
    inset 0 0 0 1px rgba(226, 190, 110, .55),
    inset 0 1px 0 rgba(255, 233, 179, .18),
    0 6px 20px rgba(0, 0, 0, .55);
}
.ck-cx__acao--ouro:hover {
  color: #ffeec2;
  box-shadow:
    inset 0 0 0 1px rgba(255, 216, 140, .85),
    inset 0 1px 0 rgba(255, 240, 200, .28),
    0 8px 26px rgba(0, 0, 0, .6);
}

/* 6.4 conta oficial do Ciutek: o tratamento mais distinto do painel */
.ck-cx__acao--oficial {
  min-width: 132px;
  background:
    linear-gradient(135deg, #b98bff 0%, #7a41f0 45%, #4a1fb0 100%);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(214, 190, 255, .55) inset,
    0 8px 26px rgba(122, 65, 240, .55);
}
.ck-cx__acao--oficial::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(255, 255, 255, .85), rgba(184, 139, 255, 0) 40%, rgba(255, 255, 255, .7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .55;
  z-index: -1;
  animation: ck-cx-orbita 4.5s linear infinite;
}
.ck-cx__acao--oficial.ck-cx__acao--seguindo {
  background: linear-gradient(135deg, rgba(184, 139, 255, .16), rgba(74, 31, 176, .22));
  color: #e6d8ff;
  box-shadow: inset 0 0 0 1px rgba(184, 139, 255, .45);
}
@keyframes ck-cx-orbita {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* --------------------------------------------------------------------------
   7. Rodape da lista: resumo, ver mais, fim
   -------------------------------------------------------------------------- */
.ck-cx__resto {
  padding: 14px 16px 4px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ck-cx-apagado);
}
.ck-cx__mais {
  display: block;
  width: calc(100% - 32px);
  margin: 10px 16px 14px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ck-cx-borda);
  border-radius: 14px;
  background: rgba(150, 96, 255, .10);
  color: var(--ck-cx-texto);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.ck-cx__mais:hover { background: rgba(150, 96, 255, .18); border-color: var(--ck-cx-borda-forte); }
.ck-cx__mais[disabled] { opacity: .65; cursor: progress; }

.ck-cx__fim {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ck-cx-apagado);
}

/* vazio e erro */
.ck-cx__vazio {
  padding: 46px 24px;
  text-align: center;
  color: var(--ck-cx-apagado);
  font-size: 14px;
  line-height: 1.5;
}

/* esqueleto de carregamento */
.ck-cx__osso {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 0 16px;
}
.ck-cx__osso i {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.10), rgba(255,255,255,.05));
  background-size: 200% 100%;
  animation: ck-cx-brilho 1.3s linear infinite;
}
.ck-cx__osso i:first-child { width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; }
.ck-cx__osso i:nth-child(2) { width: 42%; height: 12px; }
.ck-cx__osso i:last-child { width: 104px; height: 40px; border-radius: 12px; margin-left: auto; flex: 0 0 auto; }
@keyframes ck-cx-brilho {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   8. Foco visivel e teclado
   -------------------------------------------------------------------------- */
.ck-cx :focus-visible {
  outline: 2px solid var(--ck-cx-roxo-claro);
  outline-offset: 2px;
  border-radius: 12px;
}

/* trava de rolagem do fundo */
body.ck-cx-travado { overflow: hidden !important; }

/* --------------------------------------------------------------------------
   9. Celular: folha que sobe do rodape
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .ck-cx {
    padding: 0;
    align-items: flex-end;
  }
  .ck-cx__caixa {
    max-width: 100%;             /* medida: largura total no celular */
    width: 100%;
    max-height: 90vh;            /* medida: 90vh no celular */
    height: 90vh;
    border-radius: 24px 24px 0 0;/* medida: 24px so em cima */
    border-bottom: 0;
    transform: translateY(100%);
    transition: transform .26s cubic-bezier(.2, .8, .3, 1), opacity .2s ease;
  }
  .ck-cx.ck-cx--visivel .ck-cx__caixa { transform: none; }
  .ck-cx.ck-cx--arrastando .ck-cx__caixa { transition: none; }

  .ck-cx__topo {
    padding: 8px 56px 12px 16px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px) * 0);
  }
  /* pegador discreto, apenas um apoio visual: fechar tem botao proprio */
  .ck-cx__punho {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
  }
  .ck-cx__fechar { top: 14px; right: 8px; }

  .ck-cx__corpo {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .ck-cx__linha {
    gap: 10px;                   /* medida: 10px no celular */
    min-height: 72px;            /* medida: linha de 72px */
    padding: 0 14px;
  }
  .ck-cx__foto { width: 44px; height: 44px; }  /* medida: foto de 44px */
  .ck-cx__acao {
    min-width: 88px;             /* medida: 88px no celular */
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }
  .ck-cx__acao--oficial { min-width: 108px; }
  .ck-cx__osso { min-height: 72px; padding: 0 14px; }
  .ck-cx__osso i:first-child { width: 44px; height: 44px; }
  .ck-cx__osso i:last-child { width: 88px; }
}

/* --------------------------------------------------------------------------
   10. Menos movimento
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ck-cx__fundo,
  .ck-cx__caixa { transition: none !important; }
  .ck-cx__caixa { transform: none !important; }
  .ck-cx__acao--oficial::after { animation: none; }
  .ck-cx__osso i { animation: none; }
}

/* --------------------------------------------------------------------------
   11. A tela antiga nunca aparece enquanto o Velvet Nexus estiver ativo
   -------------------------------------------------------------------------- */
.ctk-app .user-followers-list,
.ctk-app .followers-list-page,
.ctk-app #followers-page,
body.ck-cx-rota-antiga .profile-container .tab-content,
body.ck-cx-rota-antiga .user-list-wrapper { display: none !important; }

/* --------------------------------------------------------------------------
   12. Pergunta de confirmacao, dentro do proprio painel
   -------------------------------------------------------------------------- */
.ck-cx__pergunta {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 1, 8, .62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.ck-cx__pergunta-cartao {
  width: 100%;
  max-width: 340px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--ck-cx-borda);
  background: #120a1c;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
.ck-cx__pergunta-texto {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ck-cx-texto);
}
.ck-cx__pergunta-botoes {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.ck-cx__pergunta-botoes button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.ck-cx__pergunta-nao {
  background: rgba(255, 255, 255, .07);
  color: var(--ck-cx-texto);
  box-shadow: inset 0 0 0 1px var(--ck-cx-linha);
}
.ck-cx__pergunta-nao:hover { background: rgba(255, 255, 255, .12); }
.ck-cx__pergunta-sim {
  background: linear-gradient(135deg, var(--ck-cx-roxo-claro), var(--ck-cx-roxo));
  color: #fff;
  box-shadow: 0 6px 18px rgba(122, 65, 240, .32);
}

/* aviso curto no topo do corpo */
.ck-cx__aviso {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 20px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #ffd9d9;
  background: rgba(255, 90, 90, .12);
  border-bottom: 1px solid rgba(255, 90, 90, .22);
}

@media (max-width: 767px) {
  .ck-cx__pergunta-botoes { flex-direction: column-reverse; }
  .ck-cx__pergunta-botoes button { width: 100%; }
}
