.anb-ai-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 3000;

  display: flex;
  align-items: center;
  gap: 10px;

  min-height: 58px;
  padding: 8px 17px 8px 9px;

  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;

  color: #fff;
  background:
    linear-gradient(135deg, #2563eb, #6d28d9 58%, #9333ea);

  box-shadow:
    0 18px 48px rgba(37, 99, 235, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);

  cursor: pointer;

  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.anb-ai-launcher:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 55px rgba(37, 99, 235, 0.42);
}

.anb-ai-launcher-icon {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.17);

  font-size: 20px;
}

.anb-ai-launcher-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  line-height: 1.05;
}

.anb-ai-launcher-copy strong {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.anb-ai-launcher-copy small {
  margin-top: 4px;

  color: rgba(255, 255, 255, 0.72);

  font-size: 9px;
  font-weight: 700;
}


.anb-ai-panel {
  position: fixed;
  right: 22px;
  bottom: 94px;
  z-index: 3002;

  width: min(400px, calc(100vw - 32px));
  height: min(650px, calc(100vh - 130px));

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;

  background: rgba(255, 255, 255, 0.97);

  box-shadow:
    0 30px 90px rgba(15, 23, 42, 0.25);

  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);

  opacity: 0;
  visibility: hidden;

  transform: translateY(18px) scale(0.97);
  transform-origin: bottom right;

  transition:
    opacity 220ms ease,
    transform 220ms ease,
    visibility 220ms ease;
}

.anb-ai-panel.open {
  opacity: 1;
  visibility: visible;

  transform: translateY(0) scale(1);
}


.anb-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px;

  color: #fff;

  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(34, 211, 238, 0.25),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #172554,
      #312e81 55%,
      #581c87
    );
}

.anb-ai-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.anb-ai-avatar {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 15px;

  border: 1px solid rgba(255, 255, 255, 0.18);

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.21),
      rgba(255, 255, 255, 0.1)
    );

  font-size: 19px;
}

.anb-ai-brand strong {
  display: block;
  font-size: 15px;
}

.anb-ai-brand span {
  display: flex;
  align-items: center;
  gap: 6px;

  margin-top: 3px;

  color: #cbd5e1;

  font-size: 9px;
  font-weight: 700;
}

.anb-ai-status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #22c55e;

  box-shadow:
    0 0 0 4px rgba(34, 197, 94, 0.13);
}

.anb-ai-close {
  width: 38px;
  height: 38px;

  border: 0;
  border-radius: 13px;

  color: #fff;
  background: rgba(255, 255, 255, 0.09);

  font-size: 24px;
  line-height: 1;

  cursor: pointer;
}


.anb-ai-messages {
  flex: 1;

  overflow-y: auto;

  padding: 18px;

  background:
    linear-gradient(
      180deg,
      #f8faff,
      #f4f7fc
    );

  scroll-behavior: smooth;
}

.anb-ai-message {
  display: flex;
  gap: 9px;

  margin-bottom: 13px;
}

.anb-ai-message.user {
  justify-content: flex-end;
}

.anb-ai-message-icon {
  width: 28px;
  height: 28px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  margin-top: 3px;

  border-radius: 10px;

  color: #fff;

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #7c3aed
    );

  font-size: 12px;
}

.anb-ai-bubble {
  max-width: 84%;

  padding: 11px 13px;

  border: 1px solid rgba(15, 23, 42, 0.06);

  border-radius: 6px 17px 17px 17px;

  color: #344054;
  background: #fff;

  box-shadow:
    0 7px 20px rgba(15, 23, 42, 0.05);

  font-size: 12px;
  line-height: 1.6;

  white-space: pre-wrap;
}

.anb-ai-message.user .anb-ai-bubble {
  color: #fff;

  border: 0;

  border-radius: 17px 6px 17px 17px;

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #6d28d9
    );

  box-shadow:
    0 10px 24px rgba(37, 99, 235, 0.18);
}


.anb-ai-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin-top: 8px;
}

.anb-ai-quick-prompts button {
  padding: 8px 10px;

  border:
    1px solid rgba(37, 99, 235, 0.12);

  border-radius: 999px;

  color: #3158a4;
  background: #eef4ff;

  font-size: 9px;
  font-weight: 800;

  cursor: pointer;
}


.anb-ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;

  min-width: 58px;
}

.anb-ai-typing span {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #94a3b8;

  animation:
    anbAiTyping 1s infinite ease-in-out;
}

.anb-ai-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.anb-ai-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes anbAiTyping {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}


