/* "Pergunte à mufasa": botão flutuante e janela do chat. Usa as variáveis de cor da paleta. */
.pm-btn {
  position: fixed; z-index: 40; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 20px 8px 8px;
  border: 1.5px solid var(--black, #0b0a08); border-radius: 999px;
  background: var(--sun, #ffc93c); color: var(--black, #0b0a08);
  box-shadow: 4px 4px 0 var(--black, #0b0a08);
  font: 700 14px/1 Outfit, system-ui, sans-serif; letter-spacing: .03em; text-transform: uppercase;
  cursor: pointer; transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.pm-btn:hover { transform: rotate(-3deg); }
.pm-av {
  display: block; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 30%;
  border: 1.5px solid var(--black, #0b0a08); background: var(--paper, #fff);
}
.pm-btn[aria-expanded="true"] { display: none; }

.pm {
  position: fixed; z-index: 50; right: 16px; bottom: 16px;
  display: flex; flex-direction: column;
  width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 32px));
  border: 1.5px solid var(--black, #0b0a08); border-radius: 28px; overflow: hidden;
  background: var(--paper, #fff); color: var(--black, #0b0a08);
  box-shadow: 8px 8px 0 var(--black, #0b0a08);
  font: 500 16px/1.45 Outfit, system-ui, sans-serif;
}
.pm[hidden] { display: none; }
.pm-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 20px;
  border-bottom: 1.5px solid var(--black, #0b0a08); background: var(--sun, #ffc93c);
}
.pm-head .pm-av { width: 40px; height: 40px; }
.pm-head div { flex: 1; }
.pm-head strong { display: block; font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: 1.45rem; line-height: 1; text-transform: uppercase; }
.pm-head small { font-size: 12px; opacity: .75; }
.pm-fechar {
  width: 38px; height: 38px; border: 1.5px solid var(--black, #0b0a08); border-radius: 50%;
  background: var(--paper, #fff); color: inherit; font-size: 20px; line-height: 1; cursor: pointer;
}
.pm-lista { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.pm-msg { max-width: 88%; padding: 11px 15px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pm-msg.ia { align-self: flex-start; background: var(--sand, #fbf0d9); border: 1.5px solid var(--black, #0b0a08); border-bottom-left-radius: 6px; }
.pm-msg.eu { align-self: flex-end; background: var(--black, #0b0a08); color: #fff; border-bottom-right-radius: 6px; }
.pm-msg a { color: inherit; font-weight: 700; }
.pm-msg.pensando { opacity: .7; }
.pm-msg.pensando::after { content: "…"; animation: pm-pisca 1s steps(4) infinite; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes pm-pisca { from { width: 0; } }
.pm-sugestoes { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-sugestoes button {
  padding: 8px 12px; border: 1.5px solid var(--black, #0b0a08); border-radius: 999px;
  background: var(--paper, #fff); color: inherit; font: 700 13px/1.1 Outfit, system-ui, sans-serif; cursor: pointer; text-align: left;
}
.pm-sugestoes button:hover { background: var(--sun, #ffc93c); }
.pm-form { display: flex; gap: 8px; padding: 12px; border-top: 1.5px solid var(--black, #0b0a08); }
.pm-form textarea {
  flex: 1; min-height: 46px; max-height: 120px; padding: 12px 14px; resize: none;
  border: 1.5px solid var(--black, #0b0a08); border-radius: 16px; background: var(--sand, #fbf0d9); color: inherit;
  font: 500 16px/1.35 Outfit, system-ui, sans-serif;
}
.pm-form textarea:focus { outline: 3px solid var(--sun, #ffc93c); outline-offset: 1px; }
.pm-form button {
  align-self: flex-end; height: 46px; padding: 0 18px;
  border: 1.5px solid var(--black, #0b0a08); border-radius: 999px;
  background: var(--black, #0b0a08); color: #fff; font: 700 14px/1 Outfit, system-ui, sans-serif; text-transform: uppercase; cursor: pointer;
}
.pm-form button:disabled { opacity: .5; cursor: default; }
.pm-aviso { margin: 0; padding: 0 16px 12px; font-size: 12px; opacity: .65; }
.pm-aviso a { color: inherit; }
@media (max-width: 680px) {
  .pm-btn { padding: 8px; }
  .pm-btn .pm-rotulo { display: none; }
  .pm { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-btn { transition: none; }
  .pm-msg.pensando::after { animation: none; }
}
