/* ═══════════════════════════════════════════════════════════
   MITZTIANPC CHATBOT STYLES - Isolated with unique prefixes
   ═══════════════════════════════════════════════════════════ */

.mpc-chatbot-container {
  position: fixed;
  bottom: 20px; /* Position above feedback button */
  right: 28px;
  z-index: 998;
  font-family: 'Barlow', sans-serif;
}

/* Toggle Button */
.mpc-chatbot-toggle {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1565C0, #1E88E5);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(21, 101, 192, 0.45);
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.mpc-chatbot-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(21, 101, 192, 0.55);
}

.mpc-chatbot-toggle svg {
  width: 24px;
  height: 24px;
  position: absolute;
  transition: opacity 0.2s, transform 0.2s;
}

.mpc-chatbot-toggle .mpc-chat-icon-open {
  opacity: 1;
  transform: rotate(0);
}

.mpc-chatbot-toggle .mpc-chat-icon-close {
  opacity: 0;
  transform: rotate(90deg);
}

.mpc-chatbot-toggle.mpc-active .mpc-chat-icon-open {
  opacity: 0;
  transform: rotate(-90deg);
}

.mpc-chatbot-toggle.mpc-active .mpc-chat-icon-close {
  opacity: 1;
  transform: rotate(0);
}

.mpc-chatbot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #E65100;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  animation: mpc-badge-pulse 2s infinite;
}

.mpc-chatbot-badge.mpc-hidden {
  display: none;
}

