#anf-assistant-root,
#anf-assistant-root * {
  box-sizing: border-box;
}

#anf-assistant-root {
  --anf-chat-night: #071923;
  --anf-chat-night-soft: #0a2836;
  --anf-chat-aqua: #12abc5;
  --anf-chat-aqua-light: #66dcea;
  --anf-chat-paper: #f3f9fb;
  --anf-chat-text: #12313c;
  --anf-chat-muted: #64808a;
  --anf-chat-line: rgba(6, 25, 35, 0.12);
  --anf-chat-gold: #ffcf45;
  position: relative;
  z-index: 2147483000;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

#anf-assistant-root [hidden] {
  display: none !important;
}

.anf-assistant__launcher {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2;
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 0 20px 0 14px;
  border: 1.5px solid rgba(102, 220, 234, 0.55);
  border-radius: 999px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 15%, rgba(102, 220, 234, 0.24), transparent 46%),
    linear-gradient(135deg, var(--anf-chat-night) 0%, var(--anf-chat-night-soft) 72%);
  box-shadow:
    0 0 0 1px rgba(102, 220, 234, 0.15),
    0 10px 26px rgba(18, 171, 197, 0.34),
    0 18px 44px rgba(3, 20, 29, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font: 800 14px/1 "Manrope", Arial, sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.anf-assistant__launcher::after {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border: 1.5px solid rgba(102, 220, 234, 0.5);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  animation: anf-assistant-launcher-ring 3.6s ease-out infinite;
}

.anf-assistant__launcher:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(102, 220, 234, 0.22),
    0 14px 30px rgba(18, 171, 197, 0.4),
    0 22px 50px rgba(3, 20, 29, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.anf-assistant__launcher-icon {
  position: relative;
  width: 31px;
  height: 31px;
  border: 2px solid var(--anf-chat-night);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--anf-chat-aqua), var(--anf-chat-aqua-light));
  box-shadow: 0 0 0 0 rgba(102, 220, 234, 0.5);
  animation: anf-assistant-launcher-pulse 2.6s ease-out infinite;
}

.anf-assistant__launcher-icon::before {
  content: "";
  position: absolute;
  inset: 8px 7px 9px;
  border: 2px solid var(--anf-chat-night);
  border-radius: 6px;
}

.anf-assistant__launcher-icon::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--anf-chat-night);
  border-bottom: 2px solid var(--anf-chat-night);
  transform: skew(18deg) rotate(22deg);
  background: var(--anf-chat-aqua-light);
}

.anf-assistant__panel {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(90px, calc(env(safe-area-inset-bottom) + 82px));
  z-index: 3;
  width: min(400px, calc(100vw - 32px));
  height: min(620px, calc(100dvh - 116px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(6, 25, 35, 0.1);
  border-radius: 24px;
  color: var(--anf-chat-text);
  background: var(--anf-chat-paper);
  box-shadow: 0 28px 76px rgba(2, 20, 29, 0.3), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 180ms ease;
}

.anf-assistant__panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.anf-assistant__header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 18px 17px;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 0%, rgba(102, 220, 234, 0.22), transparent 40%),
    linear-gradient(135deg, var(--anf-chat-night), var(--anf-chat-night-soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.anf-assistant__header-copy {
  min-width: 0;
}

.anf-assistant__title {
  margin: 0 0 4px !important;
  overflow: hidden;
  color: #ffffff !important;
  font: 800 19px/1.15 "Barlow Condensed", "Manrope", Arial, sans-serif !important;
  letter-spacing: 0.01em;
  text-transform: uppercase !important;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.anf-assistant__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.76) !important;
  font: 600 12px/1.4 "Manrope", Arial, sans-serif !important;
}

.anf-assistant__subtitle::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--anf-chat-aqua-light);
  box-shadow: 0 0 0 0 rgba(102, 220, 234, 0.55);
  animation: anf-assistant-status-pulse 2.2s ease-out infinite;
}

.anf-assistant__header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.anf-assistant__header-button,
.anf-assistant__close {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.anf-assistant__header-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 999px;
  font: 750 10px/1.1 "Manrope", Arial, sans-serif;
  white-space: nowrap;
}

.anf-assistant__header-button-icon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

.anf-assistant__close {
  width: 36px;
  padding: 0;
  border-radius: 50%;
  font: 400 25px/1 "Manrope", Arial, sans-serif;
}

.anf-assistant__messages {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 15px 12px;
  scrollbar-color: rgba(18, 76, 91, 0.28) transparent;
}

.anf-assistant__message-row {
  display: flex;
  margin-bottom: 12px;
  animation: anf-assistant-message-in 180ms ease both;
}

.anf-assistant__message-row--assistant {
  justify-content: flex-start;
}

.anf-assistant__message-row--user {
  justify-content: flex-end;
}

.anf-assistant__message {
  max-width: 88%;
  padding: 12px 13px;
  border-radius: 17px;
  box-shadow: 0 8px 22px rgba(7, 30, 40, 0.07);
}