.anb-ai-handoff {
  padding: 10px 14px;

  border-top:
    1px solid rgba(15, 23, 42, 0.06);

  color: #9a3412;
  background: #fff7ed;

  font-size: 10px;
  line-height: 1.45;
}

.anb-ai-handoff[hidden] {
  display: none;
}


.anb-ai-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;

  padding: 11px;

  border-top:
    1px solid rgba(15, 23, 42, 0.06);

  background: #fff;
}

.anb-ai-input {
  width: 100%;
  max-height: 105px;

  resize: none;

  padding: 11px 12px;

  border: 1px solid #dce3ee;
  border-radius: 16px;

  outline: none;

  color: #101828;
  background: #f8fafc;

  font: inherit;
  font-size: 12px;
  line-height: 1.4;
}

.anb-ai-input:focus {
  border-color: #8bb1ff;

  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.08);
}

.anb-ai-send {
  width: 43px;
  height: 43px;

  flex: 0 0 auto;

  border: 0;
  border-radius: 14px;

  color: #fff;

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #7c3aed
    );

  box-shadow:
    0 9px 22px rgba(37, 99, 235, 0.22);

  cursor: pointer;
}

.anb-ai-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.anb-ai-note {
  padding: 0 12px 9px;

  color: #98a2b3;
  background: #fff;

  text-align: center;

  font-size: 7px;
  line-height: 1.45;
}

.anb-ai-backdrop {
  display: none;
}


@media (max-width: 680px) {

  .anb-ai-launcher {
    right: 14px;
    bottom: 14px;

    min-height: 52px;

    padding: 7px 15px 7px 7px;
  }

  .anb-ai-launcher-icon {
    width: 37px;
    height: 37px;
  }

  .anb-ai-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;

    width: auto;

    height:
      min(720px, calc(100dvh - 16px));

    border-radius: 25px;

    transform:
      translateY(25px)
      scale(0.98);
  }

  .anb-ai-panel.open {
    transform:
      translateY(0)
      scale(1);
  }

  .anb-ai-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3001;

    display: block;

    background:
      rgba(6, 12, 24, 0.42);

    backdrop-filter: blur(5px);

    opacity: 0;
    visibility: hidden;

    transition:
      opacity 220ms ease,
      visibility 220ms ease;
  }

  .anb-ai-backdrop.open {
    opacity: 1;
    visibility: visible;
  }

  body.anb-ai-open {
    overflow: hidden;
  }

  .anb-ai-messages {
    padding: 15px 13px;
  }

  .anb-ai-bubble {
    max-width: 88%;
  }

}

/* ANB AI targeted mobile polish */

.anb-ai-quick-prompts[hidden] {
  display: none !important;
}

@media (max-width: 680px) {

  .anb-ai-header {
    padding: 14px 15px;
  }

  .anb-ai-messages {
    padding: 16px 14px;
  }

  .anb-ai-bubble {
    max-width: 90%;
    padding: 12px 13px;

    font-size: 13px;
    line-height: 1.7;
  }

  .anb-ai-message {
    margin-bottom: 14px;
  }

  .anb-ai-quick-prompts {
    gap: 8px;
  }

  .anb-ai-quick-prompts button {
    padding: 9px 11px;
    font-size: 10px;
  }

  .anb-ai-handoff {
    padding: 11px 14px;

    font-size: 10px;
    line-height: 1.55;
  }

  .anb-ai-composer {
    padding:
      10px
      10px
      max(10px, env(safe-area-inset-bottom));
  }

  .anb-ai-input {
    font-size: 13px;
  }

}

/* FINAL GREEN ANB AI */

.anb-ai-launcher {
  background:
    linear-gradient(
      135deg,
      #071a34,
      #0a7f35 62%,
      #31c62f
    ) !important;

  box-shadow:
    0 18px 45px
    rgba(22,163,47,.28) !important;
}

.anb-ai-launcher-icon {
  color: #08351b !important;

  background:
    #a6ff4a !important;
}

.anb-ai-header {
  background:
    linear-gradient(
      135deg,
      #071a32,
      #0b5438 60%,
      #148933
    ) !important;
}

.anb-ai-send,
.anb-ai-message-icon {
  background:
    linear-gradient(
      135deg,
      #078b30,
      #31c62f
    ) !important;
}

.anb-ai-message.user .anb-ai-bubble {
  background:
    linear-gradient(
      135deg,
      #07882d,
      #31bd2d
    ) !important;
}
