/* Chromie Timeway Chatbot CSS — TheWoWDB.com */
.chromie-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 21, 30, 0.92);
  border: 2px solid #d4af37;
  border-radius: 30px;
  padding: 6px 16px 6px 6px;
  color: #f3e5ab;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.3);
  transition: all 0.25s ease-in-out;
  font-family: inherit;
}

.chromie-chat-launcher:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7), 0 0 22px rgba(212, 175, 55, 0.5);
  border-color: #ffd700;
}

.chromie-launcher-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
}

.chromie-launcher-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #d4af37;
  object-fit: cover;
}

.chromie-launcher-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #2ecc71;
  border: 2px solid #12151e;
  border-radius: 50%;
}

.chromie-launcher-text {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: #ffd700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Chat Window */
.chromie-chat-window {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 110px);
  background: #12151e;
  border: 2px solid #d4af37;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.25);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.chromie-chat-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
.chromie-chat-header {
  background: linear-gradient(180deg, #242938 0%, #171b26 100%);
  border-bottom: 1px solid #d4af37;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chromie-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chromie-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #d4af37;
}

.chromie-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffd700;
  margin: 0;
  line-height: 1.2;
}

.chromie-header-subtitle {
  font-size: 11px;
  color: #a0aec0;
  margin: 0;
}

.chromie-chat-close {
  background: transparent;
  border: none;
  color: #a0aec0;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}

.chromie-chat-close:hover {
  color: #ffd700;
}

/* Body / Messages */
.chromie-chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: radial-gradient(circle at top right, #1b202c 0%, #10121a 100%);
}

.chromie-msg {
  display: flex;
  gap: 8px;
  max-width: 88%;
}

.chromie-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chromie-msg.bot {
  align-self: flex-start;
}

.chromie-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.chromie-msg.bot .chromie-msg-bubble {
  background: #232838;
  border: 1px solid #3a4259;
  color: #e2e8f0;
  border-top-left-radius: 2px;
}

.chromie-msg.user .chromie-msg-bubble {
  background: #8b6b23;
  color: #fff;
  border-top-right-radius: 2px;
}

.chromie-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #d4af37;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Typing indicator */
.chromie-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #232838;
  border-radius: 12px;
  width: fit-content;
}

.chromie-dot {
  width: 6px;
  height: 6px;
  background: #d4af37;
  border-radius: 50%;
  animation: chromiePulse 1.2s infinite ease-in-out;
}

.chromie-dot:nth-child(2) { animation-delay: 0.2s; }
.chromie-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chromiePulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.4); opacity: 1; }
}

/* Quick chips */
.chromie-quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  background: #151822;
  border-top: 1px solid #232838;
}

.chromie-chip {
  background: #232838;
  border: 1px solid #3d4661;
  color: #cbd5e0;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.chromie-chip:hover {
  background: #d4af37;
  color: #12151e;
  border-color: #ffd700;
}

/* Input Area */
.chromie-chat-input-area {
  padding: 10px 12px;
  background: #171b26;
  border-top: 1px solid #282f42;
  display: flex;
  gap: 8px;
}

.chromie-chat-input {
  flex: 1;
  background: #0d0f15;
  border: 1px solid #3a4259;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.chromie-chat-input:focus {
  border-color: #d4af37;
}

.chromie-chat-send {
  background: linear-gradient(180deg, #d4af37 0%, #aa8524 100%);
  border: none;
  color: #12151e;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.2s;
}

.chromie-chat-send:hover {
  filter: brightness(1.15);
}

.chromie-chat-send:disabled {
  filter: grayscale(0.6);
  cursor: wait;
}

/* Resting state (model unreachable / degraded answer) */
.chromie-launcher-status.resting {
  background: #8a93a6;
}

.chromie-msg.bot.degraded .chromie-msg-bubble {
  border-color: #6b5a2a;
}

.chromie-degraded-note {
  margin-top: 6px;
  font-size: 11px;
  color: #a0aec0;
  font-style: italic;
}

/* Links under a reply */
.chromie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chromie-link {
  background: #1b2030;
  border: 1px solid #3d4661;
  color: #ffd700;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  text-decoration: none;
}

.chromie-link:hover {
  border-color: #ffd700;
}

.chromie-msg-bubble a {
  color: #ffd700;
}

.chromie-chat-note {
  margin: 0;
  padding: 6px 12px 8px;
  background: #171b26;
  color: #7f8aa3;
  font-size: 10.5px;
  line-height: 1.3;
}
