.ai-assistant {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  font-family: Arial, Helvetica, sans-serif;
}

.ai-assistant * {
  box-sizing: border-box;
}

.ai-assistant__toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1;
  background: #8b1e2d;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 14px 30px rgba(32, 18, 22, .28);
  cursor: pointer;
  white-space: nowrap;
}

.ai-assistant__toggle span:first-child {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #8b1e2d;
  background: #fff;
  border-radius: 50%;
}

.ai-assistant__panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: min(360px, calc(100vw - 36px));
  overflow: hidden;
  color: #12232e;
  background: #fff;
  border: 1px solid #d8e5ec;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(12, 58, 86, .24);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.ai-assistant.is-open .ai-assistant__panel {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ai-assistant__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  color: #fff;
  background: linear-gradient(135deg, #074b72, #0a71ac);
}

.ai-assistant__head strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1rem;
}

.ai-assistant__head p {
  margin: 0;
  color: #dff3ff;
  font-size: .9rem;
  line-height: 1.4;
}

.ai-assistant__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.ai-assistant__body {
  padding: 16px 18px 18px;
}

.ai-assistant__message {
  margin: 0 0 14px;
  color: #5e7180;
  font-size: .95rem;
  line-height: 1.5;
}

.ai-assistant__options {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-assistant__option {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: #074b72;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  background: #eef7fb;
  border: 1px solid #d8e5ec;
  border-radius: 7px;
  cursor: pointer;
}

.ai-assistant__option:hover {
  background: #e1f1f8;
}

.ai-assistant__answer {
  min-height: 46px;
  margin: 0 0 12px;
  padding: 12px;
  color: #12232e;
  font-size: .94rem;
  line-height: 1.5;
  background: #f5f9fb;
  border: 1px solid #d8e5ec;
  border-radius: 8px;
}

.ai-assistant__answer a {
  color: #8b1e2d;
  font-weight: 800;
}

.ai-assistant__form {
  display: flex;
  gap: 8px;
}

.ai-assistant__input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 12px;
  color: #12232e;
  border: 1px solid #d8e5ec;
  border-radius: 8px;
}

.ai-assistant__send {
  min-width: 220px;
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1;
  background: #8b1e2d;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.ai-assistant__small {
  margin: 10px 0 0;
  color: #7d90a0;
  font-size: .78rem;
  line-height: 1.4;
}

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

  .ai-assistant__toggle {
    min-height: 48px;
    padding: 0 24px;
  }

  .ai-assistant__send {
    min-width: 0;
  }
}
