.na-ai {
  --na-ai-green: #0f7b4c;
  --na-ai-green-dark: #075f3a;
  --na-ai-mint: #e8fff4;
  --na-ai-ink: #123126;
  --na-ai-muted: #6a7d73;
  --na-ai-line: rgba(15, 123, 76, 0.16);
  --na-ai-shadow: 0 24px 70px rgba(6, 46, 30, 0.22);
  bottom: calc(var(--na-ai-offset, 28px) + env(safe-area-inset-bottom));
  font-family: Poppins, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  z-index: 99999;
}

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

.na-ai__orb {
  align-items: center;
  animation: naAiFloat 5.8s ease-in-out infinite;
  background: radial-gradient(circle at 28% 24%, #ffffff 0 10%, #55dda0 24%, #0f7b4c 62%, #064b31 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(15, 123, 76, 0.38), 0 0 0 8px rgba(15, 123, 76, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 68px;
  justify-content: center;
  outline: none;
  position: relative;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
  width: 68px;
}

.na-ai__orb:hover,
.na-ai__orb:focus-visible {
  box-shadow: 0 22px 52px rgba(15, 123, 76, 0.5), 0 0 0 11px rgba(15, 123, 76, 0.1);
  filter: saturate(1.08);
  transform: translateY(-4px) scale(1.03);
}

.na-ai__orb-ring {
  animation: naAiPulse 3.4s ease-out infinite;
  border: 1px solid rgba(50, 190, 120, 0.45);
  border-radius: inherit;
  inset: -8px;
  position: absolute;
}

.na-ai__spark {
  align-items: center;
  background: #050805;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  letter-spacing: 0;
  overflow: hidden;
  position: relative;
  width: 54px;
}

.na-ai__spark img {
  border-radius: 50%;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.na-ai__spark-fallback {
  color: #fff;
  display: none;
}

.na-ai__spark.is-icon-failed .na-ai__spark-fallback {
  display: inline-flex;
}

.na-ai__tip {
  background: #fff;
  border: 1px solid rgba(15, 123, 76, 0.16);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(6, 46, 30, 0.16);
  color: var(--na-ai-green-dark);
  font-size: 12px;
  font-weight: 800;
  opacity: 1;
  padding: 9px 12px;
  pointer-events: none;
  position: absolute;
  right: 76px;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 220ms ease, transform 220ms ease;
  white-space: nowrap;
}

.na-ai.tip-hidden .na-ai__tip,
.na-ai.is-open .na-ai__tip {
  opacity: 0;
  transform: translate(8px, -50%);
}

.na-ai__panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  bottom: 86px;
  box-shadow: var(--na-ai-shadow);
  color: var(--na-ai-ink);
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto auto;
  max-height: min(640px, calc(100dvh - var(--na-ai-offset, 28px) - 116px));
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(18px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 220ms ease, transform 220ms ease;
  width: min(390px, calc(100vw - 28px));
}

.na-ai.is-open .na-ai__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.na-ai__header {
  align-items: center;
  background: linear-gradient(135deg, #0f7b4c, #0a5c3b);
  color: #fff;
  display: flex;
  gap: 12px;
  padding: 16px;
}

.na-ai__avatar {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  display: flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.na-ai__title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.na-ai__status {
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  font-size: 12px;
  gap: 6px;
  margin-top: 3px;
}

.na-ai__status span {
  background: #a7f3d0;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(167, 243, 208, 0.16);
  display: inline-block;
  height: 8px;
  width: 8px;
}

.na-ai__close {
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  height: 44px;
  line-height: 1;
  margin-left: auto;
  transition: background 180ms ease, transform 180ms ease;
  width: 44px;
}

.na-ai__close:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: rotate(90deg);
}

.na-ai__messages {
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 34%),
    linear-gradient(180deg, #fbfffd, #f6fbf8);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.na-ai__msg {
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 88%;
  padding: 12px 14px;
}

.na-ai__msg--assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--na-ai-line);
  box-shadow: 0 10px 24px rgba(12, 67, 43, 0.08);
}

.na-ai__msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--na-ai-green), var(--na-ai-green-dark));
  color: #fff;
}

