.bis-ai-widget-toggle {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 2147483640 !important;
  width: auto !important;
  min-width: 120px;
  max-width: 220px;
  display: inline-block !important;
  border: 0 !important;
  border-radius: 24px !important;
  padding: 12px 16px !important;
  background: #ff7a00 !important;
  color: #fff !important;
  font: bold 14px/1 Arial, sans-serif !important;
  line-height: 1 !important;
  text-align: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  white-space: nowrap;
}

.bis-ai-widget-panel {
  position: fixed !important;
  right: 20px !important;
  bottom: 74px !important;
  z-index: 2147483640 !important;
  width: 380px;
  height: 520px;
  border: 1px solid #e5e9f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  display: none;
  overflow: hidden;
}

.bis-ai-widget-panel.open {
  display: flex;
  flex-direction: column;
}

.bis-ai-widget-header {
  background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
  border-bottom: 1px solid #e5e9f2;
  padding: 12px 14px;
  color: #1c2b45;
  font: bold 14px/1.2 Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bis-ai-widget-header-title {
  display: inline-block;
  padding-right: 8px;
}

.bis-ai-widget-close {
  width: 28px;
  height: 28px;
  border: 1px solid #d6ddeb;
  border-radius: 8px;
  background: #ffffff;
  color: #66758f;
  font: bold 20px/24px Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.bis-ai-widget-close:hover {
  background: #f0f5ff;
  color: #334e7d;
  border-color: #c2d1ea;
}

.bis-ai-widget-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(90, 159, 255, 0.2);
}

.bis-ai-widget-messages {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  padding: 12px;
  font: 13px/1.4 Arial, sans-serif;
  background: #ffffff;
}

.bis-ai-widget-msg {
  margin: 0 0 10px 0;
  clear: both;
}

.bis-ai-widget-msg-user {
  text-align: right;
}

.bis-ai-widget-bubble {
  display: inline-block;
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bis-ai-widget-msg-user .bis-ai-widget-bubble {
  background: #e9f2ff;
  border: 1px solid #d5e6ff;
}

.bis-ai-widget-msg-bot .bis-ai-widget-bubble {
  background: #f7f8fa;
  border: 1px solid #eceef3;
}

.bis-ai-widget-msg-waiting .bis-ai-widget-bubble {
  color: #4a556d;
  background: #f2f6fc;
  min-width: 44px;
  text-align: center;
}

.bis-ai-widget-dots {
  display: inline-block;
  margin: 0;
  line-height: 1;
}

.bis-ai-widget-dots i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 2px;
  border-radius: 50%;
  background: #7f8da8;
  animation: bis-ai-widget-dot 1s infinite ease-in-out;
}

.bis-ai-widget-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.bis-ai-widget-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bis-ai-widget-dot {
  0%,
  80%,
  100% {
    transform: scale(0.65);
    opacity: 0.55;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.bis-ai-widget-input-wrap {
  flex: 0 0 auto;
  border-top: 1px solid #e5e9f2;
  padding: 12px;
  background: #fbfcff;
  display: block;
}

.bis-ai-widget-input {
  width: 100%;
  min-height: 108px;
  height: 108px;
  border: 1px solid #c9d4e5;
  border-radius: 8px;
  padding: 10px 12px !important;
  color: #22324d;
  font: 14px Arial, sans-serif !important;
  line-height: 1.35 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  display: block !important;
  margin: 0 0 10px 0;
  resize: none;
  overflow-y: auto;
  text-align: left !important;
  text-indent: 0 !important;
  white-space: pre-wrap;
  appearance: none;
}

textarea.bis-ai-widget-input {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  line-height: 1.35 !important;
}

#bis-ai-widget-input {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  line-height: 20px !important;
  font-size: 14px !important;
}

#bis-ai-widget-input::placeholder {
  line-height: 20px !important;
}

.bis-ai-widget-input:focus {
  outline: none;
  border-color: #5a9fff;
  box-shadow: 0 0 0 3px rgba(90, 159, 255, 0.15);
}

.bis-ai-widget-send {
  width: 132px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  margin-left: 0;
  background: linear-gradient(135deg, #2f86eb 0%, #1f6fd6 100%);
  color: #fff;
  font: bold 13px/1 Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(47, 134, 235, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  float: right;
}

.bis-ai-widget-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(47, 134, 235, 0.32);
}

.bis-ai-widget-send:active {
  transform: translateY(0);
}

.bis-ai-widget-send:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
  box-shadow: none;
}

@media (max-width: 480px) {
  .bis-ai-widget-panel {
    right: 8px !important;
    left: 8px;
    width: auto;
    bottom: 64px !important;
    height: 78vh;
    max-height: 520px;
  }

  .bis-ai-widget-toggle {
    right: 8px !important;
    bottom: 8px !important;
  }
}

.bis-ai-widget-hint {
  color: #97a0b2;
  font: 11px Arial, sans-serif;
  margin-top: 8px;
}
