.xc-assistant {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: "Inter", sans-serif;
}

.xc-assistant__toggle {
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6c52ff 0%, #4f46e5 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(108, 82, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.xc-assistant__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(400px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 110px));
  border-radius: 18px;
  overflow: hidden;
  background: #0f1322;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
}

.xc-assistant__panel--open {
  display: flex;
}

.xc-assistant__header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(120% 120% at 0% 0%, rgba(108, 82, 255, 0.35), rgba(15, 19, 34, 0.95));
}

.xc-assistant__title {
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 4px;
}

.xc-assistant__subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  margin: 0;
}

.xc-assistant__messages {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
}

.xc-assistant__msg {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.45;
  font-size: 14px;
  white-space: pre-wrap;
}

.xc-assistant__msg--assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.09);
  color: #f8f8fd;
}

.xc-assistant__msg--user {
  align-self: flex-end;
  background: #6c52ff;
  color: #fff;
}

.xc-assistant__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 10px;
}

.xc-assistant__chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #d6dbff;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.xc-assistant__recommendations {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
}

.xc-assistant__card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 9px;
}

.xc-assistant__card-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
}

.xc-assistant__card-text {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  margin: 0 0 8px;
}

.xc-assistant__card-link {
  display: inline-block;
  color: #9db0ff;
  font-size: 12px;
  text-decoration: none;
}

.xc-assistant__input-wrap {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.xc-assistant__charcount {
  position: absolute;
  right: 96px;
  bottom: 3px;
  font-size: 10px;
  color: #94a3b8;
  pointer-events: none;
}

.xc-assistant__input {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 10px 12px;
  outline: none;
  font-size: 14px;
}

.xc-assistant__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.xc-assistant__send {
  border: none;
  border-radius: 12px;
  background: #6c52ff;
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
}

.xc-assistant__note {
  padding: 0 12px 10px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

@media (max-width: 640px) {
  .xc-assistant {
    right: 12px;
    bottom: 12px;
  }

  .xc-assistant__panel {
    width: min(100vw - 12px, 400px);
    right: -4px;
    bottom: 68px;
    max-height: min(78vh, 650px);
  }
}

