/* Lumina AI Agent Styles */

/* Avatar Character */
#lumina-avatar {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 80px;
  height: 80px;
  z-index: 99998;
  cursor: pointer;
  display: none;
  opacity: 0;
  transform: scale(0.5) translateY(50px);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#lumina-avatar.lumina-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.lumina-character {
  position: relative;
  width: 80px;
  height: 80px;
  animation: lumina-float 3s ease-in-out infinite;
}

@keyframes lumina-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.lumina-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(0,166,81,0.4) 0%, transparent 70%);
  animation: lumina-pulse 2s ease-in-out infinite;
  border-radius: 50%;
}

@keyframes lumina-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.3;
  }
}

.lumina-body {
  position: relative;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00a651 0%, #00d664 100%);
  border-radius: 50%;
  margin: 10px;
  box-shadow: 0 8px 25px rgba(0,166,81,0.4);
  border: 3px solid #fff;
}

.lumina-face {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
}

.lumina-eye {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  top: 15px;
  animation: lumina-blink 4s infinite;
}

.lumina-eye.left {
  left: 15px;
}

.lumina-eye.right {
  right: 15px;
}

@keyframes lumina-blink {
  0%, 96%, 100% {
    height: 8px;
    opacity: 1;
  }
  98% {
    height: 2px;
    opacity: 0.5;
  }
}

.lumina-smile {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-radius: 0 0 20px 20px;
}

.lumina-badge {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #00a651;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  white-space: nowrap;
}

/* Floating Messages - Thought Bubble Style */
.lumina-floating-message {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #fff;
  color: #333;
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-style: italic;
  box-shadow: 0 4px 20px rgba(0,166,81,0.2);
  max-width: 250px;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1;
  border: 2px solid #00a651;
}

/* Thought bubble tails (multiple circles) */
.lumina-floating-message::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 30px;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #00a651;
  border-radius: 50%;
}

.lumina-floating-message::before {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 20px;
  width: 8px;
  height: 8px;
  background: #fff;
  border: 2px solid #00a651;
  border-radius: 50%;
}

.lumina-floating-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Chat Interface */
#lumina-chat {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 380px;
  height: 550px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: scale(0.8) translateY(50px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#lumina-chat.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.lumina-chat-header {
  background: linear-gradient(135deg, #00a651 0%, #00d664 100%);
  color: #fff;
  padding: 16px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lumina-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lumina-avatar-small {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.lumina-avatar-small::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #00a651 0%, #00d664 100%);
  border-radius: 50%;
}

.lumina-name {
  font-weight: bold;
  font-size: 16px;
}

.lumina-title {
  font-size: 11px;
  opacity: 0.9;
}

.lumina-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}

.lumina-close:hover {
  background: rgba(255,255,255,0.3);
}

.lumina-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8f9fa;
}

.lumina-message {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  animation: lumina-message-in 0.3s ease;
}

@keyframes lumina-message-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lumina-message.lumina {
  justify-content: flex-start;
}

.lumina-message.user {
  justify-content: flex-end;
}

.lumina-avatar-tiny {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #00a651 0%, #00d664 100%);
  border-radius: 50%;
  flex-shrink: 0;
}

.lumina-message-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.lumina-message.lumina .lumina-message-bubble {
  background: #fff;
  color: #333;
  border: 1px solid #e0e0e0;
  border-bottom-left-radius: 4px;
}

.lumina-message.user .lumina-message-bubble {
  background: #00a651;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.lumina-chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e0e0e0;
  background: #fff;
}

.lumina-chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
}

.lumina-chat-input input:focus {
  border-color: #00a651;
}

.lumina-chat-input button {
  background: #00a651;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.lumina-chat-input button:hover {
  background: #008542;
}

.lumina-quick-replies {
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 16px 16px;
  max-height: 120px;
  overflow-y: auto;
}

.lumina-quick-reply {
  background: #fff;
  border: 1px solid #00a651;
  color: #00a651;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.lumina-quick-reply:hover {
  background: #00a651;
  color: #fff;
  transform: scale(1.05);
}

/* Action Buttons - Schedule & Call */
.lumina-action-btn {
  font-size: 15px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  min-width: 160px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lumina-action-btn.schedule {
  background: linear-gradient(135deg, #00a651 0%, #00d664 100%) !important;
  color: #fff !important;
  border: none !important;
}

.lumina-action-btn.schedule:hover {
  background: linear-gradient(135deg, #008542 0%, #00b656 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 166, 81, 0.4);
  transform: scale(1.08);
}

.lumina-action-btn.call {
  background: linear-gradient(135deg, #0099ff 0%, #00d4ff 100%) !important;
  color: #fff !important;
  border: none !important;
}

.lumina-action-btn.call:hover {
  background: linear-gradient(135deg, #0077cc 0%, #00aadd 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 153, 255, 0.4);
  transform: scale(1.08);
}

.lumina-action-btn.quote {
  background: linear-gradient(135deg, #ff6b00 0%, #ffa500 100%) !important;
  color: #fff !important;
  border: none !important;
}

.lumina-action-btn.quote:hover {
  background: linear-gradient(135deg, #e55a00 0%, #ff9500 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
  transform: scale(1.08);
}

/* Calculator Modal */
#lumina-calculator-modal,
#lumina-calendly-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#lumina-calculator-modal.show,
#lumina-calendly-modal.show {
  display: flex;
}

.lumina-calculator-container {
  background: white;
  border-radius: 16px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: lumina-modal-slide 0.3s ease;
}

@keyframes lumina-modal-slide {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lumina-calculator-header {
  background: linear-gradient(135deg, #00a651 0%, #00d664 100%);
  color: white;
  padding: 20px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lumina-calculator-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 28px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}

.lumina-calculator-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lumina-calculator-body {
  padding: 0;
}

.lumina-calculator-body iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #lumina-chat {
    width: calc(100% - 40px);
    height: calc(100vh - 40px);
    max-height: 600px;
  }

  #lumina-avatar {
    bottom: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
  }

  .lumina-character {
    width: 60px;
    height: 60px;
  }

  .lumina-body {
    width: 45px;
    height: 45px;
    margin: 7.5px;
  }

  /* Fix mobile face positioning */
  .lumina-eye {
    width: 6px;
    height: 6px;
    top: 11px;
  }

  .lumina-eye.left {
    left: 12px;
  }

  .lumina-eye.right {
    right: 12px;
  }

  .lumina-smile {
    bottom: 12px;
    width: 16px;
    height: 8px;
    border-width: 2px;
  }

  .lumina-calculator-container {
    max-width: 100%;
    max-height: 95vh;
  }

  .lumina-calculator-body iframe {
    height: 500px;
  }
}

/* Attention-getting animations */
@keyframes lumina-bounce-attention {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

#lumina-avatar:not(.lumina-visible) {
  animation: lumina-bounce-attention 2s ease-in-out infinite;
}

/* Scrollbar styling */
.lumina-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.lumina-chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.lumina-chat-messages::-webkit-scrollbar-thumb {
  background: #00a651;
  border-radius: 3px;
}

.lumina-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #008542;
}

/* Loading spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
