<!-- ==========================================
     EDUTELLER AI CHAT WIDGET
     Add before </body> in your website template
=========================================== -->



.et-ai-bubble p {
  margin: 0 0 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.et-ai-bubble p:last-child {
  margin-bottom: 0;
}

.et-ai-bubble ul {
  margin: 8px 0 12px;
  padding-left: 22px;
}

.et-ai-bubble li {
  margin-bottom: 6px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.et-ai-bubble a {
  color: #16803d;
  text-decoration: underline;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.et-ai-bubble strong {
  font-weight: 700;
}


#et-ai {
  --et-blue: #075bea;
  --et-navy: #10244b;
  --et-muted: #6980a5;

  font-family: Inter, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--et-navy);

  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  left: auto !important;
  top: auto !important;

  z-index: 2147483647 !important;
  width: auto;
  height: auto;
}

#et-ai * {
  box-sizing: border-box;
}

#et-ai-launcher {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #0877ff, #0646d8);
  box-shadow: 0 8px 28px #075bea55;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}

#et-ai-launcher:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px #075bea66;
}

#et-ai-launcher svg {
  width: 30px;
  height: 30px;
}

#et-ai-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ff514d;
  color: white;
  font-size: 10px;
  font-weight: 800;
  border: 2px solid white;
  border-radius: 20px;
  padding: 3px 6px;
}

#et-ai-window {
  display: none;
  flex-direction: column;
  width: 370px;
  height: min(570px, calc(100dvh - 110px));
  margin-bottom: 14px;
  background: white;
  border: 1px solid #e1eaf7;
  border-radius: 22px;
  box-shadow: 0 18px 65px #122c542b;
  overflow: hidden;
  animation: et-ai-enter .22s ease;
}

#et-ai-window.et-open {
  display: flex;
}

@keyframes et-ai-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.et-ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 16px;
  border-bottom: 1px solid #edf2fa;
  background: #fff;
}

.et-ai-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 25px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1684ff, #064bdc);
  box-shadow: 0 4px 12px #075bea30;
}

.et-ai-heading {
  min-width: 0;
  flex: 1;
}

.et-ai-heading strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #10244b;
}

.et-ai-heading small {
  display: block;
  margin-top: 4px;
  color: #7186a9;
  font-size: 12px;
}

.et-ai-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #079568;
  font-size: 11px;
  margin-top: 5px;
}

.et-ai-online::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
}

.et-ai-header button {
  border: 0;
  background: transparent;
  color: #5d7395;
  font-size: 23px;
  cursor: pointer;
  padding: 4px;
}

#et-ai-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 17px 15px;
  background: #fbfdff;
  scroll-behavior: smooth;
}

.et-ai-message {
  max-width: 94%;
  margin-bottom: 13px;
}

.et-ai-message.et-bot {
  margin-right: auto;
}

.et-ai-message.et-user {
  margin-left: auto;
}

.et-ai-bubble {
  padding: 12px 13px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.et-bot .et-ai-bubble {
  color: #18315a;
  background: #edf4ff;
  border: 1px solid #e2ecff;
  border-top-left-radius: 4px;
}

.et-user .et-ai-bubble {
  color: white;
  background: var(--et-blue);
  border-top-right-radius: 4px;
}

.et-ai-time {
  display: block;
  margin-top: 5px;
  padding: 0 3px;
  font-size: 10px;
  color: #8a9bb5;
}

.et-user .et-ai-time {
  text-align: right;
}

.et-ai-quick-title {
  color: #7186a9;
  font-size: 11px;
  margin: 8px 0 10px;
}

.et-ai-quick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.et-ai-quick button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid #bfdbfe;
  color: #0755d9;
  background: white;
  padding: 11px 12px;
  border-radius: 24px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  transition: background .2s, border-color .2s;
}

.et-ai-quick button:hover {
  background: #edf5ff;
  border-color: #6da8ff;
}

.et-ai-quick button span:first-child {
  font-size: 17px;
}

.et-ai-quick button span:last-child {
  flex: 1;
}

.et-ai-footer {
  padding: 12px;
  border-top: 1px solid #e9eff8;
  background: white;
}

.et-ai-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid #e5edf8;
  border-radius: 25px;
  background: #f8faff;
}

#et-ai-input {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 0;
  outline: none;
  background: transparent;
  color: #142c51;
  font: inherit;
  font-size: 13px;
}

#et-ai-input::placeholder {
  color: #8b9fbe;
}

#et-ai-send {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--et-blue);
  cursor: pointer;
}

#et-ai-send:disabled {
  opacity: .55;
  cursor: wait;
}

#et-ai-send svg {
  width: 19px;
  height: 19px;
}

.et-ai-disclaimer {
  font-size: 10px;
  color: #91a0b5;
  text-align: center;
  padding-top: 9px;
}

.et-ai-typing {
  display: inline-flex;
  gap: 4px;
  padding: 5px 2px;
}

.et-ai-typing span {
  width: 6px;
  height: 6px;
  background: #8da8d0;
  border-radius: 50%;
  animation: et-ai-dot .8s infinite alternate;
}

.et-ai-typing span:nth-child(2) { animation-delay: .2s; }
.et-ai-typing span:nth-child(3) { animation-delay: .4s; }

@keyframes et-ai-dot {
  to { opacity: .3; transform: translateY(-3px); }
}

@media (max-width: 480px) {
  #et-ai {
    right: 12px;
    bottom: 12px;
  }

  #et-ai-window {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 100%;
    width: min(100vw, 420px);
    height:  min(610px, 82dvh);
    margin: 0;
    border-radius: 20px 20px 0 0;
  }

  #et-ai-launcher {
    width: 56px;
    height: 56px;
  }

  #et-ai-window.et-open ~ #et-ai-launcher {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #et-ai *,
  #et-ai *::before,
  #et-ai *::after {
    animation: none !important;
    transition: none !important;
  }
}



/* Keep EduTeller AI above the footer and page content */
body > #et-ai {
  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  top: auto !important;
  left: auto !important;
  z-index: 2147483647 !important;
}

@media (max-width: 480px) {
  body > #et-ai {
    right: 12px !important;
    bottom: 12px !important;
  }
}
