/* ============================================
   CHAT SECTION STYLES
   Inline AI concierge section for the guest booklet.
   Rendered by chat-ai/ui/inline-section.js into #assistant.
   ============================================ */

/* Section wrapper on the booklet */
.booklet-chat-mount {
  padding: 2rem 1.5rem 2.5rem;
  background: #fff;
}

/* Inline chat card */
.chat-section {
  max-width: 900px;
  margin: 0 auto;
  background: var(--ice);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  font-family: 'Outfit', sans-serif;
}

.chat-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.35rem;
  letter-spacing: -0.005em;
}

.chat-section-subtitle {
  font-size: 0.92rem;
  color: var(--slate);
  margin-bottom: 1.2rem;
}

.chat-section-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.chat-section-suggestion {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--alpine-blue);
  background: #fff;
  border: 1px solid rgba(74, 111, 165, 0.25);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chat-section-suggestion:hover {
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: #fff;
  border-color: transparent;
}

.chat-section-input-row {
  display: flex;
  gap: 0.5rem;
  max-width: 540px;
  margin: 0 auto 0.9rem;
}

.chat-section-input-row input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(74, 111, 165, 0.2);
  border-radius: 8px;
  background: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-section-input-row input:focus {
  border-color: var(--alpine-blue);
}

.chat-section-input-row input::placeholder {
  color: var(--slate);
  opacity: 0.7;
}

.chat-section-input-row input:disabled {
  background: var(--ice);
  cursor: not-allowed;
}

.chat-section-input-row button {
  padding: 0.7rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-section-input-row button:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.chat-section-input-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-section-messages {
  max-width: 540px;
  margin: 0 auto 1rem;
  max-height: 360px;
  overflow-y: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.25rem;
}

.chat-section-footer {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  color: var(--slate);
  letter-spacing: 0.01em;
}

/* Message bubbles — used inside .chat-section-messages */
.chat-bot-message,
.chat-user-message {
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  max-width: 85%;
  line-height: 1.5;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
}

.chat-bot-message {
  background: #fff;
  color: var(--charcoal);
  align-self: flex-start;
  border: 1px solid rgba(74, 111, 165, 0.15);
  border-bottom-left-radius: 4px;
}

.chat-bot-message ul,
.chat-bot-message ol {
  margin: 0.4rem 0;
  padding-left: 1.2rem;
}

.chat-bot-message li {
  margin-bottom: 0.2rem;
}

.chat-bot-message li:last-child {
  margin-bottom: 0;
}

.chat-bot-message strong {
  font-weight: 600;
}

.chat-bot-message a {
  color: var(--alpine-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.chat-bot-message a:hover {
  text-decoration: none;
}

.chat-user-message {
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-user-message a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

/* Citations (web-search results appended to bot messages) */
.chat-citations {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: center;
}

.chat-citations-label {
  color: var(--slate);
  font-weight: 500;
}

.chat-citation-link {
  color: var(--alpine-blue);
  text-decoration: none;
  background: rgba(74, 111, 165, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  transition: background 0.2s ease;
}

.chat-citation-link:hover {
  background: var(--alpine-blue);
  color: #fff;
}

/* Typing indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0.7rem 0.95rem;
  background: #fff;
  border: 1px solid rgba(74, 111, 165, 0.15);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-typing-dot {
  width: 8px;
  height: 8px;
  background: var(--alpine-blue);
  border-radius: 50%;
  animation: chat-typing 1.4s infinite ease-in-out;
}

.chat-typing-dot:nth-child(1) { animation-delay: 0s; }
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
  .booklet-chat-mount {
    padding: 1.5rem 1rem 2rem;
  }
  .chat-section {
    padding: 1.5rem 1.1rem;
  }
  .chat-section-title {
    font-size: 1.4rem;
  }
}
