/* EnPremium LLC - AI Concierge & Chatbot Widget Styles */
#enp-chatbot-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: var(--font-main, 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif);
}

/* Floating Launcher Button */
.enp-chat-launcher {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 50%, #0ea5e9 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.enp-chat-launcher:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.6);
}

.enp-launcher-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.6);
  animation: enp-pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes enp-pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

.enp-launcher-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
}

/* Chat Dialog Window */
.enp-chat-window {
  display: none;
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 100px);
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  flex-direction: column;
  overflow: hidden;
  animation: enp-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.enp-chat-window.open {
  display: flex;
}

@keyframes enp-slide-up {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.enp-chat-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.enp-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.enp-chat-title-group h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
}

.enp-chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #10b981;
}

.enp-chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.enp-chat-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.enp-chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

/* Messages Area */
.enp-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

.enp-chat-body::-webkit-scrollbar {
  width: 5px;
}
.enp-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

/* Message bubbles */
.enp-msg {
  display: flex;
  flex-direction: column;
  max-width: 84%;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: enp-msg-fade 0.25s ease forwards;
}

@keyframes enp-msg-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.enp-msg.bot .enp-bubble {
  background: #1e293b;
  color: #f1f5f9;
  border-radius: 14px 14px 14px 2px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.enp-msg.bot .enp-bubble a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.enp-msg.user {
  align-self: flex-end;
}

.enp-msg.user .enp-bubble {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border-radius: 14px 14px 2px 14px;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.enp-msg-time {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 4px;
  padding: 0 4px;
}
.enp-msg.user .enp-msg-time {
  align-self: flex-end;
}

/* Prompt Suggestions Chips */
.enp-suggestions-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.enp-chip-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #cbd5e1;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.enp-chip-btn:hover {
  background: rgba(79, 70, 229, 0.2);
  border-color: var(--primary, #4f46e5);
  color: #ffffff;
  transform: translateX(2px);
}

/* Typing indicator */
.enp-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: #1e293b;
  border-radius: 14px 14px 14px 2px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.enp-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: enp-bounce 1.4s infinite ease-in-out;
}
.enp-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.enp-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes enp-bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Input Form */
.enp-chat-footer {
  padding: 0.85rem 1rem;
  background: #0b1120;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.enp-chat-input-form {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
}

.enp-chat-input {
  flex: 1;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.enp-chat-input:focus {
  border-color: #6366f1;
  background: #1a2333;
}

.enp-chat-input::placeholder {
  color: #64748b;
}

.enp-chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #4f46e5;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.enp-chat-send-btn:hover:not(:disabled) {
  background: #4338ca;
  transform: scale(1.05);
}

.enp-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.enp-chat-tagline {
  font-size: 0.7rem;
  color: #475569;
  text-align: center;
  margin-top: 6px;
}

@media (max-width: 480px) {
  .enp-chat-window {
    width: 100vw;
    height: calc(100vh - 80px);
    bottom: 70px;
    right: -12px;
    border-radius: 16px;
  }
}
