.sac-chatbot {
  border: 1px solid #ddd;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  font-family: Arial, sans-serif;
  width: 100%;
}

.sac-inline-chatbot {
  max-width: 700px;
}

.sac-header {
  background: #111827;
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sac-header-title {
  display: block;
}

.sac-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.sac-messages {
  height: var(--sac-height, 420px);
  overflow-y: auto;
  padding: 16px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sac-message {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.sac-user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
}

.sac-assistant {
  align-self: flex-start;
  background: #e5e7eb;
  color: #111827;
}

.sac-form {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #eee;
  background: #fff;
}

.sac-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.sac-button {
  border: none;
  background: #111827;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.sac-button:disabled,
.sac-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Floating widget */
.sac-floating-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.sac-floating-launcher {
  border: none;
  background: #111827;
  color: #fff;
  padding: 14px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.sac-floating-panel {
  width: min(380px, calc(100vw - 24px));
}

.sac-floating-chatbot {
  width: 100%;
}

@media (max-width: 600px) {
  .sac-floating-wrap {
    right: 12px;
    left: 12px;
    bottom: 12px;
    align-items: stretch;
  }

  .sac-floating-launcher {
    align-self: flex-end;
  }

  .sac-floating-panel {
    width: 100%;
  }

  .sac-message {
    max-width: 90%;
  }
}