/* wilder.css - Styles for Wilder Persona Widget and Landing Page */

/* Base Variables - Wilder Palette */
:root {
  --wilder-sage: #A8D5BA;
  --wilder-gold: #D4AF37;
  --wilder-amber: #FFBF00;
  --wilder-titanium: #878681;
  --wilder-dark: #0f172a;
  --wilder-panel-bg: rgba(15, 23, 42, 0.85);
  --wilder-glass-bg: rgba(255, 255, 255, 0.05);
  --wilder-glass-border: rgba(255, 255, 255, 0.1);
}

/* Floating Widget Styles */
#wilder-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
  pointer-events: none; /* Let clicks pass through empty areas */
}

.wilder-launcher {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  transition: all 0.3s ease;
}

.wilder-thought-bubble {
  background: white;
  color: #064e3b;
  padding: 8px 18px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  position: relative;
  border: 1px solid var(--wilder-sage);
  pointer-events: auto;
  cursor: pointer;
  animation: float-bubble 3s ease-in-out infinite;
  white-space: nowrap;
}

.wilder-thought-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: white;
  border-right: 1px solid var(--wilder-sage);
  border-bottom: 1px solid var(--wilder-sage);
  transform: rotate(45deg);
}

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

.wilder-avatar-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--wilder-sage);
  border: 2px solid var(--wilder-gold);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  pointer-events: auto;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wilder-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wilder-idle-pulse {
  animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px var(--wilder-sage); }
  100% { box-shadow: 0 0 20px var(--wilder-amber); }
}

.wilder-avatar-btn:hover {
  transform: scale(1.05);
}

.wilder-chat-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  max-height: 80vh;
  background: var(--wilder-dark);
  border: 1px solid var(--wilder-glass-border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  visibility: hidden;
  overflow: hidden;
}

.wilder-chat-panel.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.wilder-chat-header {
  padding: 16px;
  background: linear-gradient(135deg, rgba(168,213,186,0.2) 0%, rgba(212,175,55,0.1) 100%);
  border-bottom: 1px solid var(--wilder-glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.wilder-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wilder-header-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--wilder-gold);
}

.wilder-header-text h3 {
  margin: 0;
  font-size: 16px;
  color: var(--wilder-sage);
  font-family: 'Outfit', sans-serif;
}

.wilder-header-text p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

.wilder-close-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 20px;
  transition: color 0.2s;
  padding: 4px;
}

.wilder-close-btn:hover {
  color: white;
}

.wilder-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0,0,0,0.2);
}

.wilder-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.wilder-message.wilder {
  align-self: flex-start;
  background: var(--wilder-glass-bg);
  color: #e2e8f0;
  border: 1px solid var(--wilder-glass-border);
  border-bottom-left-radius: 4px;
}

.wilder-message.user {
  align-self: flex-end;
  background: var(--wilder-sage);
  color: #064e3b;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.wilder-chat-input-area {
  padding: 16px;
  background: var(--wilder-dark);
  border-top: 1px solid var(--wilder-glass-border);
}

.wilder-seed-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px; margin-bottom: 8px;
  scrollbar-width: none;
}
.wilder-seed-prompts::-webkit-scrollbar { display: none; }

.wilder-seed-prompt-btn {
  background: var(--wilder-glass-bg);
  border: 1px solid var(--wilder-sage);
  color: var(--wilder-sage);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.wilder-seed-prompt-btn:hover {
  background: var(--wilder-sage);
  color: #064e3b;
}

.wilder-input-form {
  display: flex;
  gap: 8px;
}

.wilder-input-form input {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--wilder-glass-border);
  color: white;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
}

.wilder-input-form input:focus {
  outline: none;
  border-color: var(--wilder-sage);
}

.wilder-input-form button {
  background: var(--wilder-gold);
  color: #451a03;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.wilder-input-form button:hover {
  transform: scale(1.05);
}

/* One-time popup */
.wilder-popup {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 250px;
  background: var(--wilder-dark);
  border: 1px solid var(--wilder-sage);
  border-radius: 12px;
  padding: 16px;
  color: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

.wilder-popup.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.wilder-popup p {
  margin: 0 0 12px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #e2e8f0;
}

.wilder-popup-btn {
  display: inline-block;
  background: var(--wilder-sage);
  color: #064e3b;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.wilder-popup-btn:hover {
  background: var(--wilder-gold);
  color: #451a03;
  transform: scale(1.02);
}

.wilder-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
}

@media (max-width: 768px) {
  .wilder-chat-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    bottom: unset;
    right: unset;
    transform: translateY(100%);
  }
  .wilder-chat-panel.active {
    transform: translateY(0);
  }
}

/* Meet Wilder Landing Page Specifics */
.meet-wilder-hero {
  background: var(--wilder-dark);
  color: white;
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}

.meet-wilder-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 70% 30%, rgba(168,213,186,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.meet-wilder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 991px) {
  .meet-wilder-grid {
    grid-template-columns: 1fr;
  }
}

.mapper-coin-dashboard {
  background: var(--wilder-glass-bg);
  border: 1px solid var(--wilder-glass-border);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.mapper-coin-dashboard img {
  width: 80px;
  height: auto;
  margin-bottom: 1rem;
}

.coin-balance {
  font-size: 3rem;
  font-weight: 700;
  color: var(--wilder-gold);
  line-height: 1;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 0.5rem;
}

.coin-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.coin-progress-fill {
  height: 100%;
  background: var(--wilder-sage);
  width: 0%;
  transition: width 1s ease-out;
}

.origin-story-section {
  padding: 4rem 0;
}

.story-stage {
  display: flex;
  gap: 3rem;
  margin-bottom: 4rem;
  align-items: center;
}

.story-stage:nth-child(even) {
  flex-direction: row-reverse;
}

.story-stage img {
  flex: 1;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.story-content {
  flex: 1;
}

.story-content h3 {
  color: var(--primary-color);
  font-family: 'Outfit', sans-serif;
}

.full-chat-container {
  max-width: 800px;
  margin: 4rem auto;
  background: var(--wilder-dark);
  border-radius: 20px;
  overflow: hidden;
  height: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.chip-sidebar {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 16px;
  border-left: 4px solid var(--wilder-sage);
}
