.leltek-chatbot {
  position: fixed;
  right: 120px;
  bottom: 16px;
  z-index: 9999;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

.leltek-chatbot--inline {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
  max-width: 760px;
}

button.leltek-chatbot__toggle,
button.leltek-chatbot__toggle[type="button"] {
  width: 36px;
  height: 36px;
  border: 0 !important;
  border-radius: 999px;
  background: none !important;
  background-color: transparent !important;
  color: #fff;
  box-shadow: none !important;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.08em;
  outline: none !important;
  padding: 0 !important;
  margin: 0;
  display: block;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent;
}

button.leltek-chatbot__toggle:focus,
button.leltek-chatbot__toggle:focus-visible,
button.leltek-chatbot__toggle:hover,
button.leltek-chatbot__toggle:active,
button.leltek-chatbot__toggle[type="button"]:focus,
button.leltek-chatbot__toggle[type="button"]:focus-visible,
button.leltek-chatbot__toggle[type="button"]:hover,
button.leltek-chatbot__toggle[type="button"]:active {
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
  background: transparent !important;
}

button.leltek-chatbot__toggle::before,
button.leltek-chatbot__toggle::after,
button.leltek-chatbot__toggle[type="button"]::before,
button.leltek-chatbot__toggle[type="button"]::after {
  display: none !important;
  content: none !important;
}

.leltek-chatbot__toggle-icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.leltek-chatbot__toggle:active .leltek-chatbot__toggle-icon,
.leltek-chatbot__toggle.is-dragging .leltek-chatbot__toggle-icon {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.leltek-chatbot__toggle-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.leltek-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(380px, calc(100vw - 32px));
  max-height: min(70dvh, 620px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1.5px solid #d0d5db;
  z-index: 2;
}

.leltek-chatbot--floating .leltek-chatbot__panel {
  transform-origin: bottom right;
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  pointer-events: none;
}

.leltek-chatbot--floating .leltek-chatbot__panel--visible {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.leltek-chatbot--inline .leltek-chatbot__panel {
  position: static;
  right: auto;
  bottom: auto;
  width: 100%;
  max-height: none;
  box-shadow: none;
  border-radius: 18px;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.leltek-chatbot__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #2d3436, #3a4245);
  border-bottom: none;
}

.leltek-chatbot__header-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.leltek-chatbot__header-copy {
  flex: 1;
  min-width: 0;
}

.leltek-chatbot__title-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.leltek-chatbot__title {
  margin: 0;
  display: block;
  min-width: 0;
  flex: 0 1 auto;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  font-family: "Raleway", "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  letter-spacing: 0.01em;
}

.leltek-chatbot__disclaimer-button {
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  transform: translateY(-3px);
  flex: 0 0 auto;
}

.leltek-chatbot__disclaimer-button:hover,
.leltek-chatbot__disclaimer-button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.leltek-chatbot__disclaimer-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 56px 16px 16px 58px;
  background: rgba(17, 24, 39, 0.12);
}

.leltek-chatbot__disclaimer-card {
  position: relative;
  width: min(300px, calc(100% - 12px));
  padding: 14px 16px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(47, 55, 59, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
  color: #fff;
}

.leltek-chatbot__disclaimer-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.leltek-chatbot__disclaimer-close:hover,
.leltek-chatbot__disclaimer-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  outline: none;
}

.leltek-chatbot__disclaimer-heading {
  margin: 0 24px 8px 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.leltek-chatbot__disclaimer-body {
  margin: 0 24px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

.leltek-chatbot__subtitle {
  display: none;
}

.leltek-chatbot__expand {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.leltek-chatbot__expand:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Expanded panel size */
.leltek-chatbot__panel.is-expanded {
  width: min(520px, calc(100vw - 32px));
  max-height: min(80dvh, 780px);
}

.leltek-chatbot__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease;
}

.leltek-chatbot__close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.04);
}

.leltek-chatbot--inline .leltek-chatbot__close,
.leltek-chatbot--inline .leltek-chatbot__toggle {
  display: none;
}

.leltek-chatbot__messages {
  padding: 16px 18px;
  overflow: auto;
  flex: 1;
  background: #e8eef4;
}

.leltek-chatbot__message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}

.leltek-chatbot__message--user {
  background: #a6ff00;
  color: #1a1a1a;
  margin-left: 44px;
  border-top-right-radius: 2px;
}

.leltek-chatbot__message--user::after {
  content: '';
  position: absolute;
  top: -6px;
  right: -10px;
  width: 12px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='20' viewBox='0 0 12 20'%3E%3Cpath d='M0,6 L0,20 C0,10 12,3 12,0 Z' fill='%23a6ff00'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.leltek-chatbot__message--assistant {
  background: #fff;
  color: #1e293b;
  margin-right: 44px;
  border-top-left-radius: 2px;
}

.leltek-chatbot__message--assistant::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -10px;
  width: 12px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='20' viewBox='0 0 12 20'%3E%3Cpath d='M12,6 L12,20 C12,10 0,3 0,0 Z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.leltek-chatbot__answer {
  white-space: pre-wrap;
}

.leltek-chatbot__bullet {
  position: relative;
  margin: 2px 0;
  padding-left: 1.2em;
}

.leltek-chatbot__bullet::before {
  content: "\25B6";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.8em;
  line-height: 1.9;
}

/* Typing indicator — three bouncing dots */
.leltek-chatbot__typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}

