.abd-ai {
  --abd-navy: #1a3351;
  --abd-navy-dark: #0d1318;
  --abd-teal: #1f6f63;
  --abd-warm: #b5622a;
  --abd-soft: #f0f4f8;
  --abd-text: #3d4a5a;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999998;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.abd-ai *, .abd-ai *::before, .abd-ai *::after { box-sizing: border-box; }

.abd-ai-launcher {
  display: grid;
  width: 58px;
  height: 58px;
  margin-left: auto;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  outline: 1px solid var(--abd-navy);
  outline-offset: -2px;
  background: var(--abd-navy);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(13,19,24,.22);
  transition: transform .18s ease, background .18s ease;
}

.abd-ai-launcher:hover { background: #244663; transform: translateY(-2px); }
.abd-ai[data-state="open"] .abd-ai-launcher { opacity: 0; pointer-events: none; transform: scale(.85); }

.abd-ai-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  height: min(650px, calc(100vh - 36px));
  grid-template-rows: auto 1fr auto auto auto;
  overflow: hidden;
  border: 1px solid rgba(26,51,81,.13);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(13,19,24,.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
}

.abd-ai[data-state="open"] .abd-ai-panel { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.abd-ai-header {
  display: grid;
  grid-template-columns: 38px 1fr 34px;
  gap: 11px;
  align-items: center;
  padding: 15px 14px;
  background: var(--abd-navy);
  color: #fff;
}

.abd-ai-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}

.abd-ai-heading { min-width: 0; }
.abd-ai-heading strong, .abd-ai-heading span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abd-ai-heading strong { margin-bottom: 2px; font-size: 14px; line-height: 1.3; }
.abd-ai-heading span { color: rgba(255,255,255,.76); font-size: 11px; }

.abd-ai-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}

.abd-ai-messages {
  overflow-y: auto;
  padding: 18px 15px 12px;
  background: var(--abd-soft);
  scrollbar-width: thin;
}

.abd-ai-message { display: flex; margin-bottom: 12px; }
.abd-ai-message--user { justify-content: flex-end; }

.abd-ai-bubble {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 13px 13px 13px 4px;
  background: #fff;
  color: #182433;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  box-shadow: 0 1px 3px rgba(13,19,24,.06);
}

.abd-ai-message--user .abd-ai-bubble {
  border-radius: 13px 13px 4px 13px;
  background: var(--abd-navy);
  color: #fff;
}

.abd-ai-message.is-loading .abd-ai-bubble { color: #6b7785; animation: abd-ai-pulse 1.1s ease-in-out infinite; }
@keyframes abd-ai-pulse { 50% { opacity: .55; } }

.abd-ai-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 12px;
  border-top: 1px solid #e7ebef;
  background: #fff;
  scrollbar-width: none;
}
.abd-ai-suggestions::-webkit-scrollbar { display: none; }
.abd-ai-suggestions button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #d4dce4;
  border-radius: 999px;
  background: #fff;
  color: var(--abd-navy);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
}
.abd-ai-suggestions button:hover { border-color: var(--abd-teal); color: var(--abd-teal); }

.abd-ai-contactbar {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  border-top: 1px solid #e7ebef;
  background: #fff;
}
.abd-ai-contactbar a, .abd-ai-contactbar a:visited {
  padding: 9px 8px;
  color: var(--abd-navy) !important;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.abd-ai-contactbar a + a { border-left: 1px solid #e7ebef; }
.abd-ai-contactbar a:hover { background: #f7f9fb; color: var(--abd-teal) !important; }

.abd-ai-form {
  display: grid;
  grid-template-columns: 1fr 43px;
  gap: 8px;
  align-items: end;
  padding: 10px 11px 7px;
  border-top: 1px solid #e7ebef;
  background: #fff;
}
.abd-ai-form textarea {
  width: 100%;
  min-height: 43px;
  max-height: 110px;
  resize: none;
  padding: 11px 13px;
  border: 1px solid var(--abd-navy);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #182433;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
}
.abd-ai-form textarea:focus { box-shadow: 0 0 0 3px rgba(31,111,99,.13); border-color: var(--abd-teal); }
.abd-ai-form button {
  display: grid;
  width: 43px;
  height: 43px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--abd-navy);
  color: #fff;
  cursor: pointer;
}
.abd-ai-form button:disabled { opacity: .5; cursor: wait; }

.abd-ai-privacy {
  padding: 0 12px 9px;
  background: #fff;
  color: #7a8591;
  font-size: 9.5px;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 560px) {
  .abd-ai { right: 12px; bottom: 12px; }
  .abd-ai-panel { width: calc(100vw - 24px); height: min(680px, calc(100vh - 24px)); border-radius: 16px; }
  .abd-ai-launcher { width: 55px; height: 55px; }
}

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

