wc-ai-assistant {
  display: block;
  position: relative;
  z-index: 240;
  pointer-events: none;
}
body.energisa-ai-open wc-ai-assistant {
  z-index: 10200;
  pointer-events: auto;
}
body.energisa-ai-open header.menu,
body.energisa-ai-open .menu .navbar,
body.energisa-ai-open .cta-float,
body.energisa-ai-open #back-to-top,
body.energisa-ai-open .vlibras,
body.energisa-ai-open [vw],
body.energisa-ai-open [vw-access-button],
body.energisa-ai-open .vw-plugin-wrapper {
  visibility: hidden !important;
  pointer-events: none !important;
}
.energisa-ai-fab {
  position: fixed;
  right: max(1.2rem, env(safe-area-inset-right));
  bottom: calc(1.4rem + env(safe-area-inset-bottom));
  z-index: 241;
  pointer-events: auto;
  width: 5.6rem;
  height: 5.6rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff7700, #ef6000);
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 0.8rem 2.4rem rgba(255, 119, 0, 0.45);
  font-size: 2.2rem;
}
.energisa-ai-fab[hidden] { display: none !important; }
.energisa-ai-fab:focus-visible { outline: 3px solid #ffd36a; outline-offset: 3px; }
.energisa-ai-panel {
  pointer-events: auto;
  position: fixed;
  right: 1.6rem;
  bottom: 8.2rem;
  width: min(38rem, calc(100vw - 2.4rem));
  height: min(62rem, calc(100vh - 10rem));
  max-height: calc(100vh - 8rem);
  background: #fff;
  color: #1f1f1f !important;
  border-radius: 1.6rem;
  box-shadow: 0 16px 40px rgba(3, 11, 56, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 242;
  transform: translateY(1.2rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.energisa-ai-panel.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  z-index: 10100;
}
.energisa-ai-panel[hidden] { display: none !important; }
.energisa-ai-head {
  flex: 0 0 auto;
  background: var(--c-kv, #063a8c);
  color: #fff !important;
  padding: 1.4rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.energisa-ai-head h2,
.energisa-ai-head p { color: #fff !important; }
.energisa-ai-head h2 { margin: 0; font-size: 1.6rem; }
.energisa-ai-head p { margin: 0.2rem 0 0; font-size: 1.2rem; opacity: 0.85; }
.energisa-ai-close {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff !important;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  cursor: pointer;
}
.energisa-ai-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.6rem 1.4rem 2.8rem;
  background: #f4f7fb;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.energisa-ai-msg {
  max-width: 88%;
  margin: 0 0 1rem;
  padding: 1.1rem 1.3rem;
  border-radius: 1.2rem;
  font-size: 1.4rem;
  line-height: 1.5;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.energisa-ai-msg--bot {
  background: #fff;
  color: #1f1f1f !important;
}
.energisa-ai-msg--bot p,
.energisa-ai-msg--bot span,
.energisa-ai-msg--bot strong,
.energisa-ai-msg--bot b,
.energisa-ai-msg--bot em,
.energisa-ai-msg--bot i,
.energisa-ai-msg--bot li,
.energisa-ai-msg--bot h1,
.energisa-ai-msg--bot h2,
.energisa-ai-msg--bot h3,
.energisa-ai-msg--bot h4,
.energisa-ai-msg--bot code {
  color: #1f1f1f !important;
  -webkit-text-fill-color: #1f1f1f;
}
.energisa-ai-msg--bot a,
.energisa-ai-msg--bot a span,
.energisa-ai-msg--bot a strong {
  color: #c45a00 !important;
  -webkit-text-fill-color: #c45a00;
  font-weight: 700;
}
.energisa-ai-msg--user {
  margin-left: auto;
  background: var(--c-kv, #063a8c);
  color: #fff !important;
}
.energisa-ai-msg--user,
.energisa-ai-msg--user p,
.energisa-ai-msg--user span,
.energisa-ai-msg--user strong {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}
.energisa-ai-msg--typing span {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin: 0 0.15rem;
  border-radius: 50%;
  background: #889;
  animation: ai-dot 1s infinite ease-in-out;
}
.energisa-ai-msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.energisa-ai-msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.energisa-ai-form {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  padding: 1rem;
  border-top: 1px solid #e6ebf3;
  background: #fff;
  position: relative;
}
.energisa-ai-form__field {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}
.energisa-ai-form .float-placeholder,
.energisa-ai-form .visually-hidden {
  display: none !important;
}
.energisa-ai-form textarea,
.energisa-ai-form textarea.form-control-preenchido {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 4.8rem;
  max-height: 12rem;
  margin: 0;
  resize: none;
  overflow-y: auto;
  border: 1px solid #d5deea;
  border-radius: 1.2rem;
  padding: 1.2rem 1.4rem;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1.35;
  color: #1f1f1f !important;
  background: #fff;
  box-shadow: none;
}
.energisa-ai-form textarea:focus {
  outline: 0;
  border-color: var(--c-kv, #063a8c);
  box-shadow: 0 0 0 0.3rem rgba(6, 58, 140, 0.16);
}
.energisa-ai-send {
  flex: 0 0 4.8rem;
  width: 4.8rem;
  min-width: 4.8rem;
  height: 4.8rem;
  padding: 0;
  border: 0;
  border-radius: 1.2rem;
  background: var(--c-orange1, #ff7700) !important;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transform: none;
  filter: none;
}
.energisa-ai-send svg {
  display: block;
  width: 2.2rem;
  height: 2.2rem;
  margin-left: 0.15rem;
}
.energisa-ai-send:hover,
.energisa-ai-send:focus-visible {
  background: var(--c-orange2, #ef6000) !important;
  color: #fff !important;
  transform: none;
  filter: none;
}
.energisa-ai-send:focus-visible {
  outline: 3px solid #ffd36a;
  outline-offset: 2px;
}
.energisa-ai-send:disabled {
  opacity: 0.6;
  cursor: wait;
}
body.energisa-ai-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}
html.energisa-ai-open {
  overflow: hidden;
  height: 100%;
}
@media (max-width: 991px) {
  .energisa-ai-panel,
  .energisa-ai-panel.is-open {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 100dvh;
    height: 100svh;
    max-height: 100dvh;
    border-radius: 0;
    transform: none;
  }
  .energisa-ai-head {
    flex-shrink: 0;
    padding-top: max(1.2rem, env(safe-area-inset-top, 0px));
  }
  .energisa-ai-messages {
    flex: 1 1 auto;
    min-height: 0;
  }
  .energisa-ai-form {
    flex-shrink: 0;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }
  .energisa-ai-form textarea,
  .energisa-ai-form textarea.form-control-preenchido {
    font-size: 16px;
  }
}
