/* MNM ProLabs Chat Widget Styles - FIXED ICON VERSION */

:root {
  --mnm-primary: #000000;
  --mnm-secondary: #04e804;
  --mnm-accent: #0f3460;
  --mnm-light: #f7f7f8;
  --mnm-white: #ffffff;
  --mnm-text: #1a1a1a;
  --mnm-text-light: #6b7280;
  --mnm-border: #e5e7eb;
  --mnm-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  --mnm-radius: 16px;
}

/* Chat Button */
.mnm-chat-button {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: var(--mnm-secondary) !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(4, 232, 4, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 999999 !important;
  padding: 0 !important;
}

/* Hide chat button when window is open */
.mnm-chat-button.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.mnm-chat-button:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 20px rgba(4, 232, 4, 0.5) !important;
}

.mnm-chat-button:active {
  transform: scale(0.95) !important;
}

.mnm-chat-button svg {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 44px !important;
  height: 44px !important;
}

.mnm-chat-button svg * {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* Chat Window */
.mnm-chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 400px;
  height: 560px;
  background: var(--mnm-white);
  border-radius: var(--mnm-radius);
  box-shadow: var(--mnm-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999998;
  border: 1px solid var(--mnm-border);
  animation: slideUp 0.3s ease-out;
}

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

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

/* Header */
.mnm-chat-header {
  background: var(--mnm-primary);
  color: #ffffff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mnm-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mnm-header-avatar {
  width: 36px;
  height: 36px;
  background: var(--mnm-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mnm-header-avatar svg {
  display: block;
  color: #000000;
  stroke: #000000;
}

.mnm-chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #ffffff !important;
}

.mnm-header-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mnm-chat-close,
.mnm-new-chat {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 6px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mnm-chat-close:hover,
.mnm-new-chat:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.mnm-chat-close svg,
.mnm-new-chat svg {
  display: block;
  color: #ffffff;
  stroke: #ffffff;
}

/* Messages Container */
.mnm-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafafa;
}

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

.mnm-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.mnm-chat-messages::-webkit-scrollbar-thumb {
  background: var(--mnm-border);
  border-radius: 3px;
}

.mnm-chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--mnm-text-light);
}

/* Message Bubbles */
.mnm-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 14px;
  word-wrap: break-word;
}

.mnm-message.user {
  background: var(--mnm-secondary);
  color: #000000;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(4, 232, 4, 0.2);
}

.mnm-message.bot {
  background: var(--mnm-white);
  color: var(--mnm-text);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--mnm-border);
}

/* Bot message wrapper with avatar */
.mnm-bot-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  align-self: flex-start;
  max-width: 90%;
}

.mnm-bot-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--mnm-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mnm-bot-avatar svg {
  display: block;
  color: #000000;
  stroke: #000000;
}

.mnm-bot-wrapper .mnm-message.bot {
  max-width: 100%;
}

.mnm-message.bot p {
  margin: 0 0 8px;
}

.mnm-message.bot p:last-child {
  margin-bottom: 0;
}

.mnm-message.bot a {
  color: var(--mnm-primary);
  text-decoration: underline;
  font-weight: 500;
}

.mnm-message.bot a:hover {
  color: var(--mnm-secondary);
}

.mnm-message.bot strong {
  font-weight: 600;
}

.mnm-message.bot h3,
.mnm-message.bot h4 {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 600;
}

/* Typing Indicator */
.mnm-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--mnm-white);
  border-radius: 16px;
  align-self: flex-start;
  border: 1px solid var(--mnm-border);
  margin-left: 42px;
}

.mnm-typing span {
  width: 8px;
  height: 8px;
  background: var(--mnm-secondary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.mnm-typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.mnm-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

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

/* Product Cards */
.mnm-product-card {
  background: var(--mnm-white);
  border: 1px solid var(--mnm-border);
  border-radius: 14px;
  padding: 14px;
  margin-top: 10px;
  margin-left: 42px;
  display: flex;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.mnm-product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: var(--mnm-secondary);
}

.mnm-product-card img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.mnm-product-info {
  flex: 1;
  min-width: 0;
}

.mnm-product-info h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mnm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mnm-product-info .price {
  font-weight: 700;
  color: var(--mnm-secondary);
  margin-bottom: 10px;
  font-size: 16px;
}

.mnm-add-cart {
  background: var(--mnm-secondary);
  color: #000000;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mnm-add-cart:hover {
  background: #03c903;
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(4, 232, 4, 0.3);
}

.mnm-add-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Input Area */
.mnm-chat-input {
  padding: 16px;
  border-top: 1px solid var(--mnm-border);
  display: flex;
  gap: 10px;
  background: var(--mnm-white);
}

.mnm-chat-input input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--mnm-border);
  border-radius: 24px;
  outline: none;
  font-size: 14px;
  transition: all 0.2s ease;
  background: var(--mnm-light);
}

.mnm-chat-input input:focus {
  border-color: var(--mnm-secondary);
  background: var(--mnm-white);
  box-shadow: 0 0 0 3px rgba(4, 232, 4, 0.15);
}

.mnm-chat-input input::placeholder {
  color: var(--mnm-text-light);
}

#mnm-send {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  border-radius: 50% !important;
  background: var(--mnm-secondary) !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease;
  flex-shrink: 0 !important;
  padding: 0 !important;
}

.mnm-chat-input button:hover {
  transform: scale(1.05);
  background: #03c903 !important;
  box-shadow: 0 2px 8px rgba(4, 232, 4, 0.3);
}

.mnm-chat-input button:active {
  transform: scale(0.95);
}

#mnm-send svg {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 22px !important;
  height: 22px !important;
}

#mnm-send svg * {
  fill: #000000 !important;
  stroke: #000000 !important;
}

/* Support Form */
.mnm-support-form {
  padding: 16px;
  background: var(--mnm-white);
  border-radius: 12px;
  margin-top: 8px;
  margin-left: 42px;
  border: 1px solid var(--mnm-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mnm-support-form h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mnm-text);
}

.mnm-support-form input,
.mnm-support-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--mnm-border);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.mnm-support-form input:focus,
.mnm-support-form textarea:focus {
  outline: none;
  border-color: var(--mnm-secondary);
  box-shadow: 0 0 0 3px rgba(4, 232, 4, 0.15);
}

.mnm-support-form textarea {
  resize: none;
  height: 80px;
}

.mnm-support-form button {
  width: 100%;
  padding: 12px;
  background: var(--mnm-secondary);
  color: #000000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.mnm-support-form button:hover {
  background: #03c903;
  box-shadow: 0 2px 8px rgba(4, 232, 4, 0.3);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .mnm-chat-button {
    bottom: 70px !important;
    right: 16px !important;
    width: 56px !important;
    height: 56px !important;
  }

  .mnm-chat-button svg {
    width: 28px !important;
    height: 28px !important;
  }

  .mnm-chat-window {
    width: calc(100% - 16px) !important;
    height: calc(100% - 160px) !important;
    max-height: none !important;
    bottom: 80px !important;
    right: 8px !important;
    left: 8px !important;
    border-radius: 12px !important;
  }

  .mnm-product-card {
    margin-left: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .mnm-product-card img {
    width: 100%;
    height: auto;
    max-width: 200px;
  }

  .mnm-product-info h4 {
    white-space: normal;
  }

  .mnm-support-form {
    margin-left: 0;
  }

  .mnm-typing {
    margin-left: 0;
  }
}
