:root {
  --neferu-chat-bg: #0A0A0A;
  --neferu-chat-surface: #111111;
  --neferu-chat-text: #F5F0E8;
  --neferu-chat-muted: #A09A8E;
  --neferu-chat-accent: #C8A455;
  --neferu-chat-border: #2A2520;
}

.neferu-chat,
.neferu-chat * {
  box-sizing: border-box;
}

.neferu-chat {
  color: var(--neferu-chat-text);
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  z-index: 2147483000;
}

.neferu-chat__button {
  align-items: center;
  background: var(--neferu-chat-accent);
  border: 1px solid rgba(245, 240, 232, 0.2);
  border-radius: 999px;
  bottom: 24px;
  box-shadow: 0 18px 50px rgba(200, 164, 85, 0.28), 0 6px 22px rgba(0, 0, 0, 0.45);
  color: #0A0A0A;
  cursor: pointer;
  display: flex;
  height: 56px;
  justify-content: center;
  padding: 0;
  position: fixed;
  right: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  width: 56px;
}

.neferu-chat__button:hover {
  box-shadow: 0 22px 60px rgba(200, 164, 85, 0.34), 0 8px 26px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.neferu-chat__button:focus-visible,
.neferu-chat__icon-button:focus-visible,
.neferu-chat__send:focus-visible,
.neferu-chat__booking:focus-visible,
.neferu-chat__form textarea:focus-visible {
  outline: 2px solid var(--neferu-chat-accent);
  outline-offset: 3px;
}

.neferu-chat__button svg {
  height: 26px;
  width: 26px;
}

.neferu-chat__panel {
  animation: neferu-chat-slide-in 200ms ease forwards;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.98), rgba(10, 10, 10, 0.98));
  border: 1px solid var(--neferu-chat-border);
  border-radius: 8px;
  bottom: 92px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(200, 164, 85, 0.08);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(600px, calc(100vh - 120px));
  overflow: hidden;
  position: fixed;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
}

.neferu-chat__panel[hidden] {
  display: none;
}

.neferu-chat__header {
  align-items: center;
  border-bottom: 1px solid var(--neferu-chat-border);
  display: flex;
  justify-content: space-between;
  min-width: 0;
  padding: 18px 18px 16px;
}

.neferu-chat__eyebrow {
  color: var(--neferu-chat-accent);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.neferu-chat__header h2 {
  color: var(--neferu-chat-text);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  margin: 0;
}

.neferu-chat__header-actions {
  display: flex;
  gap: 8px;
}

.neferu-chat__icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--neferu-chat-border);
  border-radius: 999px;
  color: var(--neferu-chat-muted);
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
  width: 34px;
}

.neferu-chat__icon-button:hover {
  background: rgba(200, 164, 85, 0.08);
  border-color: rgba(200, 164, 85, 0.55);
  color: var(--neferu-chat-text);
}

.neferu-chat__icon-button svg {
  height: 16px;
  width: 16px;
}

.neferu-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  scrollbar-color: var(--neferu-chat-border) transparent;
}

.neferu-chat__message {
  animation: neferu-chat-fade-in 180ms ease both;
  display: grid;
  gap: 8px;
  max-width: 88%;
}

.neferu-chat__message--assistant {
  align-self: flex-start;
  grid-template-columns: 28px minmax(0, 1fr);
}

.neferu-chat__message--user {
  align-self: flex-end;
}

.neferu-chat__avatar {
  align-items: center;
  background: var(--neferu-chat-accent);
  border-radius: 999px;
  color: #0A0A0A;
  display: flex;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.neferu-chat__bubble {
  background: rgba(245, 240, 232, 0.06);
  border: 1px solid var(--neferu-chat-border);
  border-radius: 8px;
  color: var(--neferu-chat-text);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  padding: 12px 13px;
  white-space: pre-wrap;
}

.neferu-chat__message--user .neferu-chat__bubble {
  background: rgba(200, 164, 85, 0.16);
  border-color: rgba(200, 164, 85, 0.36);
}

.neferu-chat__message-actions {
  grid-column: 2;
}

.neferu-chat__booking {
  align-items: center;
  background: var(--neferu-chat-accent);
  border-radius: 999px;
  color: #0A0A0A;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  margin-top: 8px;
  min-height: 36px;
  padding: 0 14px;
  text-decoration: none;
}

.neferu-chat__cursor {
  animation: neferu-chat-cursor 900ms steps(2, start) infinite;
  background: var(--neferu-chat-accent);
  display: inline-block;
  height: 1em;
  margin-left: 3px;
  transform: translateY(2px);
  width: 2px;
}

.neferu-chat__form {
  align-items: end;
  border-top: 1px solid var(--neferu-chat-border);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.neferu-chat__form textarea {
  background: rgba(245, 240, 232, 0.06);
  border: 1px solid var(--neferu-chat-border);
  border-radius: 8px;
  color: var(--neferu-chat-text);
  font: inherit;
  font-size: 14px;
  height: 46px;
  line-height: 1.4;
  max-height: 116px;
  min-height: 46px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.neferu-chat__form textarea::placeholder {
  color: var(--neferu-chat-muted);
}

.neferu-chat__send {
  background: var(--neferu-chat-accent);
  border: 0;
  border-radius: 999px;
  color: #0A0A0A;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  height: 46px;
  padding: 0 18px;
}

.neferu-chat__send:disabled,
.neferu-chat__form textarea:disabled {
  cursor: wait;
  opacity: 0.65;
}

.neferu-chat__sr {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

@keyframes neferu-chat-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes neferu-chat-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes neferu-chat-cursor {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .neferu-chat__button {
    bottom: 18px;
    right: 18px;
  }

  .neferu-chat__panel {
    border: 0;
    border-radius: 0;
    bottom: 0;
    height: 100dvh;
    max-height: none;
    right: 0;
    width: 100vw;
  }

  .neferu-chat__header {
    padding: 18px 16px 14px;
  }

  .neferu-chat__messages {
    padding: 16px;
  }

  .neferu-chat__message {
    max-width: 94%;
  }
}
