.ba-assistant-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1080;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: #143d59;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
}

.ba-assistant-launcher:hover {
  background: #0f2f45;
}

.ba-assistant-launcher.is-hidden {
  display: none;
}

.ba-assistant-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1080;
  width: min(420px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 44px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
}

.ba-assistant-panel.is-open {
  display: flex;
}

.ba-assistant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 12px;
  background: linear-gradient(135deg, #143d59, #1d5a7d);
  color: #fff;
}

.ba-assistant-title {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.ba-assistant-subtitle {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  line-height: 1.3;
}

.ba-assistant-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ba-assistant-context {
  padding: 9px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.ba-assistant-thread {
  min-height: 220px;
  max-height: 390px;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
}

.ba-assistant-empty {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ba-assistant-message {
  margin-bottom: 12px;
}

.ba-assistant-message-label {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ba-assistant-message-body {
  white-space: pre-wrap;
  border-radius: 14px;
  padding: 10px 12px;
  color: #0f172a;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ba-assistant-message-user .ba-assistant-message-body {
  margin-left: 38px;
  background: #143d59;
  color: #fff;
  border-color: #143d59;
}

.ba-assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 0;
  background: #fff;
}

.ba-assistant-suggestion {
  border: 1px solid rgba(20, 61, 89, 0.2);
  border-radius: 999px;
  padding: 7px 10px;
  background: #f8fafc;
  color: #143d59;
  font-size: 0.78rem;
  font-weight: 800;
}

.ba-assistant-suggestion:hover {
  background: #eef6fb;
}

.ba-assistant-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px 10px;
  background: #fff;
}

.ba-assistant-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  padding: 10px 11px;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.35;
}

.ba-assistant-input:focus {
  outline: none;
  border-color: #1d5a7d;
  box-shadow: 0 0 0 3px rgba(29, 90, 125, 0.14);
}

.ba-assistant-send {
  border: 0;
  border-radius: 12px;
  padding: 10px 13px;
  background: #f59e0b;
  color: #111827;
  font-weight: 900;
}

.ba-assistant-send:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ba-assistant-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 12px;
  color: #64748b;
  background: #fff;
  font-size: 0.72rem;
}

.ba-assistant-clear {
  border: 0;
  background: transparent;
  color: #143d59;
  font-weight: 800;
  padding: 0;
}

@media (max-width: 640px) {
  .ba-assistant-panel,
  .ba-assistant-launcher {
    right: 14px;
    bottom: 14px;
  }

  .ba-assistant-panel {
    max-height: calc(100vh - 28px);
  }
}
