/* ============================================================
   SCHOLLMEYER REAL ESTATE - chatbot.css
   Floating FAQ assistant - matches dark luxury theme
   ============================================================ */

/* --- Launcher button --- */
.chatbot-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 18px;
  background: linear-gradient(135deg, #C9A84C 0%, #9A7B2F 100%);
  color: #080808;
  border: none;
  border-radius: 999px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.35), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s, opacity 0.25s;
}
.chatbot-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201, 168, 76, 0.5), 0 4px 12px rgba(0,0,0,0.5);
}
.chatbot-launcher.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.chatbot-launcher-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chatbot-launcher-icon svg {
  width: 100%;
  height: 100%;
}
.chatbot-launcher-pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: chatbot-pulse 2.2s infinite;
}
@keyframes chatbot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* --- Chat panel --- */
.chatbot-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9001;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 56px);
  background: #0f0f0f;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.75), 0 0 60px rgba(201, 168, 76, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.chatbot-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* --- Header --- */
.chatbot-header {
  flex: 0 0 auto;
  padding: 18px 20px;
  background: linear-gradient(180deg, #141414 0%, #0f0f0f 100%);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chatbot-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C9A84C 0%, #9A7B2F 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #080808;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.chatbot-header-text {
  flex: 1;
  min-width: 0;
}
.chatbot-header-title {
  font-family: 'Playfair Display', Georgia, serif;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.2;
  margin: 0;
}
.chatbot-header-sub {
  color: #AAAAAA;
  font-size: 0.78rem;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chatbot-header-sub::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}
.chatbot-close {
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: #AAAAAA;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.chatbot-close:hover {
  color: #C9A84C;
  border-color: rgba(201, 168, 76, 0.5);
}
.chatbot-close svg {
  width: 14px;
  height: 14px;
}

/* --- Message area --- */
.chatbot-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #9A7B2F #0f0f0f;
}
.chatbot-body::-webkit-scrollbar { width: 4px; }
.chatbot-body::-webkit-scrollbar-thumb { background: #9A7B2F; border-radius: 2px; }

.chatbot-msg {
  max-width: 85%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.91rem;
  line-height: 1.5;
  color: #E8E8E8;
  animation: chatbot-msg-in 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes chatbot-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chatbot-msg.bot {
  background: #1c1c1c;
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.chatbot-msg.user {
  background: linear-gradient(135deg, #C9A84C 0%, #9A7B2F 100%);
  color: #080808;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  font-weight: 500;
}
.chatbot-msg a {
  color: #E2C375;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chatbot-msg.user a { color: #080808; font-weight: 600; }
.chatbot-msg p + p { margin-top: 8px; }
.chatbot-msg strong { color: #fff; font-weight: 600; }
.chatbot-msg.user strong { color: #080808; }

/* Typing indicator */
.chatbot-typing {
  align-self: flex-start;
  padding: 14px 16px;
  background: #1c1c1c;
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
}
.chatbot-typing span {
  width: 7px;
  height: 7px;
  background: #C9A84C;
  border-radius: 50%;
  opacity: 0.4;
  animation: chatbot-typing 1.2s infinite;
}
.chatbot-typing span:nth-child(2) { animation-delay: 0.15s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatbot-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* --- Quick-reply chips --- */
.chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 8px;
  animation: chatbot-msg-in 0.3s cubic-bezier(0.4,0,0.2,1);
}
.chatbot-chip {
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: #C9A84C;
  padding: 7px 13px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.chatbot-chip:hover {
  background: rgba(201, 168, 76, 0.12);
  border-color: #C9A84C;
  color: #E2C375;
}
.chatbot-chip.primary {
  background: linear-gradient(135deg, #C9A84C 0%, #9A7B2F 100%);
  color: #080808;
  border-color: transparent;
}
.chatbot-chip.primary:hover {
  filter: brightness(1.1);
  color: #080808;
}

/* --- Input area --- */
.chatbot-input-wrap {
  flex: 0 0 auto;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(201, 168, 76, 0.12);
  background: #0a0a0a;
}
.chatbot-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #141414;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  transition: border-color 0.2s;
}
.chatbot-input-row:focus-within {
  border-color: rgba(201, 168, 76, 0.5);
}
.chatbot-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #E8E8E8;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 8px 0;
  cursor: text;
}
.chatbot-input::placeholder { color: #555; }
.chatbot-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #C9A84C 0%, #9A7B2F 100%);
  color: #080808;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, filter 0.15s;
}
.chatbot-send:hover { filter: brightness(1.12); transform: scale(1.05); }
.chatbot-send:disabled { opacity: 0.4; cursor: not-allowed; }
.chatbot-send svg { width: 16px; height: 16px; }

.chatbot-footer {
  margin-top: 10px;
  text-align: center;
  color: #555;
  font-size: 0.7rem;
  letter-spacing: 0.3px;
}
.chatbot-footer a { color: #777; }
.chatbot-footer a:hover { color: #C9A84C; }

/* --- Mobile --- */
@media (max-width: 600px) {
  .chatbot-launcher {
    bottom: 18px;
    right: 18px;
    padding: 12px 18px 12px 14px;
    font-size: 0.88rem;
  }
  .chatbot-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
}

/* Re-enable native cursor inside the widget (site uses cursor: none on body) */
.chatbot-launcher,
.chatbot-panel,
.chatbot-panel * {
  cursor: auto;
}
.chatbot-launcher,
.chatbot-close,
.chatbot-chip,
.chatbot-send,
.chatbot-msg a {
  cursor: pointer !important;
}
.chatbot-input { cursor: text !important; }
