/* Chat Widget Styles - Compiled from SCSS */
.mph-ai-chat-widget {
  position: fixed;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
.mph-ai-chat-widget.mph-ai-chat-position-bottom-right {
  bottom: 20px;
  right: 20px;
}
.mph-ai-chat-widget.mph-ai-chat-position-bottom-left {
  bottom: 20px;
  left: 20px;
}

.mph-ai-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--mph-ai-chat-primary, #007bff);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mph-ai-chat-text, #ffffff);
}
.mph-ai-chat-toggle:hover {
  background-color: var(--mph-ai-chat-hover, #0056b3);
  color: var(--mph-ai-chat-hover-text, #ffffff);
  transform: scale(1.1);
}
.mph-ai-chat-toggle .mph-ai-chat-close-icon {
  display: none;
}
.mph-ai-chat-toggle.mph-ai-chat-active .mph-ai-chat-chat-icon {
  display: none;
}
.mph-ai-chat-toggle.mph-ai-chat-active .mph-ai-chat-close-icon {
  display: block;
}

.mph-ai-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.mph-ai-chat-window.mph-ai-chat-active {
  display: flex;
}

.mph-ai-chat-widget.mph-ai-chat-position-bottom-left .mph-ai-chat-window {
  right: auto;
  left: 0;
}

.mph-ai-chat-header {
  background-color: var(--mph-ai-chat-header-bg, #007bff);
  color: var(--mph-ai-chat-header-text, #ffffff);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mph-ai-chat-header .mph-ai-chat-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.mph-ai-chat-header .mph-ai-chat-header-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}
.mph-ai-chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: inherit;
}
.mph-ai-chat-header .mph-ai-chat-minimize {
  background: transparent;
  border: none;
  color: var(--mph-ai-chat-header-text, #ffffff);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}
.mph-ai-chat-header .mph-ai-chat-minimize:hover {
  opacity: 0.8;
}

.mph-ai-chat-pre-form {
  flex: 1;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}

.mph-ai-chat-pre-form-content {
  width: 100%;
  max-width: 320px;
}

.mph-ai-chat-pre-form-content h4 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.mph-ai-chat-pre-form-content p {
  margin: 0 0 24px 0;
  color: #6c757d;
  font-size: 14px;
}

.mph-ai-chat-pre-form-content .mph-ai-chat-form-group {
  margin-bottom: 16px;
}

.mph-ai-chat-pre-form-content label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.mph-ai-chat-pre-form-content input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.mph-ai-chat-pre-form-content input:focus {
  border-color: var(--mph-ai-chat-primary, #007bff);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.mph-ai-chat-pre-form-content .mph-ai-chat-btn-start-chat {
  width: 100%;
  padding: 12px;
  background-color: var(--mph-ai-chat-primary, #007bff);
  color: var(--mph-ai-chat-text, #ffffff);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.mph-ai-chat-pre-form-content .mph-ai-chat-btn-start-chat:hover {
  background-color: var(--mph-ai-chat-hover, #0056b3);
  color: var(--mph-ai-chat-hover-text, #ffffff);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mph-ai-chat-suggestions {
  padding: 12px 16px 8px;
  background-color: #ffffff;
  border-top: 1px solid #e1e4e8;
}

.mph-ai-chat-suggestions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mph-ai-chat-toggle-suggestions-btn {
  background: transparent;
  border: 1px solid #e1e4e8;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  color: #6c757d;
}

.mph-ai-chat-toggle-suggestions-btn:hover {
  background-color: #f8f9fa;
  border-color: var(--mph-ai-chat-primary, #007bff);
  color: var(--mph-ai-chat-primary, #007bff);
}

.mph-ai-chat-suggestion-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
}
.mph-ai-chat-suggestion-badges::-webkit-scrollbar {
  width: 6px;
}
.mph-ai-chat-suggestion-badges::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.mph-ai-chat-suggestion-badges::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}
.mph-ai-chat-suggestion-badges::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.mph-ai-chat-suggestion-badge {
  padding: 4px 10px !important;
  background-color: #f8f9fa !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  color: #495057 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.mph-ai-chat-suggestion-badge:hover {
  background-color: var(--mph-ai-chat-primary, #007bff);
  color: var(--mph-ai-chat-text, #ffffff);
  border-color: var(--mph-ai-chat-primary, #007bff);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mph-ai-chat-suggestion-badge-other {
  background-color: #fff3cd;
  border-color: #ffc107;
  color: #856404;
  font-weight: 500;
}

.mph-ai-chat-suggestion-badge-other:hover {
  background-color: #ffc107;
  border-color: #ffc107;
  color: #fff;
}

.mph-ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #f8f9fa;
}

.mph-ai-chat-message {
  display: flex;
  animation: mph-ai-chat-messageSlideIn 0.3s ease;
}
.mph-ai-chat-message .mph-ai-chat-message-content {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 18px;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 14px;
}
.mph-ai-chat-message.mph-ai-chat-user-message {
  justify-content: flex-end;
  flex-direction: column;
  align-items: flex-end;
}
.mph-ai-chat-message.mph-ai-chat-user-message .mph-ai-chat-message-content {
  background-color: var(--mph-ai-chat-primary, #007bff);
  color: var(--mph-ai-chat-text, #ffffff);
  border-bottom-right-radius: 4px;
}
.mph-ai-chat-message.mph-ai-chat-user-message .mph-ai-chat-message-timestamp {
  margin-top: 4px;
  margin-right: 4px;
}
.mph-ai-chat-message.mph-ai-chat-ai-message {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
}
.mph-ai-chat-message.mph-ai-chat-ai-message .mph-ai-chat-message-content {
  background-color: #ffffff;
  color: #333;
  border: 1px solid #e1e4e8;
  border-bottom-left-radius: 4px;
}
.mph-ai-chat-message.mph-ai-chat-ai-message .mph-ai-chat-message-timestamp {
  margin-top: 4px;
  margin-left: 4px;
}
.mph-ai-chat-message .mph-ai-chat-message-timestamp {
  font-size: 11px;
  color: #6c757d;
  opacity: 0.7;
  user-select: none;
}
.mph-ai-chat-message.mph-ai-chat-ai-message .mph-ai-chat-message-content a {
  color: #007bff;
  text-decoration: underline;
  word-break: break-all;
}
.mph-ai-chat-message.mph-ai-chat-ai-message .mph-ai-chat-message-content a:hover {
  color: #0056b3;
}

.mph-ai-chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background-color: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  max-width: 75%;
}
.mph-ai-chat-typing .mph-ai-chat-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #999;
  animation: mph-ai-chat-typingAnimation 1.4s infinite;
}
.mph-ai-chat-typing .mph-ai-chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.mph-ai-chat-typing .mph-ai-chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.mph-ai-chat-form {
  display: flex;
  gap: 8px;
  padding: 16px;
  background-color: #ffffff;
  border-top: 1px solid #e1e4e8;
}

.mph-ai-chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}
.mph-ai-chat-input:focus {
  border-color: var(--mph-ai-chat-primary, #007bff);
}

.mph-ai-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background-color: var(--mph-ai-chat-primary, #007bff);
  color: var(--mph-ai-chat-text, #ffffff);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.mph-ai-chat-send-icon {
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  transform: rotate(0deg);
  font-weight: bold;
  pointer-events: none;
}
.mph-ai-chat-send:hover:not(:disabled) {
  background-color: var(--mph-ai-chat-hover, #0056b3);
  color: var(--mph-ai-chat-hover-text, #ffffff);
  transform: scale(1.1);
}
.mph-ai-chat-send:hover:not(:disabled) .mph-ai-chat-send-icon {
  transform: translateX(2px);
}
.mph-ai-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mph-ai-chat-mode-indicator {
  position: absolute;
  bottom: 70px;
  left: 16px;
  right: 16px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
  animation: mph-ai-chat-fadeInUp 0.3s ease;
}
.mph-ai-chat-mode-indicator .mph-ai-chat-mode-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mph-ai-chat-mode-indicator .mph-ai-chat-mode-text::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.mph-ai-chat-mode-indicator.mph-ai-chat-mode-api .mph-ai-chat-mode-text::before {
  background-color: #28a745;
  animation: mph-ai-chat-pulse 1.5s infinite;
}
.mph-ai-chat-mode-indicator.mph-ai-chat-mode-basic .mph-ai-chat-mode-text::before {
  background-color: #ffc107;
}
.mph-ai-chat-mode-indicator.mph-ai-chat-mode-fallback .mph-ai-chat-mode-text::before {
  background-color: #ff9800;
}

@keyframes mph-ai-chat-messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes mph-ai-chat-typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}
@keyframes mph-ai-chat-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes mph-ai-chat-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@media (max-width: 480px) {
  .mph-ai-chat-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 120px);
    bottom: 80px;
  }
  .mph-ai-chat-widget.mph-ai-chat-position-bottom-left {
    left: 20px;
    right: auto;
  }
}
.mph-ai-chat-messages::-webkit-scrollbar {
  width: 8px;
}

.mph-ai-chat-messages::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 4px;
  margin: 4px 0;
}

.mph-ai-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
  border: 2px solid #e9ecef;
}
.mph-ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

