/* Amigos, presentes e chat privado.
   Tudo com o prefixo am- para nao esbarrar nas classes do estilo.css. */

/* fica acima da barra de baixo do hall; mova a vontade pelo index.php,
   ou de um botao proprio com id="btnAmigos" que este flutuante nem aparece */
.am-botao {
  position: fixed; left: 14px; bottom: 96px; z-index: 60;
  width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(24,14,46,.9) center/78% no-repeat;
  box-shadow: 0 8px 24px rgba(0,0,0,.55), inset 0 0 0 2px rgba(255,215,106,.35);
  transition: transform .12s, box-shadow .12s;
}
.am-botao:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.6), inset 0 0 0 2px var(--dourado); }
.am-botao.oculto { display: none; }
.am-pino {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  font: 700 11px/20px 'Segoe UI', system-ui, sans-serif; color: #fff; text-align: center;
  background: linear-gradient(180deg, #ff8080, #e13b3b); border-radius: 10px;
  box-shadow: 0 2px 8px rgba(225,59,59,.6);
}
.am-pino.zero { display: none; }
/* botao que veio da propria pagina: so precisa segurar o pino no canto */
.am-hospedeiro { position: relative; }

/* ------------------------------------------------------------------ painel */
.am-fundo {
  position: fixed; inset: 0; z-index: 70; background: rgba(4,2,12,.72);
  backdrop-filter: blur(2px); display: none;
}
.am-fundo.abre { display: block; }

.am-painel {
  position: fixed; z-index: 71; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(94vw, 480px); height: min(88vh, 620px); display: none;
  flex-direction: column; overflow: hidden;
  color: var(--texto);
  background: #241239 center/cover no-repeat;
  border: 1px solid var(--carta-borda); border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.08);
}
.am-painel.abre { display: flex; }

.am-topo {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(0,0,0,.28), transparent);
}
.am-topo h3 { margin: 0; font-size: 17px; font-weight: 700; }
.am-topo h3 span { color: var(--dourado); font-size: 12px; font-weight: 600; margin-left: 6px; }
.am-fechar {
  margin-left: auto; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: center/contain no-repeat transparent; opacity: .8;
}
.am-fechar:hover { opacity: 1; }

.am-abas { display: flex; gap: 4px; padding: 8px 10px 0; }
.am-abas button {
  position: relative; flex: 1; padding: 9px 4px; font-size: 12.5px; font-weight: 600;
  color: var(--texto2); background: rgba(8,4,20,.45); border: 0;
  border-radius: 10px 10px 0 0; transition: .14s;
}
.am-abas button:hover { color: #fff; }
.am-abas button.ativa {
  color: #fff; background: linear-gradient(180deg, #57379b, #3d2470);
  box-shadow: inset 0 2px 0 var(--dourado2);
}
.am-abas .am-pino { top: 2px; right: 4px; min-width: 17px; height: 17px; font-size: 10px; line-height: 17px; }

.am-corpo { flex: 1; overflow-y: auto; padding: 10px; }
.am-corpo::-webkit-scrollbar { width: 7px; }
.am-corpo::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 4px; }

/* ------------------------------------------------------------------- linha */
.am-linha {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 7px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); border-radius: 12px;
  transition: background .14s;
}
.am-linha:hover { background: rgba(255,255,255,.09); }
.am-linha.off { opacity: .62; }

.am-foto { position: relative; width: 44px; height: 44px; flex: none; }
.am-foto img.av {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  background: rgba(0,0,0,.35);
}
.am-foto img.moldura { position: absolute; inset: -3px; width: 50px; height: 50px; pointer-events: none; }
.am-foto .st {
  position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px;
  background: center/contain no-repeat;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.7));
}