.anf-assistant__message--assistant {
  border: 1px solid var(--anf-chat-line);
  border-bottom-left-radius: 5px;
  background: linear-gradient(165deg, #ffffff 0%, #f5fcfd 100%);
}

.anf-assistant__message--user {
  border-bottom-right-radius: 5px;
  color: #03232d;
  background: linear-gradient(135deg, var(--anf-chat-aqua), var(--anf-chat-aqua-light));
  box-shadow: 0 10px 22px rgba(18, 171, 197, 0.22);
}

.anf-assistant__message-text {
  margin: 0 !important;
  color: inherit !important;
  font: 600 13px/1.58 "Manrope", Arial, sans-serif !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.anf-assistant__response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.anf-assistant__response-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid rgba(7, 106, 124, 0.25);
  border-radius: 999px;
  color: #075f70 !important;
  background: rgba(25, 191, 212, 0.09);
  font: 800 11px/1.2 "Manrope", Arial, sans-serif !important;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.anf-assistant__response-button:hover {
  transform: translateY(-1px);
  background: rgba(18, 171, 197, 0.17);
  box-shadow: 0 6px 14px rgba(18, 171, 197, 0.16);
}

.anf-assistant__response-actions--suggestion {
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px dashed var(--anf-chat-line);
}

.anf-assistant__response-button--suggestion {
  min-height: 32px;
  padding: 5px 10px;
  border-color: rgba(7, 106, 124, 0.16);
  color: #0a7288 !important;
  background: transparent;
  font-weight: 700;
}

.anf-assistant__response-button--suggestion::before {
  content: "+ ";
  opacity: 0.6;
}

.anf-assistant__response-button--suggestion:hover {
  background: rgba(25, 191, 212, 0.09);
}

.anf-assistant__typing {
  width: fit-content;
  margin: 0 15px 9px;
  padding: 10px 13px;
  border: 1px solid var(--anf-chat-line);
  border-radius: 16px 16px 16px 5px;
  background: #ffffff;
}

.anf-assistant__typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--anf-chat-aqua);
  animation: anf-assistant-typing 720ms infinite alternate ease-in-out;
}

.anf-assistant__typing-dot:nth-child(2) {
  animation-delay: 120ms;
}

.anf-assistant__typing-dot:nth-child(3) {
  animation-delay: 240ms;
}

.anf-assistant__composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid var(--anf-chat-line);
  background: #ffffff;
}

.anf-assistant__input {
  width: 100%;
  min-height: 44px;
  max-height: 104px;
  resize: none;
  overflow-y: auto;
  padding: 11px 12px;
  border: 1px solid rgba(7, 62, 76, 0.19);
  border-radius: 14px;
  outline: 0;
  color: var(--anf-chat-text);
  background: #f7fbfc;
  font: 600 13px/1.45 "Manrope", Arial, sans-serif;
}

.anf-assistant__input::placeholder {
  color: #78909a;
}

.anf-assistant__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #03212a;
  background: linear-gradient(135deg, var(--anf-chat-aqua), var(--anf-chat-aqua-light));
  box-shadow: 0 8px 18px rgba(18, 171, 197, 0.32);
  font: 850 11px/1 "Manrope", Arial, sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.anf-assistant__send:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18, 171, 197, 0.4);
}

.anf-assistant__send-icon {
  width: 18px;
  height: 18px;
}

.anf-assistant__send:disabled,
.anf-assistant__input:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.anf-assistant__launcher:focus-visible,
.anf-assistant__header-button:focus-visible,
.anf-assistant__close:focus-visible,
.anf-assistant__response-button:focus-visible,
.anf-assistant__send:focus-visible,
.anf-assistant__input:focus-visible {
  outline: 3px solid #ffcf45;
  outline-offset: 2px;
}

@keyframes anf-assistant-message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes anf-assistant-typing {
  from { opacity: 0.35; transform: translateY(1px); }
  to { opacity: 1; transform: translateY(-2px); }
}

@keyframes anf-assistant-launcher-pulse {
  0% { box-shadow: 0 0 0 0 rgba(102, 220, 234, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(102, 220, 234, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 220, 234, 0); }
}

@keyframes anf-assistant-launcher-ring {
  0% { opacity: 0; transform: scale(0.95); }
  30% { opacity: 0.55; }
  100% { opacity: 0; transform: scale(1.14); }
}

@keyframes anf-assistant-status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(102, 220, 234, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(102, 220, 234, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 220, 234, 0); }
}

@media (max-width: 600px) {
  .anf-assistant__launcher {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 54px;
    padding-right: 16px;
  }

  .anf-assistant__panel {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--anf-kb-inset, 0px));
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 20px;
  }

  .anf-assistant__header {
    padding: 16px 13px;
  }

  .anf-assistant__header-button {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .anf-assistant__header-button-label {
    display: none;
  }

  .anf-assistant__messages {
    padding: 14px 11px 8px;
  }

  .anf-assistant__message {
    max-width: 92%;
  }

  .anf-assistant__composer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .anf-assistant__input {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .anf-assistant__launcher-label {
    display: none;
  }

  .anf-assistant__launcher {
    width: 56px;
    justify-content: center;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anf-assistant__launcher,
  .anf-assistant__launcher::after,
  .anf-assistant__launcher-icon,
  .anf-assistant__subtitle::before,
  .anf-assistant__panel,
  .anf-assistant__response-button,
  .anf-assistant__message-row,
  .anf-assistant__typing-dot {
    animation: none !important;
    transition: none !important;
  }
}
