:root {
  --aiw-bg: #f6f4ff;
  --aiw-accent: #d62828;
  --aiw-primary: #d62828;
  --aiw-secondary: #0b4f6c;
  --aiw-card: #ffffff;
  --aiw-shadow: 0 20px 45px rgba(13, 12, 34, 0.18);
  --aiw-radius: 18px;
}

.aiw-chatbot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: "Space Grotesk", "Sora", sans-serif;
}

.aiw-chatbot__launcher {
  background: #d62828;
  color: #fff;
  border: none;
  width: 120px;
  height: 120px;
  padding: 0;
  border-radius: 50%;
  box-shadow: var(--aiw-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aiw-chatbot__launcher-icon {
  width: 120px;
  height: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aiw-chatbot__launcher-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.aiw-chatbot__panel {
  position: absolute;
  bottom: 132px;
  right: 0;
  width: 360px;
  height: min(560px, calc(100vh - 180px));
  max-height: 560px;
  background: var(--aiw-card);
  border-radius: var(--aiw-radius);
  box-shadow: var(--aiw-shadow);
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.aiw-chatbot__panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.aiw-chatbot__intro[hidden],
.aiw-chatbot__messages[hidden],
.aiw-chatbot__composer[hidden] {
  display: none !important;
}

.aiw-chatbot__header {
  background: #000;
  color: #fff;
  padding: 16px 52px 16px 18px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
}

.aiw-chatbot__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aiw-chatbot__header-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.aiw-chatbot__title {
  font-weight: 600;
  font-size: 16px;
}

.aiw-chatbot__close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  position: absolute;
  top: 8px;
  right: 10px;
  line-height: 1;
  padding: 4px;
}

.aiw-chatbot__body {
  padding: 16px;
  background: linear-gradient(160deg, #f6f4ff, #fef7f1 60%);
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.aiw-chatbot__intro p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #222;
}

.aiw-chatbot__form label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
  color: #444;
}

.aiw-chatbot__form input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.aiw-chatbot__form button {
  margin-top: 6px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: var(--aiw-accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.aiw-chatbot__consent {
  display: flex;
  align-items: center;
  font-size: 12px;
  gap: 8px;
  margin-top: 6px;
}

.aiw-chatbot__messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.aiw-chatbot__starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
}

.aiw-chatbot__starters[hidden] {
  display: none !important;
}

.aiw-chatbot__starter-btn {
  background: #fff;
  border: 1px solid var(--aiw-accent);
  color: var(--aiw-accent);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1.3;
  text-align: left;
}

.aiw-chatbot__starter-btn:hover {
  background: var(--aiw-accent);
  color: #fff;
}

.aiw-chatbot__message {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.aiw-chatbot__message--user {
  background: #111;
  color: #fff;
  margin-left: 30px;
}

.aiw-chatbot__message--assistant {
  background: #fff;
  border: 1px solid #eaeaea;
  color: #222;
  margin-right: 30px;
}

.aiw-chatbot__composer {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid #eee;
  background: #fff;
}

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

.aiw-chatbot__composer button {
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: var(--aiw-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 520px) {
  .aiw-chatbot {
    right: 12px;
    bottom: 12px;
  }

  .aiw-chatbot__launcher,
  .aiw-chatbot__launcher-icon {
    width: 96px;
    height: 96px;
  }

  .aiw-chatbot__panel {
    bottom: 108px;
    width: min(360px, calc(100vw - 24px));
    height: min(560px, calc(100vh - 140px));
  }

  .aiw-chatbot__panel {
    width: calc(100vw - 24px);
    bottom: 56px;
  }
}
.aiw-chatbot__form input {
  max-width: 91%;
  margin-right: 12px;
}
