#estelar-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #01a4ff, #052659);
  color: white;
  font: 700 17px Montserrat, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 28px #05265955;
}
#estelar-launcher:hover { transform: translateY(-3px); }

#estelar-panel {
  position: fixed;
  z-index: 99999;
  right: 24px;
  bottom: 100px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 130px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 45px #001b3b35;
  border: 1px solid #dceaf5;
  font-family: Montserrat, Arial, sans-serif;
}
#estelar-panel.estelar-open { display: flex; }

.estelar-header {
  padding: 18px;
  color: white;
  background: linear-gradient(120deg, #052659, #087ac0);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.estelar-heading { display: flex; align-items: center; gap: 11px; }
.estelar-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: #ffffff20; border: 1px solid #ffffff55;
  font-size: 21px;
}
.estelar-name { font-size: 16px; font-weight: 700; }
.estelar-status { font-size: 11px; opacity: .85; margin-top: 4px; }
#estelar-close {
  border: 0; background: transparent; color: white;
  font-size: 26px; cursor: pointer; padding: 0 4px;
}
.estelar-messages {
  flex: 1; overflow-y: auto; padding: 17px;
  display: flex; flex-direction: column; gap: 12px;
  background: #f5f9fc;
}
.estelar-message {
  max-width: 88%; padding: 12px 14px;
  border-radius: 14px; font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.estelar-bot {
  align-self: flex-start; color: #18334c;
  background: white; border: 1px solid #e1ebf3;
  border-bottom-left-radius: 4px;
}
.estelar-user {
  align-self: flex-end; color: white;
  background: #087ac0; border-bottom-right-radius: 4px;
}
.estelar-typing { color: #64788a; font-size: 12px; }
.estelar-form {
  display: flex; gap: 8px; padding: 13px;
  border-top: 1px solid #e5edf3; background: white;
}
#estelar-input {
  min-width: 0; flex: 1; border: 1px solid #d5e1eb;
  border-radius: 22px; padding: 12px 14px;
  font: 13px Montserrat, Arial, sans-serif; outline: none;
}
#estelar-input:focus { border-color: #01a4ff; }
#estelar-send {
  width: 43px; height: 43px; flex: 0 0 43px;
  border: 0; border-radius: 50%; color: white;
  background: #087ac0; font-size: 18px; cursor: pointer;
}
#estelar-send:disabled { opacity: .5; cursor: wait; }
@media (max-width: 480px) {
  #estelar-launcher { right: 16px; bottom: 16px; }
  #estelar-panel {
    right: 8px; bottom: 88px;
    width: calc(100vw - 16px);
    max-width: none; height: min(520px, calc(100vh - 105px));
  }
}


.estelar-full-link {
  display: block;
  padding: 11px 12px;
  text-align: center;
  color: #087ac0;
  background: #fff;
  border-top: 1px solid #e5edf3;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease;
}

.estelar-full-link:hover {
  background: #f0f8fd;
  color: #052659;
}

/* Ajuste do chat Estelar para celulares */
@media (max-width: 480px) {
  #estelar-panel {
    width: calc(100vw - 24px) !important;
    max-width: 340px !important;
    height: min(440px, calc(100vh - 120px)) !important;
    max-height: calc(100dvh - 120px) !important;
    right: 12px !important;
    bottom: 84px !important;
    box-sizing: border-box;
  }
}
