/* Botão flutuante de WhatsApp (campus, vitrine e funil). Verde da marca do WhatsApp: #24d366. */

/* Painel com a lista de atendentes, aberto pelo botão */
.whatsapp { position: fixed; z-index: 999999999; right: 20px; bottom: 90px; overflow: hidden; width: 380px; max-width: calc(100% - 40px); border-radius: 15px; box-shadow: 0 0 4px rgba(0, 0, 0, .3); }

.whatsapp__content { display: none; overflow: auto; max-height: calc(100vh - 160px); background-color: #fff; }

.whatsapp__content::-webkit-scrollbar { width: 7px; background-color: rgba(36, 211, 102, .7); }

.whatsapp__content::-webkit-scrollbar-thumb { border-radius: 5px; background-color: transparent; box-shadow: inset 0 0 10px rgba(0, 0, 0, .3); }

/* Cabeçalho: verde com atendente no horário, amarelo fora do horário */
.whatsapp__header { padding: 30px 30px 100px; background: url(images/tema.png) 0 0 / 80% repeat, linear-gradient(135deg, #00a13c 0%, rgba(0, 161, 60, .8) 100%); }

.whatsapp__header--wait { background: url(images/tema.png) 0 0 / 80% repeat, linear-gradient(135deg, #cdb747 0%, #b79e07 100%); }

.whatsapp__title,
.whatsapp__description {
  color: #fff;
  text-shadow: 0 .02rem .08rem rgba(0, 0, 0, .08);
}

.whatsapp__title { margin-bottom: 10px; font-size: 2em; font-weight: 500; }

.whatsapp__description { font-size: 1em; }

.whatsapp__header.is-scroll .whatsapp__title, .whatsapp__header.is-scroll .whatsapp__description { opacity: .7; }

/* Cartão de cada atendente; o primeiro sobe por cima do cabeçalho */
.whatsapp__contact { width: 90%; margin: 15px auto; padding: 15px; border-radius: 15px; background-color: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .3); }

.whatsapp__contact--float { margin-top: -60px; }

.whatsapp__wrap { display: flex; align-items: center; margin-bottom: 20px; }

.whatsapp__avatar { width: 50px; margin-right: 15px; border: 4px solid #24d366; border-radius: 50%; }

.whatsapp__name { margin-bottom: 0; color: #333; font-size: 1.1em; font-weight: 500; line-height: 1.2em; }

.whatsapp__legend { color: #666; font-size: .875em; }

/* Ícones (Remix Icon) */
.whatsapp__icon--link,
.whatsapp__icon--button,
.whatsapp__icon--send {
  color: #fff;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.whatsapp__icon--button,
.whatsapp__icon--send {
  display: inline-block;
  vertical-align: middle;
}

/* Atendente sem chat: link direto para a conversa */
.whatsapp__link, .whatsapp__send, .whatsapp__button { display: flex; align-items: center; justify-content: center; }

.whatsapp__link { padding: 10px 0; border-radius: 25px; background-color: #24d366; font-size: .875em; text-decoration: none; }

.whatsapp__link,
.whatsapp__link:hover,
.whatsapp__link:focus {
  color: #fff;
}

.whatsapp__icon--link { flex-shrink: 0; margin-right: 10px; font-size: 1.375rem; }

/* Atendente com chat: campo da pergunta e botão de enviar */
.whatsapp__label { display: flex; }

.whatsapp__field {
  display: block;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 3px 0 0 3px;
  outline: none;
  background-color: #f1f1f1;
  color: #444;
  font-weight: 500;
}

.whatsapp__field::placeholder {
  color: #ccc;
}

.whatsapp__send {
  width: 50px;
  border: none;
  border-radius: 0 3px 3px 0;
  outline: none;
  background-color: #24d366;
  cursor: pointer;
}

.whatsapp__icon--send {
  font-size: 1.25rem;
}

.whatsapp .visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Botão fixo no canto: com o texto "WhatsApp"; vira um círculo com o X quando o painel abre */
.whatsapp__button { position: fixed; right: 20px; bottom: 20px; gap: 0; width: auto; min-width: 168px; padding: 10px 16px; border: none; border-radius: 999px; background-color: #24d366; box-shadow: 0 2px 10px rgba(0, 140, 65, .2); color: #fff; font-size: .8125em; font-weight: 500; letter-spacing: .01em; text-decoration: none; transition: width .22s ease, height .22s ease, min-width .22s ease, padding .22s ease, border-radius .22s ease, box-shadow .2s ease, background-color .2s ease; }

.whatsapp__button:hover,
.whatsapp__button:focus {
  background-color: #20bd5a;
  box-shadow: 0 3px 12px rgba(0, 130, 60, .24);
  color: #fff;
  text-decoration: none;
}

.whatsapp__button.is-active { gap: 0; width: 56px; min-width: 56px; height: 56px; padding: 0; border-radius: 50%; box-shadow: 0 2px 12px rgba(0, 140, 65, .22); }

.whatsapp__icon--button { margin-right: 10px; font-size: 26px; }

.whatsapp__button.is-active .whatsapp__icon--button { margin-right: 0; font-size: 30px; }

.whatsapp__effect {
  display: inline-block;
  overflow: hidden;
  min-width: 0;
  max-width: 12em;
  opacity: 1;
  white-space: nowrap;
  vertical-align: middle;
  transition: max-width .22s ease, opacity .2s ease;
}

.whatsapp__button.is-active .whatsapp__effect {
  max-width: 0;
  opacity: 0;
}

.whatsapp__hidden { color: #fff; }

/* Até 768px: painel e botão mais perto da borda; o botão fica só com o ícone */
@media all and (max-width: 48em) {
  .whatsapp { right: 10px; bottom: 80px; }

  .whatsapp__button { right: 10px; bottom: 10px; width: 54px; min-width: 54px; height: 54px; padding: 0; border-radius: 50%; }

  .whatsapp__icon--button { margin-right: 0; font-size: 28px; }

  .whatsapp__button.is-active .whatsapp__icon--button {
    font-size: 32px;
  }

  .whatsapp__hidden { display: none; }
}
