/* chatbot.css — Little Dave AI chatbot styles
   Shared across all pages that display the chatbot.
   Index.html uses a different layout (centered hero variant);
   see index.html inline <style> for that override. */

/* ── Container ── */
.fyr-chat-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Outfit', sans-serif;
}

/* ── Floating Toggle Button ── */
.fyr-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blueBright) 0%, #152B4D 100%);
  border: 2px solid var(--yellow);
  box-shadow: 0 8px 32px rgba(44, 108, 255, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: visible;
}

.fyr-chat-toggle:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 40px rgba(44, 108, 255, 0.6), 0 0 15px rgba(255, 212, 71, 0.3);
}

.fyr-chat-toggle:active {
  transform: scale(0.95);
}

.fyr-chat-toggle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.8s ease-in-out;
}

.fyr-chat-toggle:hover img {
  transform: scale(1.05);
}

/* ── Nameplate ── */
.fyr-chat-nameplate {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--yellow);
  color: var(--dark);
  font-family: 'Oswald', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.15);
  z-index: 10;
  pointer-events: none;
}

/* ── Notification Badge ── */
.fyr-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #e74c3c;
  border: 2px solid var(--dark);
  border-radius: 50%;
  box-shadow: 0 0 8px #e74c3c;
  animation: fyr-badge-pulse 2s infinite;
}

@keyframes fyr-badge-pulse {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* ── Chat Window Card ── */
.fyr-chat-window {
  width: 380px;
  height: 520px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 180px);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  background: rgba(8, 17, 31, 0.88);
  border: 1px solid rgba(44, 108, 255, 0.25);
  border-radius: 20px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(44, 108, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.fyr-chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ── Chat Header ── */
.fyr-chat-header {
  padding: 1rem 1.2rem;
  background: linear-gradient(90deg, rgba(10, 44, 116, 0.85) 0%, rgba(44, 108, 255, 0.4) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.fyr-chat-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.fyr-chat-icon-pulse {
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--yellow);
  animation: pulse-yellow 1.5s infinite;
}

@keyframes pulse-yellow {
  0%   { box-shadow: 0 0 0 0 rgba(255, 212, 71, 0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(255, 212, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 212, 71, 0); }
}

.fyr-chat-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--yellow);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}

.fyr-chat-subtitle {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 0.4rem;
}

.fyr-chat-close {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.fyr-chat-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ── Message List ── */
.fyr-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fyr-chat-messages::-webkit-scrollbar { width: 6px; }
.fyr-chat-messages::-webkit-scrollbar-track { background: transparent; }
.fyr-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(44, 108, 255, 0.3);
  border-radius: 4px;
}
.fyr-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(44, 108, 255, 0.5);
}

/* ── Message Bubbles ── */
.fyr-msg {
  max-width: 85%;
  display: flex;
  flex-direction: column;
  animation: fyr-fade-in-up 0.25s ease-out forwards;
}

@keyframes fyr-fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fyr-msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.fyr-msg.bot {
  align-self: flex-start;
  align-items: flex-start;
  display: flex;
  gap: 0.6rem;
}

.fyr-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--yellow);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 212, 71, 0.4);
  margin-top: 2px;
}

.fyr-msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.fyr-msg.user .fyr-msg-bubble {
  background: rgba(44, 108, 255, 0.22);
  border: 1px solid rgba(44, 108, 255, 0.35);
  color: var(--cream);
  border-bottom-right-radius: 4px;
}

.fyr-msg.bot .fyr-msg-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--cream);
  border-bottom-left-radius: 4px;
}

.fyr-msg-bubble p { margin-bottom: 0.5rem; }
.fyr-msg-bubble p:last-child { margin-bottom: 0; }
.fyr-msg-bubble ul, .fyr-msg-bubble ol { padding-left: 1.2rem; margin: 0.4rem 0; }
.fyr-msg-bubble li { margin-bottom: 0.2rem; }

.fyr-msg-meta {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.25rem;
  padding: 0 0.3rem;
}

/* ── Prompt Suggestions ── */
.fyr-suggestions-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.fyr-suggestion-pill {
  background: rgba(255, 212, 71, 0.06);
  border: 1px solid rgba(255, 212, 71, 0.25);
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  color: var(--yellow);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.fyr-suggestion-pill:hover {
  background: rgba(255, 212, 71, 0.12);
  border-color: rgba(255, 212, 71, 0.5);
  transform: translateY(-1px);
}

/* ── Typing Dots ── */
.fyr-typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  align-items: center;
}

.fyr-dot {
  width: 6px;
  height: 6px;
  background-color: var(--muted);
  border-radius: 50%;
  animation: fyr-dot-bounce 1.4s infinite ease-in-out both;
}

.fyr-dot:nth-child(1) { animation-delay: -0.32s; }
.fyr-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes fyr-dot-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40%           { transform: scale(1.0); }
}

/* ── Input Footer ── */
.fyr-chat-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 17, 31, 0.5);
}

.fyr-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 0.3rem 0.3rem 0.3rem 1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.fyr-chat-input-bar:focus-within {
  border-color: var(--blueBright);
  box-shadow: 0 0 12px rgba(44, 108, 255, 0.25);
}

.fyr-chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.4rem 0;
}

.fyr-chat-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.fyr-chat-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blueBright);
  border: none;
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.fyr-chat-send:hover {
  background: #4784ff;
  transform: scale(1.05);
}

.fyr-chat-send:active {
  transform: scale(0.95);
}

/* ── Inline styles that were scattered across pages ── */

/* Form zero-margin (was style="margin: 0" on #fyr-chat-form) */
#fyr-chat-form {
  margin: 0;
}

/* Sticky header drag handle — position rule for pages that make the
   chatbot draggable via JS. Omitted here: the JS sets position:fixed
   at runtime. This rule just provides the cursor/user-select default. */
.fyr-chat-header.draggable {
  cursor: move;
  user-select: none;
}
