/**
 * WFI
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category   WFI
 * @package    WFI_AIEnrollmentCompanion
 * @copyright  Copyright (c) 2026 WFI (https://www.magento.com/)
 */
/**
    Enrollment Chatbot CSS
*/
/* Minimized Chatbot Button */
.ai-chatbot-minimized {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 350px;
  background: linear-gradient(#ffffff, #ffffff), linear-gradient(90deg, #ef3b3b 0%, #ef3b3b 15%, #c92a2a 30%, #17b3a3 45%, #17b3a3 60%, #4a90e2 75%, #4a90e2 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 3px solid transparent;
  border-radius: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 3px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: all 0.3s ease;
}
.ai-chatbot-minimized::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 5px;
  width: 20px;
  height: 15px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: -1;
}
.ai-chatbot-minimized::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 3px;
  width: 26px;
  height: 15px;
  background: linear-gradient(135deg, #ef3b3b 0%, #ef3b3b 50%, #4a90e2 100%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: -2;
}
.ai-chatbot-minimized:hover {
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}
.minimized-avatar {
  width: 100px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}
.minimized-content {
  flex: 1;
}
.minimized-greeting {
  margin: 0;
  font-size: 13px;
  color: #333;
}
.minimized-text {
  margin: 5px 0 0 0;
  font-size: 13px;
  color: #333;
  line-height: 1.3;
}
#ai-chatbot {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 350px;
  height: 500px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 3px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 9999;
}
#ai-chatbot.active {
  display: flex;
}
.chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}
.chat-header > div:first-child {
  display: flex;
  gap: 10px;
  align-items: center;
}
.header-star {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
.chat-header > div > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.chat-header span {
  font-weight: 600;
  font-size: 15px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.chat-header small {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.2px;
  line-height: 1.3;
}
#closeChat {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 300;
}
#closeChat:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}
#chatBody {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f5f5f5;
}
#chatBody .bot-message,
#chatBody .user-message {
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  animation: messageSlideIn 0.3s ease-out;
}
@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#chatBody .bot-message {
  align-items: flex-start;
}
#chatBody .user-message {
  flex-direction: row-reverse;
  align-items: flex-start;
}
#chatBody .bot-message > div,
#chatBody .user-message > div {
  flex: 1;
  max-width: 75%;
}
#chatBody p {
  margin: 0;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.3px;
  word-wrap: break-word;
}
#chatBody .message-time {
  font-size: 11px;
  color: #95a5a6;
  display: block;
  margin-bottom: 6px;
  padding-left: 4px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