@keyframes mpc-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Chat Window */
.mpc-chatbot-window {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(10, 22, 40, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: mpc-chat-slide-up 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mpc-chatbot-window.mpc-open {
  display: flex;
}

@keyframes mpc-chat-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

/* Header */
.mpc-chatbot-header {
  background: linear-gradient(135deg, #0A1628, #0D3B7A);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(30, 136, 229, 0.2);
}

.mpc-chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mpc-chatbot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E88E5, #4FC3F7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mpc-chatbot-avatar svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

.mpc-chatbot-header h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mpc-chatbot-status {
  font-size: 0.72rem;
  color: rgba(200, 220, 240, 0.7);
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mpc-status-dot {
  width: 6px;
  height: 6px;
  background: #34D399;
  border-radius: 50%;
  animation: mpc-pulse-dot 2s infinite;
}

@keyframes mpc-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.mpc-chatbot-minimize {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(200, 220, 240, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mpc-chatbot-minimize:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mpc-chatbot-minimize svg {
  width: 18px;
  height: 18px;
}

/* Messages */
.mpc-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #F4F6F9;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mpc-chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.mpc-chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.mpc-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(107, 122, 141, 0.3);
  border-radius: 3px;
}

.mpc-chat-message {
  display: flex;
  gap: 10px;
  animation: mpc-message-slide 0.3s ease-out;
}

@keyframes mpc-message-slide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.mpc-chat-message.mpc-user {
  flex-direction: row-reverse;
}

.mpc-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mpc-chat-message.mpc-bot .mpc-message-avatar {
  background: linear-gradient(135deg, #1E88E5, #4FC3F7);
}

.mpc-chat-message.mpc-user .mpc-message-avatar {
  background: linear-gradient(135deg, #6B7A8D, #8B9AAD);
}

.mpc-message-avatar svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
}

.mpc-message-content {
  max-width: 75%;
  background: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mpc-chat-message.mpc-user .mpc-message-content {
  background: linear-gradient(135deg, #1565C0, #1E88E5);
  color: #fff;
}

.mpc-message-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  color: inherit;
}

.mpc-chat-message.mpc-user .mpc-message-content p {
  color: #fff;
}

.mpc-message-time {
  font-size: 0.68rem;
  color: rgba(107, 122, 141, 0.6);
  margin-top: 6px !important;
}

.mpc-chat-message.mpc-user .mpc-message-time {
  color: rgba(255, 255, 255, 0.7) !important;
}

.mpc-help-list {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mpc-help-list li {
  font-size: 0.82rem;
  color: #6B7A8D;
  padding-left: 18px;
  position: relative;
}

.mpc-help-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #1E88E5;
  font-weight: 700;
}

/* Quick Actions */
.mpc-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  animation: mpc-message-slide 0.4s ease-out;
}

.mpc-quick-actions-label {
  width: 100%;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6B7A8D;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mpc-quick-btn {
  background: #fff;
  border: 1.5px solid #DDE3EC;
  color: #1A2332;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Barlow', sans-serif;
}

.mpc-quick-btn:hover {
  background: #1E88E5;
  border-color: #1E88E5;
  color: #fff;
  transform: translateY(-1px);
}

/* Typing Indicator */
.mpc-typing-indicator {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 20px 16px;
  animation: mpc-message-slide 0.3s ease-out;
}

.mpc-typing-indicator.mpc-show {
  display: flex;
}

.mpc-typing-dots {
  background: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mpc-typing-dots span {
  width: 6px;
  height: 6px;
  background: #6B7A8D;
  border-radius: 50%;
  animation: mpc-typing 1.4s infinite;
}

.mpc-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.mpc-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes mpc-typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* Input Area */
.mpc-chatbot-input {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border-top: 1px solid #DDE3EC;
}

.mpc-chatbot-input input {
  flex: 1;
  border: 1.5px solid #DDE3EC;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #1A2332;
  background: #F4F6F9;
  outline: none;
  transition: all 0.2s;
  font-family: 'Barlow', sans-serif;
}

.mpc-chatbot-input input:focus {
  border-color: #1E88E5;
  background: #fff;
}

.mpc-chatbot-input button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1565C0, #1E88E5);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.mpc-chatbot-input button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
}

.mpc-chatbot-input button svg {
  width: 18px;
  height: 18px;
}

/* Action Buttons */
.mpc-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.mpc-action-btn {
  background: linear-gradient(135deg, #E65100, #FF6D00);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: 'Barlow', sans-serif;
}

.mpc-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 81, 0, 0.4);
}

.mpc-action-btn.mpc-secondary {
  background: transparent;
  border: 1.5px solid #1E88E5;
  color: #1565C0;
}

.mpc-action-btn.mpc-secondary:hover {
  background: #1E88E5;
  color: #fff;
}

/* Plan Cards */
.mpc-plan-card {
  background: #fff;
  border: 1.5px solid #DDE3EC;
  border-radius: 10px;
  padding: 14px;
  margin-top: 8px;
  transition: all 0.2s;
}

.mpc-plan-card:hover {
  border-color: #1E88E5;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.15);
}

.mpc-plan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mpc-plan-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #1565C0;
  text-transform: uppercase;
}

.mpc-plan-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #E65100;
}

.mpc-plan-details {
  font-size: 0.78rem;
  color: #6B7A8D;
  line-height: 1.5;
}

/* Position Options - You can change these values */

/* OPTION 1: Top Right (Default - change bottom to top) */
/*
.mpc-chatbot-container {
  top: 100px;
  right: 28px;
  bottom: auto;
}
*/

/* OPTION 2: Bottom Left */
/*
.mpc-chatbot-container {
  bottom: 100px;
  left: 28px;
  right: auto;
}
*/

/* OPTION 3: Top Left */
/*
.mpc-chatbot-container {
  top: 100px;
  left: 28px;
  right: auto;
  bottom: auto;
}
*/

/* OPTION 4: Bottom Right (Current Default) */
/* Already set above */

/* Mobile Responsive */
@media (max-width: 480px) {
  .mpc-chatbot-container {
    right: 20px;
    bottom: 90px; /* Above feedback button on mobile */
  }
  
  .mpc-chatbot-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 100px);
    right: -20px;
  }
  
  .mpc-chatbot-toggle {
    width: 52px;
    height: 52px;
  }
  
  .mpc-message-content {
    max-width: 80%;
  }
}

/* Ensure chatbot doesn't interfere with other elements */
.mpc-chatbot-container * {
  box-sizing: border-box;
}