/* Edia Chatbot Styles */

/* Floating Button */
.edia-toggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  z-index: 9998;
  transition: all 0.3s ease;
  animation: ediaFloat 3s ease-in-out infinite;
}

.edia-toggle:hover {
  transform: translateY(-5px) scale(1.1);
  filter: drop-shadow(0 8px 20px rgba(37,99,235,0.6));
}

.edia-toggle.active {
  transform: scale(0.95);
}

.edia-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

/* Pulse Effect */
.edia-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #2563eb;
  opacity: 0;
  animation: ediaPulse 2s ease-out infinite;
}

/* Badge */
.edia-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #000;
  animation: ediaBounce 0.5s ease;
}

/* Welcome Tooltip */
.edia-tooltip {
  position: fixed;
  bottom: 110px;
  left: 24px;
  max-width: 240px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(37,99,235,0.4);
  z-index: 9997;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.edia-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #0ea5e9;
}

.edia-tooltip-show {
  opacity: 1;
  transform: translateY(0);
}

.edia-tooltip p {
  color: white;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  font-weight: 500;
}

.edia-tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.edia-tooltip-close:hover {
  background: rgba(255,255,255,0.3);
}


/* Chat Window */
.edia-chat {
  position: fixed;
  bottom: 110px;
  left: 24px;
  width: 400px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 150px);
  background: #0a0a0a;
  border: 1px solid rgba(37,99,235,0.3);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(37,99,235,0.2);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

/* Header */
.edia-header {
  padding: 20px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.edia-header .flex {
  display: flex;
}

.edia-header .items-center {
  align-items: center;
}

.edia-header .gap-3 {
  gap: 0.75rem;
}

.edia-header .gap-2 {
  gap: 0.5rem;
}

.edia-header .flex-1 {
  flex: 1 1 0%;
}

.edia-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin: 0;
  line-height: 1.2;
}

.edia-header p {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin: 2px 0 0 0;
  line-height: 1.2;
}

.edia-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.edia-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 20px;
  line-height: 1;
}

.edia-close:hover {
  background: rgba(255,255,255,0.2);
}

.edia-minimize {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 24px;
  line-height: 1;
}

.edia-minimize:hover {
  background: rgba(255,255,255,0.2);
}

.edia-chat.minimized {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
}

/* Messages */
.edia-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.3) transparent;
}

.edia-messages::-webkit-scrollbar {
  width: 6px;
}

.edia-messages::-webkit-scrollbar-thumb {
  background: rgba(37,99,235,0.3);
  border-radius: 3px;
}

/* Message */
.edia-message {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: ediaMessageSlide 0.3s ease;
}

.edia-message.edia-user {
  align-items: flex-end;
}

.edia-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.edia-bot .edia-bubble {
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.2);
  color: #f1f5f9;
}

.edia-user .edia-bubble {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
  font-weight: 500;
}

/* Options */
.edia-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.edia-option {
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 12px;
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
}

.edia-option:hover {
  background: rgba(37,99,235,0.15);
  border-color: rgba(37,99,235,0.4);
  transform: translateX(4px);
}

.edia-option span {
  line-height: 1.4;
}

/* Input Area */
.edia-input-area {
  padding: 16px 20px;
  border-top: 1px solid rgba(37,99,235,0.2);
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.edia-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edia-input {
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 10px;
  color: white;
  font-size: 14px;
  transition: all 0.2s;
}

.edia-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.edia-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.edia-submit {
  padding: 12px 20px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.edia-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.4);
}

.edia-contact-btn {
  padding: 14px 20px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.edia-contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.5);
}

.edia-restart-btn {
  padding: 10px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(37,99,235,0.3);
  border-radius: 10px;
  color: #94a3b8;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.edia-restart-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(37,99,235,0.5);
  color: #cbd5e1;
}
.edia-modal {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.edia-modal.active {
  opacity: 1;
  pointer-events: all;
}

.edia-modal-content {
  background: #0a0a0a;
  border: 1px solid rgba(37,99,235,0.3);
  border-radius: 20px;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(37,99,235,0.2);
  animation: ediaModalSlide 0.3s ease;
}

@keyframes ediaModalSlide {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.edia-modal-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(37,99,235,0.2);
}

.edia-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.edia-modal-body {
  padding: 20px;
}

.edia-modal-body p {
  color: #f1f5f9;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.edia-modal-footer {
  padding: 12px 20px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.edia-modal-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.edia-modal-btn-primary {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.edia-modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239,68,68,0.4);
}

.edia-modal-btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(37,99,235,0.3);
  color: #f1f5f9;
}

.edia-modal-btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(37,99,235,0.5);
}

/* Chat Input */
.edia-chat-input-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

.edia-chat-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.edia-chat-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  background: rgba(255,255,255,0.08);
}

.edia-chat-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.edia-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.edia-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.edia-send-btn:active {
  transform: translateY(0);
}

.edia-send-btn .material-symbols-outlined {
  font-size: 20px;
}

/* Animations */
@keyframes ediaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes ediaPulse {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

@keyframes ediaBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@keyframes ediaMessageSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 640px) {
  .edia-toggle {
    width: 60px;
    height: 60px;
    bottom: 20px;
    left: 20px;
  }
  
  .edia-tooltip {
    bottom: 95px;
    left: 20px;
  }
  
  .edia-chat {
    bottom: 95px;
    left: 20px;
    right: 20px;
    width: auto;
    max-width: none;
  }
}

/* Name Input */
.edia-name-input-container {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.edia-name-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.edia-name-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  background: rgba(255,255,255,0.08);
}

.edia-name-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.edia-name-input.error {
  border-color: #ef4444;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Typing Indicator */
.edia-typing-dots {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
}

.edia-typing-dots span {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.edia-typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.edia-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.edia-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Text container for typing effect */
.edia-text {
  display: inline;
  word-wrap: break-word;
}

.edia-name-submit {
  padding: 12px 20px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.edia-name-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

/* Back Button */
.edia-back-btn {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 10px;
  color: #94a3b8;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.edia-back-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(37,99,235,0.4);
  color: #cbd5e1;
}

/* Privacy Notice */
.edia-privacy-notice {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  padding: 8px;
  margin-top: 8px;
}

/* Emoji Reactions */
.edia-reactions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.edia-message:hover .edia-reactions {
  opacity: 1;
}

.edia-reaction-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(37,99,235,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  padding: 0;
}

.edia-reaction-btn:hover {
  background: rgba(37,99,235,0.15);
  border-color: rgba(37,99,235,0.4);
  transform: scale(1.1);
}

.edia-reaction-btn.active {
  background: rgba(37,99,235,0.25);
  border-color: rgba(37,99,235,0.5);
  transform: scale(1.15);
}


