/* SkylineHub website assistant. Uses the site's color tokens from index.html. */

.sh-chat-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  width: 78px;
  height: 78px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.2s ease;
  animation: sh-chat-float 3.2s ease-in-out infinite;
}

.sh-chat-launcher img {
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(12, 42, 76, 0.28));
}

.sh-chat-launcher:hover {
  animation-play-state: paused;
  transform: translateY(-3px) scale(1.06);
}

.sh-chat-launcher:focus-visible {
  outline: 3px solid var(--gold, #c8a24e);
  outline-offset: 2px;
}

.sh-chat-launcher.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes sh-chat-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-chat-launcher {
    animation: none;
  }
  .sh-chat-panel,
  .sh-chat-launcher {
    transition: none;
  }
}

.sh-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1001;
  width: 370px;
  height: min(580px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line, #dde5ec);
  border-radius: 1.5rem;
  background: var(--paper, #fbfaf7);
  box-shadow: 0 24px 70px rgba(8, 28, 49, 0.25);
  font-family: "Montserrat", sans-serif;
  color: var(--ink, #24384c);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.sh-chat-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sh-chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--navy, #0f2942);
  color: #fff;
}

.sh-chat-header img {
  width: 40px;
  height: auto;
}

.sh-chat-title {
  flex: 1;
  min-width: 0;
}

.sh-chat-title strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.sh-chat-title span {
  display: block;
  font-size: 0.72rem;
  color: var(--skyline-mist, #cfe2ee);
}

.sh-chat-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.sh-chat-close:hover,
.sh-chat-close:focus-visible {
  border-color: var(--gold, #c8a24e);
  color: var(--gold, #c8a24e);
  outline: none;
}

.sh-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #fff;
}

.sh-chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sh-chat-msg.bot {
  align-self: flex-start;
  background: var(--skyline-mist, #cfe2ee);
  color: var(--navy, #0f2942);
  border-bottom-left-radius: 0.35rem;
}

.sh-chat-msg.user {
  align-self: flex-end;
  background: var(--navy, #0f2942);
  color: #fff;
  border-bottom-right-radius: 0.35rem;
}

.sh-chat-msg a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sh-chat-msg.lead {
  align-self: stretch;
  max-width: none;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 0.8rem;
}

.sh-chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.8rem 0.9rem;
  border-radius: 1.1rem;
  background: var(--skyline-mist, #cfe2ee);
}

.sh-chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy, #0f2942);
  opacity: 0.35;
  animation: sh-chat-dot 1.2s infinite;
}

.sh-chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.sh-chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes sh-chat-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
  }
  40% {
    opacity: 1;
  }
}

.sh-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1rem 0.75rem;
  background: #fff;
}

.sh-chat-chips[hidden] {
  display: none;
}

.sh-chat-chip {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line, #dde5ec);
  border-radius: 999px;
  background: var(--paper, #fbfaf7);
  color: var(--navy, #0f2942);
  font: 600 0.78rem "Montserrat", sans-serif;
  cursor: pointer;
}

.sh-chat-chip:hover,
.sh-chat-chip:focus-visible {
  border-color: var(--gold, #c8a24e);
  outline: none;
}

.sh-chat-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line, #dde5ec);
  background: var(--paper, #fbfaf7);
}

.sh-chat-input {
  flex: 1;
  min-width: 0;
  max-height: 120px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line, #dde5ec);
  border-radius: 1rem;
  background: #fff;
  color: var(--ink, #24384c);
  font: 16px/1.4 "Montserrat", sans-serif; /* 16px stops iOS zoom on focus */
  resize: none;
}

.sh-chat-input:focus {
  border-color: var(--navy, #0f2942);
  outline: none;
}

.sh-chat-send {
  flex: none;
  height: 42px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--gold, #c8a24e);
  color: var(--navy, #0f2942);
  font: 700 0.85rem "Montserrat", sans-serif;
  cursor: pointer;
}

.sh-chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sh-chat-send:focus-visible {
  outline: 3px solid var(--navy, #0f2942);
  outline-offset: 2px;
}

.sh-chat-note {
  margin: 0;
  padding: 0 0.9rem 0.65rem;
  background: var(--paper, #fbfaf7);
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--muted, #627284);
  text-align: center;
}

.sh-chat-note a {
  color: inherit;
  text-decoration: underline;
}

/* Stop the page behind the full-screen chat from scrolling on phones. */
html.sh-chat-lock,
html.sh-chat-lock body {
  overflow: hidden;
}

@media (max-width: 480px) {
  .sh-chat-launcher {
    right: 12px;
    bottom: 12px;
    width: 68px;
    height: 68px;
  }

  .sh-chat-panel {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: 0;
  }
}