.na-ai__slots {
  border-top: 1px solid var(--na-ai-line);
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
}

.na-ai__slots-date {
  color: var(--na-ai-muted);
  font-size: 12px;
  font-weight: 700;
}

.na-ai__slot {
  align-items: center;
  border-radius: 12px;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  padding: 9px 10px;
}

.na-ai__slot.is-available {
  background: #e8fff4;
  color: #075f3a;
}

.na-ai__slot.is-pending {
  background: #fff8df;
  color: #8a5a00;
}

.na-ai__slot.is-booked {
  background: #fff1f1;
  color: #b42318;
}

.na-ai__price-grid {
  border-top: 1px solid var(--na-ai-line);
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
}

.na-ai__price-card {
  background: linear-gradient(180deg, #fbfffd, #f3fbf6);
  border: 1px solid rgba(15, 123, 76, 0.13);
  border-radius: 14px;
  display: grid;
  gap: 2px;
  padding: 10px 11px;
}

.na-ai__price-card strong {
  color: var(--na-ai-ink);
  font-size: 12px;
}

.na-ai__price-card span {
  color: var(--na-ai-muted);
  font-size: 11px;
}

.na-ai__price-card b {
  color: var(--na-ai-green-dark);
  font-size: 13px;
}

.na-ai__price-note {
  color: var(--na-ai-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.na-ai__book-link {
  align-items: center;
  background: var(--na-ai-green);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  text-decoration: none;
}

.na-ai__actions {
  border-top: 1px solid var(--na-ai-line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
}

.na-ai__action {
  align-items: center;
  background: linear-gradient(135deg, var(--na-ai-green), var(--na-ai-green-dark));
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  text-decoration: none;
  transition: filter 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.na-ai__action:hover {
  filter: saturate(1.08);
  transform: translateY(-1px);
}

 .na-ai__quick {
  background: #fff;
  border-top: 1px solid var(--na-ai-line);
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.na-ai__quick::-webkit-scrollbar {
  display: none;
}

.na-ai__quick button {
  background: var(--na-ai-mint);
  border: 1px solid rgba(15, 123, 76, 0.18);
  border-radius: 999px;
  color: var(--na-ai-green-dark);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  height: 32px;
  min-height: 32px;
  padding: 6px 11px;
  transition: background 180ms ease, transform 180ms ease;
  white-space: nowrap;
  width: auto;
}

.na-ai.has-interacted .na-ai__quick {
  display: none;
}

.na-ai__composer {
  align-items: center;
  background: #fff;
  display: flex;
  gap: 8px;
  padding: 10px 12px 14px;
}

.na-ai__composer input {
  background: #f7fbf9;
  border: 1px solid var(--na-ai-line);
  border-radius: 999px;
  color: var(--na-ai-ink);
  flex: 1;
  font: inherit;
  font-size: 13px;
  min-width: 0;
  outline: none;
  padding: 12px 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.na-ai__composer input:focus {
  border-color: rgba(15, 123, 76, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 123, 76, 0.1);
}

.na-ai__composer button {
  background: var(--na-ai-green);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 12px 16px;
  transition: background 180ms ease, transform 180ms ease;
}

.na-ai__composer button:hover {
  background: var(--na-ai-green-dark);
  transform: translateY(-1px);
}

.na-ai.is-busy .na-ai__composer button span {
  opacity: 0.72;
}

.na-ai.is-busy .na-ai__composer button span::after {
  animation: naAiDots 1.1s steps(4, end) infinite;
  content: "";
}

.na-ai__typing {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.na-ai__typing span {
  color: var(--na-ai-muted);
}

.na-ai__typing i {
  animation: naAiTyping 1s ease-in-out infinite;
  background: var(--na-ai-green);
  border-radius: 999px;
  display: inline-block;
  height: 5px;
  opacity: 0.45;
  width: 5px;
}

.na-ai__typing i:nth-child(3) {
  animation-delay: 120ms;
}

.na-ai__typing i:nth-child(4) {
  animation-delay: 240ms;
}

@keyframes naAiFloat {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -5px;
  }
}

@keyframes naAiPulse {
  0% {
    opacity: 0.75;
    transform: scale(0.92);
  }
  70% {
    opacity: 0;
    transform: scale(1.35);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes naAiTyping {
  0%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes naAiDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

@media (max-width: 560px) {
  .na-ai {
    bottom: calc(var(--na-ai-offset, 88px) + env(safe-area-inset-bottom));
    right: max(14px, env(safe-area-inset-right));
  }

  .na-ai__orb {
    height: 62px;
    width: 62px;
  }

  .na-ai__tip {
    font-size: 11px;
    right: 70px;
  }

  .na-ai__panel {
    border-radius: 22px;
    bottom: 74px;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    max-height: min(82vh, calc(100dvh - var(--na-ai-offset, 88px) - 86px));
    width: calc(100vw - 20px);
  }

  .na-ai__header {
    gap: 10px;
    padding: 12px 13px;
  }

  .na-ai__avatar {
    border-radius: 13px;
    font-size: 13px;
    height: 36px;
    width: 36px;
  }

  .na-ai__title {
    font-size: 14px;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .na-ai__status {
    font-size: 11px;
  }

  .na-ai__close {
    flex: 0 0 44px;
    height: 44px;
    width: 44px;
  }

  .na-ai__messages {
    min-height: 0;
    padding: 12px;
    gap: 8px;
  }

  .na-ai__msg {
    border-radius: 15px;
    font-size: 12.5px;
    line-height: 1.45;
    max-width: 94%;
    padding: 10px 11px;
    word-break: break-word;
  }
  .na-ai__quick {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px 9px;
    scrollbar-width: none;
  }

  .na-ai__quick::-webkit-scrollbar {
    display: none;
  }

  .na-ai__quick button {
    flex: 0 0 auto;
    font-size: 12px;
    height: 30px;
    min-height: 30px;
    padding: 6px 10px;
    width: auto;
  }

  .na-ai__price-grid {
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
  }

  .na-ai__price-card {
    align-items: center;
    border-radius: 12px;
    grid-template-columns: 1fr auto;
    padding: 8px 9px;
  }

  .na-ai__price-card strong {
    font-size: 11.5px;
  }

  .na-ai__price-card span {
    font-size: 10.5px;
    grid-column: 1 / -1;
  }

  .na-ai__price-card b {
    font-size: 12px;
  }

  .na-ai__book-link,
  .na-ai__action {
    min-height: 34px;
    padding: 7px 12px;
  }

  .na-ai__actions {
    display: grid;
    gap: 7px;
    grid-template-columns: 1fr;
  }

  .na-ai__composer {
    gap: 7px;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .na-ai__composer input {
    font-size: 12.5px;
    min-height: 42px;
    padding: 10px 12px;
  }

  .na-ai__composer button {
    flex: 0 0 auto;
    font-size: 12.5px;
    min-height: 42px;
    padding: 10px 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .na-ai__orb,
  .na-ai__orb-ring,
  .na-ai.is-busy .na-ai__composer button span::after,
  .na-ai__typing i {
    animation: none;
  }

  .na-ai__orb,
  .na-ai__panel,
  .na-ai__quick button,
  .na-ai__action,
  .na-ai__composer button,
  .na-ai__close {
    transition: none;
  }
}


.na-ai__media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.na-ai__media-card {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(22, 101, 52, 0.12);
  background: #f6fbf7;
}

.na-ai__media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.na-ai__actions button.na-ai__action {
  border: 0;
  cursor: pointer;
  font: inherit;
}

@media (max-width: 560px) {
  .na-ai__quick {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px 9px;
    scrollbar-width: none;
  }

  .na-ai__quick button {
    flex: 0 0 auto;
    font-size: 12px;
    height: 30px;
    min-height: 30px;
    padding: 6px 10px;
    width: auto;
  }

  .na-ai__media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .na-ai__media-card {
    border-radius: 8px;
  }
}

