.ai-guide {
  --guide-accent: #8068ed;
  bottom: 24px;
  font-family: "DM Sans", "Inter", sans-serif;
  position: fixed;
  right: 24px;
  z-index: 9990;
}

.ai-guide__toggle {
  align-items: center;
  background: linear-gradient(135deg, #715cf4, #a366f5 57%, #48c9dc);
  border: 1px solid rgba(255, 255, 255, .37);
  border-radius: 999px;
  box-shadow: 0 12px 38px rgba(80, 64, 194, .4);
  color: #fff;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  gap: 10px;
  justify-content: center;
  min-height: 56px;
  padding: 0 20px;
  transition: transform .2s, box-shadow .2s;
}

.ai-guide__toggle:hover {
  box-shadow: 0 16px 44px rgba(80, 64, 194, .5);
  transform: translateY(-2px);
}

.ai-guide__toggle:focus-visible,
.ai-guide__send:focus-visible,
.ai-guide__close:focus-visible,
.ai-guide__suggestion:focus-visible,
.ai-guide__input:focus-visible {
  outline: 3px solid #97dfff;
  outline-offset: 3px;
}

.ai-guide__toggle i {
  font-size: 1.02rem;
}

.ai-guide__panel {
  background: #fff;
  border: 1px solid #e8e9f4;
  border-radius: 20px;
  bottom: 72px;
  box-shadow: 0 26px 90px rgba(13, 19, 43, .22);
  display: flex;
  flex-direction: column;
  max-height: min(540px, calc(100svh - 140px));
  opacity: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  transform: translateY(10px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  visibility: hidden;
  width: min(380px, calc(100vw - 32px));
}

.ai-guide.is-open .ai-guide__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.ai-guide__header {
  align-items: center;
  background:
    radial-gradient(ellipse at 90% 15%, rgba(74, 201, 220, .2), transparent 38%),
    linear-gradient(120deg, #11152c, #212041);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 18px;
}

.ai-guide__identity {
  align-items: center;
  display: flex;
  gap: 12px;
}

.ai-guide__avatar {
  align-items: center;
  background: linear-gradient(140deg, #8b78ff, #50cfe0);
  border-radius: 14px;
  color: #fff;
  display: flex;
  flex: 0 0 42px;
  height: 42px;
  justify-content: center;
}

.ai-guide__heading {
  color: #fff;
  font-size: .94rem;
  font-weight: 800;
  margin: 0;
}

.ai-guide__status {
  color: #b9c4d9;
  font-size: .72rem;
  margin-top: 3px;
}

.ai-guide__status span {
  color: #78edc2;
}

.ai-guide__close {
  align-items: center;
  background: rgba(255, 255, 255, .1);
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.ai-guide__messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 126px;
  overflow-y: auto;
  padding: 18px;
}

.ai-guide__message {
  border-radius: 15px 15px 15px 5px;
  color: #323b4d;
  font-size: .84rem;
  line-height: 1.65;
  max-width: 92%;
  overflow-wrap: anywhere;
  padding: 11px 13px;
  white-space: pre-line;
}

.ai-guide__message--bot {
  align-self: flex-start;
  background: #f1f1fb;
}

.ai-guide__message--user {
  align-self: flex-end;
  background: linear-gradient(130deg, #715cf4, #8369ea);
  border-radius: 15px 15px 5px 15px;
  color: #fff;
}

.ai-guide__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 13px;
}

.ai-guide__suggestion {
  background: #fff;
  border: 1px solid #e3e0f8;
  border-radius: 99px;
  color: #5c4cc2;
  cursor: pointer;
  font: inherit;
  font-size: .71rem;
  font-weight: 700;
  padding: 8px 11px;
  transition: background .15s, border-color .15s;
}

.ai-guide__suggestion:hover {
  background: #f3f0ff;
  border-color: #c7bbff;
}

.ai-guide__form {
  border-top: 1px solid #eeeef3;
  display: flex;
  gap: 8px;
  padding: 12px;
}

.ai-guide__input {
  background: #f6f7fa;
  border: 1px solid #e9eaf1;
  border-radius: 12px;
  color: #192236;
  flex: 1;
  font: inherit;
  font-size: .83rem;
  min-width: 0;
  padding: 11px 13px;
}

.ai-guide__input::placeholder {
  color: #9299a8;
}

.ai-guide__send {
  align-items: center;
  background: linear-gradient(135deg, #715cf4, #8264ea);
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex: 0 0 44px;
  justify-content: center;
}

.ai-guide__note {
  color: #9299a8;
  font-size: .66rem;
  margin: 0;
  padding: 0 14px 12px;
  text-align: center;
}

@media (max-width: 480px) {
  .ai-guide {
    bottom: 16px;
    right: 16px;
  }

  .ai-guide__panel {
    bottom: 66px;
    max-height: min(500px, calc(100svh - 110px));
  }

  .ai-guide__toggle {
    min-height: 52px;
    padding: 0 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-guide *,
  .ai-guide *::before,
  .ai-guide *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