.am-quem { flex: 1; min-width: 0; }
.am-quem .nm {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.am-quem .nvl {
  font: 700 10px/1 'Segoe UI', sans-serif; color: #2a1600; padding: 3px 5px; border-radius: 5px;
  background: linear-gradient(180deg, var(--dourado), var(--dourado2));
}
.am-quem .sit { font-size: 11.5px; color: var(--texto3); margin-top: 2px; }
.am-quem .sit.on { color: var(--verde); }
.am-quem .sit.mesa { color: #8fd0ff; }
.am-quem .fic { font-size: 11px; color: var(--dourado); margin-top: 2px; }

.am-acoes { display: flex; gap: 6px; flex: none; }
.am-ic {
  position: relative; width: 34px; height: 34px; padding: 0; border-radius: 9px;
  background: rgba(0,0,0,.32) center/60% no-repeat;
  border: 1px solid rgba(255,255,255,.1); transition: .12s;
}
.am-ic:hover:not(:disabled) { border-color: var(--dourado2); background-color: rgba(255,215,106,.14); }
.am-ic:disabled { opacity: .3; cursor: default; }
.am-ic .am-pino { top: -6px; right: -6px; min-width: 17px; height: 17px; font-size: 10px; line-height: 17px; }

.am-bt {
  padding: 8px 13px; font-size: 12.5px; font-weight: 700; color: #2a1600; border: 0; border-radius: 9px;
  background: linear-gradient(180deg, var(--dourado), var(--dourado2)); transition: .12s;
}
.am-bt:active { transform: translateY(1px); }
.am-bt:disabled { opacity: .45; cursor: default; }
.am-bt.fantasma {
  color: var(--texto2); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
}
.am-bt.fantasma:hover { color: #fff; background: rgba(255,255,255,.14); }
.am-bt.perigo { color: #fff; background: linear-gradient(180deg, #ff7a7a, #d63a3a); }

.am-vazio {
  padding: 46px 24px; text-align: center; font-size: 13px; color: var(--texto3); line-height: 1.6;
}
.am-vazio b { display: block; margin-bottom: 6px; color: var(--texto2); font-size: 14px; }

/* ------------------------------------------------------------------ busca */
.am-busca { display: flex; gap: 7px; margin-bottom: 10px; }
.am-busca input {
  flex: 1; padding: 10px 12px 10px 34px; font-size: 14px; color: #fff; outline: none;
  background: rgba(10,6,24,.85) 9px center/16px no-repeat;
  border: 1px solid var(--carta-borda); border-radius: 11px;
}
.am-busca input:focus { border-color: #a97bff; box-shadow: 0 0 0 3px rgba(150,100,255,.2); }
.am-dica { margin: -4px 0 10px; font-size: 11px; color: var(--texto3); }

/* --------------------------------------------------------------- presentes */
.am-faixa {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; margin-bottom: 10px;
  font-size: 12px; color: var(--texto2);
  background: linear-gradient(90deg, rgba(255,215,106,.16), rgba(255,215,106,.03));
  border: 1px solid rgba(255,215,106,.25); border-radius: 11px;
}
.am-faixa b { color: var(--dourado); }
/* o texto e UM item do flex; sem isso cada <b> vira uma coluna e a frase quebra torta */
.am-faixa .txt { flex: 1; line-height: 1.5; }
.am-faixa .am-bt { flex: none; }

/* -------------------------------------------------------------- conversa */
.am-conversa { position: absolute; inset: 0; display: none; flex-direction: column; background: #241239; }
.am-conversa.abre { display: flex; }
.am-conv-topo {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(0,0,0,.3), transparent);
}
.am-voltar {
  padding: 6px 11px; font-size: 13px; font-weight: 600; color: var(--texto2);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 9px;
}
.am-voltar:hover { color: #fff; }
.am-conv-nome { font-size: 14.5px; font-weight: 600; }
.am-conv-sit { font-size: 11px; color: var(--texto3); }

.am-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.am-msgs::-webkit-scrollbar { width: 7px; }
.am-msgs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 4px; }
.am-msg {
  max-width: 76%; padding: 8px 12px; font-size: 13.5px; line-height: 1.4; word-wrap: break-word;
  border-radius: 14px; align-self: flex-start;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.08);
}
.am-msg.meu {
  align-self: flex-end; color: #2a1600;
  background: linear-gradient(180deg, #ffe08c, var(--dourado2)); border-color: transparent;
}
.am-msg .hora { display: block; margin-top: 3px; font-size: 9.5px; opacity: .6; text-align: right; }

.am-escrever { display: flex; gap: 7px; padding: 10px; border-top: 1px solid rgba(255,255,255,.09); }
.am-escrever input {
  flex: 1; padding: 11px 13px; font-size: 14px; color: #fff; outline: none;
  background: rgba(10,6,24,.85); border: 1px solid var(--carta-borda); border-radius: 11px;
}
.am-escrever input:focus { border-color: #a97bff; box-shadow: 0 0 0 3px rgba(150,100,255,.2); }

@media (max-width: 420px) {
  .am-painel { width: 96vw; height: 92vh; }
  .am-abas button { font-size: 11.5px; padding: 8px 2px; }
  .am-botao { width: 48px; height: 48px; left: 10px; bottom: 10px; }
}