#chatBody .bot-message .message-time {
  text-align: left;
}
#chatBody .user-message .message-time {
  text-align: right;
  padding-right: 4px;
  padding-left: 0;
}
/* Bot response bubble – modern, elegant, professional (complements user blue) */
#chatBody .bot-message p,
#chatBody .bot-message .bot-message-content {
  background: linear-gradient(145deg, #ffffff 0%, #eef2ff 50%, #e8ecff 100%);
  color: #1e293b;
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-bottom-left-radius: 4px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 400;
  letter-spacing: 0.2px;
}
#chatBody .bot-message .bot-message-content {
  padding: 14px 16px;
  line-height: 1.6;
  word-wrap: break-word;
  font-size: 14px;
}
#chatBody .bot-message .bot-message-content ul,
#chatBody .bot-message .bot-message-content ol {
  margin: 0.6em 0;
  padding-left: 1.5em;
  color: #1e293b;
}
#chatBody .bot-message .bot-message-content li {
  margin-bottom: 0.25em;
}
#chatBody .bot-message .bot-message-content h1,
#chatBody .bot-message .bot-message-content h2,
#chatBody .bot-message .bot-message-content h3,
#chatBody .bot-message .bot-message-content h4,
#chatBody .bot-message .bot-message-content h5,
#chatBody .bot-message .bot-message-content h6 {
  margin: 0.6em 0 0.3em;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
}
#chatBody .bot-message .bot-message-content h1 {
  font-size: 1.25em;
}
#chatBody .bot-message .bot-message-content h2 {
  font-size: 1.15em;
}
#chatBody .bot-message .bot-message-content h3 {
  font-size: 1.08em;
}
#chatBody .bot-message .bot-message-content a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(79, 70, 229, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}
#chatBody .bot-message .bot-message-content a:hover {
  color: #4338ca;
  border-bottom-color: #4338ca;
}
#chatBody .bot-message .bot-message-content code {
  background: rgba(102, 126, 234, 0.1);
  color: #4338ca;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.92em;
}
#chatBody .bot-message .bot-message-content blockquote {
  margin: 0.6em 0;
  padding: 0.5em 0 0.5em 1em;
  border-left: 3px solid #667eea;
  color: #334155;
  background: rgba(102, 126, 234, 0.06);
  border-radius: 0 6px 6px 0;
}
/* Typing indicator (loading) – three dots, bounce + blue/white blink */
#chatBody .message-time--hidden {
  visibility: hidden;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  line-height: 0;
}
#chatBody .chat-typing-indicator .chat-typing-dots {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 14px 16px;
  background: linear-gradient(145deg, #ffffff 0%, #eef2ff 50%, #e8ecff 100%);
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-bottom-left-radius: 4px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  min-height: 46px;
}
#chatBody .chat-typing-indicator .chat-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667eea;
  animation: chat-typing-bounce 0.6s ease-in-out infinite both;
}
#chatBody .chat-typing-indicator .chat-typing-dot:nth-child(1) {
  animation-delay: 0s;
}
#chatBody .chat-typing-indicator .chat-typing-dot:nth-child(2) {
  animation-delay: 0.12s;
}
#chatBody .chat-typing-indicator .chat-typing-dot:nth-child(3) {
  animation-delay: 0.24s;
}
@keyframes chat-typing-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    background-color: #667eea;
  }
  50% {
    transform: translateY(-8px) scale(1.2);
    opacity: 1;
    background-color: #e8ecff;
  }
}
@media (prefers-reduced-motion: reduce) {
  #chatBody .chat-typing-indicator .chat-typing-dot {
    animation: chat-typing-pulse 0.8s ease-in-out infinite both;
  }
}
@keyframes chat-typing-pulse {
  0%,
  100% {
    opacity: 1;
    background-color: #667eea;
  }
  50% {
    opacity: 0.4;
    background-color: #e8ecff;
  }
}
#chatBody .user-message p {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}
#chatBody .avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.chat-input-wrapper {
  padding: 15px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
}
.chat-input {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px;
  background: #e8f0ff;
  border: 5px solid transparent;
  border-radius: 25px;
  background-image: linear-gradient(#e8f0ff, #e8f0ff), linear-gradient(90deg, #ef3b3b 0%, #ef3b3b 15%, #c92a2a 30%, #17b3a3 45%, #17b3a3 60%, #4a90e2 75%, #4a90e2 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.chat-input textarea {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 16px;
  font-weight: 400;
  outline: none;
  color: #2c3e50;
  resize: none;
  line-height: 1.5;
  min-height: 27px;
  max-height: 85px;
  overflow-y: hidden;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  vertical-align: middle;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}
.chat-input textarea::placeholder {
  color: #5a6c7d;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.5px;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.chat-input textarea:focus::placeholder {
  opacity: 0.6;
}
.chat-input textarea:focus {
  outline: none;
}
.chat-input textarea::-webkit-scrollbar {
  width: 6px;
}
.chat-input textarea::-webkit-scrollbar-track {
  background: transparent;
}
.chat-input textarea::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 3px;
}
.chat-input textarea::-webkit-scrollbar-thumb:hover {
  background: #666;
}
.chat-input button {
  background: #999999;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 0;
  flex-shrink: 0;
}
.chat-input button:hover {
  background: #808080;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}
.send-arrow {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
