.ai-assistant {
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:9998;
  font-family:Manrope, Arial, sans-serif;
}

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

.ai-assistant-toggle {
  width:62px;
  height:62px;
  border:0;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#ffffff;
  background:linear-gradient(135deg,#04385f,#11bfc1);
  box-shadow:0 18px 42px rgba(4,56,95,.28);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease;
}

.ai-assistant-toggle:hover {
  transform:translateY(-2px);
  box-shadow:0 22px 48px rgba(4,56,95,.34);
}

.ai-assistant-toggle svg {
  width:28px;
  height:28px;
}

.ai-assistant-panel {
  position:absolute;
  right:0;
  bottom:78px;
  width:min(380px, calc(100vw - 28px));
  max-height:min(680px, calc(100vh - 120px));
  display:none;
  grid-template-rows:auto 1fr auto;
  overflow:hidden;
  border:1px solid #dbeafe;
  border-radius:24px;
  background:#ffffff;
  box-shadow:0 24px 70px rgba(15,23,42,.22);
}

.ai-assistant.is-open .ai-assistant-panel {
  display:grid;
}

.ai-assistant-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px;
  color:#ffffff;
  background:linear-gradient(135deg,#04385f,#0f6f9f);
}

.ai-assistant-title {
  display:grid;
  gap:2px;
}

.ai-assistant-title strong {
  font-size:16px;
  line-height:1.2;
}

.ai-assistant-title span {
  font-size:12px;
  color:#dffafe;
}

.ai-assistant-close {
  width:36px;
  height:36px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:999px;
  color:#ffffff;
  background:rgba(255,255,255,.12);
  cursor:pointer;
  font-size:22px;
  line-height:1;
}

.ai-assistant-messages {
  min-height:260px;
  overflow:auto;
  padding:16px;
  background:linear-gradient(180deg,#f8fdff,#ffffff);
}

.ai-message {
  width:fit-content;
  max-width:88%;
  margin:0 0 10px;
  padding:11px 13px;
  border-radius:16px;
  font-size:14px;
  line-height:1.45;
}

.ai-message.bot {
  color:#334155;
  background:#e8f6fb;
  border-top-left-radius:6px;
}

.ai-message.user {
  margin-left:auto;
  color:#ffffff;
  background:#0f6f9f;
  border-top-right-radius:6px;
}

.ai-quick-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:0 16px 14px;
  background:#ffffff;
}

.ai-quick-actions button {
  border:1px solid #dbeafe;
  border-radius:999px;
  padding:8px 10px;
  color:#04385f;
  background:#f3fbff;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.ai-assistant-form {
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  padding:14px 16px 16px;
  border-top:1px solid #e2e8f0;
  background:#ffffff;
}

.ai-assistant-form input {
  width:100%;
  min-height:44px;
  border:1px solid #cbd5e1;
  border-radius:999px;
  padding:0 14px;
  font:inherit;
  font-size:14px;
  outline:none;
}

.ai-assistant-form input:focus {
  border-color:#11bfc1;
  box-shadow:0 0 0 4px rgba(17,191,193,.14);
}

.ai-assistant-form button {
  width:44px;
  height:44px;
  border:0;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#ffffff;
  background:#04385f;
  cursor:pointer;
}

.ai-assistant-form svg {
  width:19px;
  height:19px;
}

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

  .ai-assistant-toggle {
    width:56px;
    height:56px;
  }

  .ai-assistant-panel {
    right:-2px;
    bottom:70px;
    width:calc(100vw - 24px);
    max-height:calc(100vh - 100px);
    border-radius:20px;
  }
}
