@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --font-primary: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
}

body {
  margin: 0;
  background: #f1f1f1;
  color: #7B2CFF;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.chat-header {
  position: sticky;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;           
  padding: 0 16px;       
  box-sizing: border-box;
  margin-bottom: 0px !important;
}

.velvet-logo {
  max-height: 180px;   
  width: auto;
  display: flex;
  align-items: center;
}

.velvet-logo {
  transform: translateY(-1px);
}

.btn-voltar {
  display: flex;
  align-items: center;
  gap: 24px;
  border: none;
  outline: none;
  background: transparent;
}

.btn-voltar img {
  width: 26px;
  height: 26px;
  border: none;
  outline: none;
  background: transparent;
}

.btn-voltar img:hover {
  opacity: 1;
}

@media (max-width: 600px) {
  .chat-header {
    height: 90px;
    padding: 0 12px;
  }

  .velvet-logo {
    width: 150px;
    height: 150px;
  }

  .btn-voltar img {
    width: 22px;
    height: 22px;
    border: none;
    outline: none;
    background: transparent;
  }
}

/* ===============================
   SEPARADORES UNIFICADOS (FORÇA)
================================ */
.chat-header {
  border-bottom: 1px solid #C9C9C9 !important;
}

.chat-input {
  border-top: 1px solid #C9C9C9 !important;
}

#msgInput {
    flex: 1;
    height: 36px;
    padding: 0 14px;
    border-radius: 14px;
    background: #fff !important;
    border: 1px solid #C9C9C9 !important;
    font-size: 13px;
    line-height: normal;
}

/* ===============================
   INPUT FIXO (APP)
================================ */
.chat-input {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;

  height: 64px;
  background: #f1f1f1;;                /* 🔥 igual header */
  border-top: 1px solid #C9C9C9;      /* mesmo separador */

  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  padding-bottom: env(safe-area-inset-bottom);
}

/* botão mídia (MAIOR, SEM FUNDO EXTRA) */
#btnEnviarConteudo1 {
  width: 30px;
  height: 30px;
  border-radius: 50%;

  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

#btnEnviarConteudo1 img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* input de texto (SEM “tabela estranha”) */
.chat-input input {
  flex: 1;
  background: #E1E1E1;     /* 🔥 igual header */
  border: none;
  border-radius: 20px;

  padding: 10px 14px;
  font-size: 15px;
  outline: none;
  color: #1E1E26;
}

/* botão enviar (MAIOR) */
.btn-enviar1 {
  width: 30x;
  height: 30px;
  border-radius: 50%;

  background: transparent !important;
  border: none;
  padding: 0;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-enviar1 img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* ===============================
   ÁREA DE MENSAGENS (SCROLL)
================================ */
.chat-box {
  position: flex;
  top: calc(64px + env(safe-area-inset-top));
  bottom: calc(64px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;

  background: #fff;        /* 🔥 fundo branco */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===============================
   BOLHAS
================================ */
.msg {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
}

.msg.modelo {
  align-self: flex-end;
  background: #7B2CFF;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg.cliente {
  align-self: flex-start;
  background: #F1F1F4;
  color: #1E1E26;
  border-bottom-left-radius: 4px;
}

/* hora */
.msg-hora {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.6;
  text-align: right;
}

.msg.cliente .msg-hora {
  text-align: left;
}

.btn-back:active,
#btnEnviarConteudo1:active,
.btn-enviar1:active {
  transform: scale(0.92);
  opacity: 0.8;
}


/* ===============================
   POPUP EDITAR MENSAGEM
================================ */

#menuMensagem {
  position: fixed;
  inset: 0;
  z-index: 9999; /* 🔥 isso é o mais importante */
}

#menuMensagem.hidden {
  display: none;
}

#menuMensagem .popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

#menuMensagem .popup-box {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 400px;
  margin: 25% auto;
  padding: 16px;
  border-radius: 12px;
  z-index: 10000;
}

#menuMensagem textarea {
  width: 100%;
  min-height: 90px;
  margin: 12px 0;
  padding: 10px;
}

/* ===============================
   MENU ⋮ DA MENSAGEM (NEUTRO)
================================ */

.msg {
  position: relative; /* necessário pro posicionamento do ⋮ */
}

/* botão ⋮ */
.msg-menu {
  position: absolute;
  top: 6px;
  right: 6px;

  background: transparent;
  border: none;
  padding: 4px;

  font-size: 16px;
  line-height: 1;
  cursor: pointer;

  color: rgba(255, 255, 255, 0.55); /* neutro */
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}

/* aparece só no hover */
.msg:hover .msg-menu {
  opacity: 1;
}

/* hover do botão */
.msg-menu:hover {
  color: rgba(255, 255, 255, 0.9);
}

