#jt-ai-chatbot,
#jt-ai-chatbot * {
  box-sizing: border-box;
}

#jt-ai-chatbot {
  --jt-brand: #1A4D8F;
  --jt-accent: #1F9D8A;
  --jt-text: #172033;
  --jt-muted: #647084;
  --jt-border: #dfe6ef;
  --jt-surface: #ffffff;
  --jt-soft: #f6f8fb;
  bottom: 22px;
  position: fixed;
  z-index: 999999;
  color: var(--jt-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.jt-chatbot--right {
  right: 22px;
}

.jt-chatbot--left {
  left: 22px;
}

.jt-chatbot__launcher {
  align-items: center;
  background: var(--jt-brand);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(15, 28, 51, 0.26), 0 2px 6px rgba(15, 28, 51, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 700;
  gap: 10px;
  min-height: 56px;
  padding: 10px 18px 10px 10px;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.jt-chatbot__launcher:hover,
.jt-chatbot__launcher:focus-visible {
  box-shadow: 0 20px 46px rgba(15, 28, 51, 0.3), 0 3px 9px rgba(15, 28, 51, 0.14);
  transform: translateY(-1px);
}

.jt-chatbot__launcher-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  display: inline-flex;
  font-size: 13px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.jt-chatbot__panel {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid rgba(205, 216, 230, 0.92);
  border-radius: 8px;
  bottom: 74px;
  box-shadow: 0 28px 80px rgba(15, 28, 51, 0.28), 0 8px 24px rgba(15, 28, 51, 0.12);
  display: flex;
  flex-direction: column;
  max-height: min(680px, calc(100vh - 110px));
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
  width: min(380px, calc(100vw - 28px));
}

.jt-chatbot--right .jt-chatbot__panel {
  right: 0;
}

.jt-chatbot--left .jt-chatbot__panel {
  left: 0;
}

.jt-chatbot--open .jt-chatbot__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.jt-chatbot__header {
  align-items: center;
  background: linear-gradient(135deg, var(--jt-brand), #143a6d);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px;
  position: relative;
}

.jt-chatbot__header::after {
  background: rgba(255, 255, 255, 0.12);
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.jt-chatbot__identity {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.jt-chatbot__avatar {
  align-items: center;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.jt-chatbot__header strong,
.jt-chatbot__header span {
  display: block;
}

.jt-chatbot__header strong {
  font-size: 15px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jt-chatbot__header span {
  align-items: center;
  display: flex;
  font-size: 12px;
  gap: 6px;
  opacity: 0.82;
}

.jt-chatbot__header span i {
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  width: 7px;
}

.jt-chatbot__close {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
  transition: background 140ms ease;
}

.jt-chatbot__close:hover,
.jt-chatbot__close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.jt-chatbot__messages {
  background:
    radial-gradient(circle at top left, rgba(26, 77, 143, 0.05), transparent 36%),
    var(--jt-soft);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
  overflow-y: auto;
  padding: 18px 16px;
}

.jt-chatbot__message {
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  max-width: 86%;
  overflow-wrap: anywhere;
  padding: 11px 13px;
  white-space: pre-wrap;
}

.jt-chatbot__message--assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e7edf5;
  box-shadow: 0 1px 2px rgba(15, 28, 51, 0.06);
}

.jt-chatbot__message--user {
  align-self: flex-end;
  background: var(--jt-brand);
  box-shadow: 0 4px 14px rgba(26, 77, 143, 0.2);
  color: #fff;
}

.jt-chatbot__quick {
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid var(--jt-border);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
}

.jt-chatbot__quick button {
  background: #fff;
  border: 1px solid var(--jt-border);
  border-radius: 999px;
  color: var(--jt-text);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 13px;
  padding: 8px 11px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.jt-chatbot__quick button:hover,
.jt-chatbot__quick button:focus-visible {
  background: rgba(26, 77, 143, 0.06);
  border-color: rgba(26, 77, 143, 0.28);
  color: var(--jt-brand);
}

.jt-chatbot__lead {
  background: #fff;
  border-top: 1px solid var(--jt-border);
  display: grid;
  flex: 0 1 auto;
  gap: 9px;
  max-height: min(360px, 45vh);
  overflow-y: auto;
  padding: 14px;
  overscroll-behavior: contain;
}

.jt-chatbot__lead[hidden] {
  display: none;
}

.jt-chatbot__lead strong {
  font-size: 14px;
  line-height: 1.25;
}

.jt-chatbot__lead input,
.jt-chatbot__lead select,
.jt-chatbot__lead textarea,
.jt-chatbot__composer textarea {
  border: 1px solid var(--jt-border);
  border-radius: 6px;
  color: var(--jt-text);
  font: inherit;
  font-size: 14px;
  outline: none;
  min-height: 42px;
  padding: 10px 11px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}

.jt-chatbot__lead input:focus,
.jt-chatbot__lead select:focus,
.jt-chatbot__lead textarea:focus,
.jt-chatbot__composer textarea:focus {
  border-color: var(--jt-brand);
  box-shadow: 0 0 0 3px rgba(26, 77, 143, 0.16);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--jt-brand) 16%, transparent);
}

.jt-chatbot__consent {
  align-items: flex-start;
  color: var(--jt-muted);
  display: flex;
  font-size: 12px;
  gap: 8px;
  line-height: 1.35;
}

.jt-chatbot__consent input {
  flex: 0 0 auto;
  margin-top: 2px;
  width: auto;
}

.jt-chatbot__lead button,
.jt-chatbot__composer button {
  background: var(--jt-accent);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 12px;
  transition: filter 140ms ease, transform 140ms ease;
}

.jt-chatbot__lead button:hover,
.jt-chatbot__lead button:focus-visible,
.jt-chatbot__composer button:hover,
.jt-chatbot__composer button:focus-visible {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.jt-chatbot__composer {
  align-items: end;
  background: #fff;
  border-top: 1px solid var(--jt-border);
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 14px 14px;
}

.jt-chatbot__composer textarea {
  max-height: 112px;
  min-height: 42px;
  resize: none;
}

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

  .jt-chatbot__launcher {
    margin-left: auto;
  }

  .jt-chatbot__panel {
    bottom: 70px;
    left: 0;
    max-height: calc(100vh - 92px);
    right: 0;
    width: 100%;
  }
}