.leltek-chatbot__typing span {
  width: 8px;
  height: 8px;
  background: #8c8c8c;
  border-radius: 50%;
  animation: leltek-bounce 1.2s infinite ease-in-out;
}

.leltek-chatbot__typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.leltek-chatbot__typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes leltek-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.leltek-chatbot__sources {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: #5b6472;
}

.leltek-chatbot__sources a {
  color: #1d5a7e;
  text-decoration: none;
}

.leltek-chatbot__sources a:hover {
  text-decoration: underline;
}

.leltek-chatbot__form {
  padding: 14px 16px 16px;
  border-top: 1px solid #e8ecf0;
  background: #fff;
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.leltek-chatbot__input {
  flex: 1 1 auto;
  min-height: 84px;
  padding: 12px 14px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid #e0e4e8;
  font: inherit;
  background: #fff;
}

.leltek-chatbot__actions {
  margin-top: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.leltek-chatbot__send {
  border: 0;
  border-radius: 999px;
  min-width: 88px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #2d3436, #3a4245);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(45, 52, 54, 0.25);
  transition: filter 0.15s ease;
}

.leltek-chatbot__send:hover {
  filter: brightness(1.15);
}

@media (max-width: 640px) {
  .leltek-chatbot__expand {
    display: none;
  }

  .leltek-chatbot {
    right: 20px;
    left: auto;
    bottom: 60px;
  }

  .leltek-chatbot__panel {
    position: fixed;
    right: 8px;
    left: 8px;
    bottom: 112px;
    width: auto;
    max-height: calc(100dvh - 80px);
  }

  .leltek-chatbot__disclaimer-overlay {
    padding: 54px 10px 10px;
    align-items: flex-start;
    justify-content: center;
  }

  .leltek-chatbot__disclaimer-card {
    width: 100%;
    max-width: none;
    border-radius: 12px;
  }

  .leltek-chatbot__disclaimer-button {
    transform: translateY(-4px);
  }

  .leltek-chatbot--floating .leltek-chatbot__panel {
    transform-origin: bottom right;
  }

  .leltek-chatbot__message--user {
    margin-left: 28px;
    margin-right: 0;
  }

  .leltek-chatbot__message--assistant {
    margin-left: 0;
    margin-right: 28px;
  }

  .leltek-chatbot__form {
    flex-direction: column;
  }

  .leltek-chatbot__actions {
    justify-content: stretch;
  }

  .leltek-chatbot__send {
    width: 100%;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .leltek-chatbot {
    display: none !important;
  }
}
