/*!***************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/FloatingIcon.css ***!
  \***************************************************************************************************************/
/**
 * FloatingIcon Component Styles
 * 
 * Styles for the floating chatbot icon including:
 * - Positioning for all four corners
 * - Pulse animation with 4-second interval
 * - Circular format with proper dimensions
 * - Hover and focus states for accessibility
 * 
 * Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
 */

.floating-icon {
  /* Base positioning */
  position: fixed;
  z-index: var(--mc-z-floating-icon);
  
  /* Dimensions - between 48-56px as specified */
  width: var(--mc-icon-size, 56px);
  height: var(--mc-icon-size, 56px);
  
  /* Circular shape */
  border-radius: var(--mc-radius-full);
  
  /* Non-transparent background as required */
  background: var(--mc-bg-light);
  
  /* Visual styling */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  
  /* Interaction */
  cursor: pointer;

  /* Pulse animation - 4 second interval */
  animation: floating-icon-pulse 4s ease-in-out infinite;
  
  /* Smooth transitions */
  transition: transform var(--mc-transition-fast), 
              box-shadow var(--mc-transition-fast);
  
  /* Ensure content is centered */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ========================================
   Position Variants
   ======================================== */

.floating-icon--bottom-right {
  bottom: 20px;
  right: 20px;
}

.floating-icon--bottom-left {
  bottom: 20px;
  left: 20px;
}

.floating-icon--top-right {
  top: 20px;
  right: 20px;
}

.floating-icon--top-left {
  top: 20px;
  left: 20px;
}

/* ========================================
   Pulse Animation
   ======================================== */

/*@keyframes floating-icon-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }
}*/
@keyframes floating-icon-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    /* Moves the button up slightly instead of scaling it */
    transform: translateY(-6px);
  }
}

/* ========================================
   Hover and Focus States
   ======================================== */

/*.floating-icon:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation-play-state: paused;
}*/

.floating-icon:hover {
  /* Combine the bounce position with a slight scale up */
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation-play-state: paused;
}

.floating-icon:focus {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
  /* Pause animation on focus for accessibility */
  animation-play-state: paused;
}

.floating-icon:focus:not(:focus-visible) {
  outline: none;
}

.floating-icon:active {
  transform: scale(0.95);
}

/* ========================================
   Image Styling
   ======================================== */

/*.floating-icon__image {
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.floating-icon__image {
  width: 60%; 
  height: 60%;
  user-select: none;
  pointer-events: none;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}*/
.floating-icon__image {
  /* Keep your sizing */
  width: 80% !important; 
  height: 80% !important;
  
  /* RELIABILITY FIXES */
  display: block !important;    /* Ensures it occupies space */
  overflow: visible !important;  /* Prevents the logo from being clipped */
  opacity: 1 !important;        /* Just in case a parent is hiding it */
  visibility: visible !important;
  
  /* Reset background stuff */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;

  /* Re-enable interaction just to test if it's a rendering bug */
  pointer-events: auto; 
  
  /* Your shadow */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
  .floating-icon {
    /* Slightly smaller on mobile to save screen space */
    width: 48px;
    height: 48px;
  }
  
  /* Adjust positioning for mobile */
  .floating-icon--bottom-right,
  .floating-icon--bottom-left {
    bottom: 16px;
  }
  
  .floating-icon--bottom-right,
  .floating-icon--top-right {
    right: 16px;
  }
  
  .floating-icon--bottom-left,
  .floating-icon--top-left {
    left: 16px;
  }
  
  .floating-icon--top-right,
  .floating-icon--top-left {
    top: 16px;
  }
}

/* ========================================
   Accessibility - Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .floating-icon {
    animation: none;
  }
  
  .floating-icon:hover,
  .floating-icon:focus {
    animation: none;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .floating-icon {
    display: none;
  }
}

/*!********************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/Modal.css ***!
  \********************************************************************************************************/
/**
 * Modal Component Styles
 * 
 * Implements responsive modal layout with:
 * - Desktop: One-third width, resizable, side-by-side children
 * - Mobile: Full screen, stacked children
 * - Click-outside-does-not-close behavior
 * - MachiningCloud theme colors
 */

/* ========================================
   Modal Overlay
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--mc-z-modal-overlay);
  /* Pointer events none on overlay to allow page interaction */
  /* Only the modal container itself captures events */
  pointer-events: none;
}

/* ========================================
   Modal Container Base
   ======================================== */

.modal-container {
  position: fixed;
  background: var(--mc-bg-light);
  color: var(--mc-text-primary);
  font-family: var(--mc-font-family);
  display: flex;
  flex-direction: column;
  /* Enable pointer events on the modal itself */
  pointer-events: auto;
  box-shadow: var(--mc-shadow-xl);
}

/* ========================================
   Desktop Layout
   ======================================== */

.modal-container.desktop {
  /* Positioning: bottom-right corner */
  bottom: 90px;
  right: 20px;
  
  /* Sizing: one-third width (60vw as per design) */
  width: var(--mc-modal-width-desktop);
  min-width: var(--mc-modal-min-width);
  max-width: var(--mc-modal-max-width);
  
  height: var(--mc-modal-height-desktop);
  min-height: var(--mc-modal-min-height);
  
  /* Rounded corners for desktop */
  border-radius: var(--mc-radius-xl);
  
  /* Enable resizing */
  resize: both;
  overflow: hidden;
}

/* ========================================
   Mobile Layout
   ======================================== */

.modal-container.mobile {
  /* Full screen on mobile */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  
  /* No rounded corners on mobile */
  border-radius: 0;
  
  /* No resizing on mobile */
  resize: none;
}

/* ========================================
   Close Button
   ======================================== */

.close-button {
  position: absolute;
  top: var(--mc-spacing-md);
  right: var(--mc-spacing-md);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  color: var(--mc-text-muted);
  transition: color var(--mc-transition-fast), transform var(--mc-transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--mc-radius-sm);
  padding: 0;
}

.close-button:hover {
  color: var(--mc-accent-blue);
  background: rgba(255, 133, 35, 0.1);
  transform: scale(1.1);
}

.close-button:focus {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
}

.close-button:active {
  transform: scale(0.95);
}

/* ========================================
   Modal Content Area
   ======================================== */

.modal-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  /* Padding to account for close button */
  padding-top: 48px;
}

/* Desktop: side-by-side layout (row) */
.modal-container.desktop .modal-content {
  flex-direction: row;
}

/* Mobile: stacked layout (column) */
.modal-container.mobile .modal-content {
  flex-direction: column;
}

/* ========================================
   Resize Handle (Desktop Only)
   ======================================== */

.resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 11;
}

/* Visual indicator for resize handle */
.resize-handle::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--mc-text-muted);
  border-bottom: 2px solid var(--mc-text-muted);
  opacity: 0.5;
  transition: opacity var(--mc-transition-fast);
}

.resize-handle:hover::after {
  opacity: 1;
  border-color: var(--mc-accent-blue);
}

/* ========================================
   Responsive Breakpoint Adjustments
   ======================================== */

/* Tablet size adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  .modal-container.desktop {
    width: 70vw;
    min-width: 600px;
  }
}

/* Small desktop adjustments */
@media (max-width: 1280px) and (min-width: 1025px) {
  .modal-container.desktop {
    width: 65vw;
  }
}

/* Handle very small mobile screens */
@media (max-width: 480px) {
  .close-button {
    top: var(--mc-spacing-sm);
    right: var(--mc-spacing-sm);
  }
  
  .modal-content {
    padding-top: 40px;
  }
}

/* ========================================
   Animation
   ======================================== */

.modal-container {
  animation: modalSlideIn var(--mc-transition-slow) ease-out;
}

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

/* ========================================
   Accessibility
   ======================================== */

/* Focus visible for keyboard navigation */
.modal-container:focus {
  outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .modal-container {
    border: 2px solid currentColor;
  }
  
  .close-button {
    border: 1px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .modal-container {
    animation: none;
  }
  
  .close-button {
    transition: none;
  }
  
  .resize-handle::after {
    transition: none;
  }
}

/*!**************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/ChatSidebar.css ***!
  \**************************************************************************************************************/
/**
 * ChatSidebar Component Styles
 * 
 * Styles for the chat history sidebar component with responsive layout:
 * - Desktop: Fixed sidebar on left (30% width)
 * - Mobile: Collapsible header at top
 * 
 * Uses MachiningCloud theme colors and design tokens from variables.css
 */

/* ========================================
   Desktop Layout - Fixed Sidebar
   ======================================== */

.chat-sidebar.desktop {
  width: var(--mc-sidebar-width);
  min-width: var(--mc-sidebar-min-width);
  max-width: var(--mc-sidebar-max-width);
  border-right: 1px solid var(--mc-secondary);
  display: flex;
  flex-direction: column;
  background: var(--mc-bg-light);
  height: 100%;
  overflow: hidden;
}

.chat-sidebar.desktop .sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ========================================
   Mobile Layout - Collapsible Header
   ======================================== */

.chat-sidebar.mobile {
  width: 100%;
  border-bottom: 1px solid var(--mc-secondary);
  background: var(--mc-bg-light);
  flex-shrink: 0;
}

.sidebar-header-mobile {
  display: flex;
  align-items: center;
  padding: var(--mc-spacing-md);
  cursor: pointer;
  background: var(--mc-bg-secondary);
  border-bottom: 1px solid var(--mc-secondary);
  transition: background var(--mc-transition-fast);
  user-select: none;
}

.sidebar-header-mobile:hover {
  background: var(--mc-accent-yellow-light);
}

.sidebar-header-mobile .menu-icon {
  font-size: 20px;
  margin-right: var(--mc-spacing-sm);
  color: var(--mc-text-primary);
  font-weight: var(--mc-font-weight-bold);
}

.sidebar-header-mobile .header-text {
  flex: 1;
  font-weight: var(--mc-font-weight-medium);
  color: var(--mc-text-primary);
  font-size: var(--mc-font-size-base);
}

.sidebar-header-mobile .expand-icon {
  color: var(--mc-accent-blue);
  font-size: 14px;
  transition: transform var(--mc-transition-normal);
  display: inline-block;
}

/* Rotate expand icon when expanded */
.chat-sidebar.mobile.expanded .sidebar-header-mobile .expand-icon {
  transform: rotate(180deg);
}

.chat-sidebar.mobile .sidebar-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--mc-transition-slow) ease-in-out, opacity var(--mc-transition-normal);
  opacity: 0;
}

.chat-sidebar.mobile.expanded .sidebar-content {
  max-height: 60vh;
  overflow-y: auto;
  opacity: 1;
}

.chat-sidebar.mobile .sidebar-content.collapsed {
  display: none;
}

/* ========================================
   Header (Desktop Only)
   ======================================== */

.chat-sidebar .header {
  padding: var(--mc-spacing-lg);
  border-bottom: 1px solid var(--mc-secondary);
  background: var(--mc-bg-light);
  flex-shrink: 0;
}

.chat-sidebar .header h2 {
  margin: 0;
  color: var(--mc-text-primary);
  font-size: var(--mc-font-size-large);
  font-weight: var(--mc-font-weight-medium);
  font-family: var(--mc-font-family);
}

/* ========================================
   New Chat Button
   ======================================== */

.new-chat-button {
  margin: var(--mc-spacing-md);
  background: var(--mc-accent-blue);
  color: var(--mc-white);
  border: none;
  padding: var(--mc-spacing-md) var(--mc-spacing-xl);
  border-radius: var(--mc-radius-lg);
  font-family: var(--mc-font-family);
  font-size: var(--mc-font-size-base);
  font-weight: var(--mc-font-weight-medium);
  cursor: pointer;
  transition: background var(--mc-transition-normal), transform var(--mc-transition-fast);
  flex-shrink: 0;
  width: calc(100% - 2 * var(--mc-spacing-md));
}

.new-chat-button:hover {
  background: var(--mc-accent-blue-hover);
  transform: translateY(-1px);
}

.new-chat-button:active {
  transform: translateY(0);
}

.new-chat-button:focus {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
}

/* ========================================
   Sessions List
   ======================================== */

.sessions-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--mc-spacing-sm) var(--mc-spacing-md);
  min-height: 0; /* Allow flex shrinking */
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--mc-spacing-xl);
  color: var(--mc-text-muted);
}

.empty-state p {
  margin: 0;
  font-size: var(--mc-font-size-base);
}

.empty-state-hint {
  margin-top: var(--mc-spacing-sm);
  font-size: var(--mc-font-size-small);
}

/* Session item */
.session-item {
  background: var(--mc-accent-yellow);
  border-left: 3px solid var(--mc-accent-yellow-light);
  padding: var(--mc-spacing-md);
  margin: var(--mc-spacing-sm) 0;
  border-radius: var(--mc-radius-md);
  cursor: pointer;
  transition: background var(--mc-transition-normal), border-color var(--mc-transition-fast), transform var(--mc-transition-fast);
  user-select: none;
}

.session-item:hover {
  background: rgba(255, 222, 115, 0.3);
  transform: translateX(2px);
}

.session-item:active {
  transform: translateX(0);
}

.session-item.active {
  background: var(--mc-accent-blue-light);
  border-left-color: var(--mc-accent-blue);
}

.session-item:focus {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
}

.session-title {
  color: var(--mc-text-primary);
  font-weight: var(--mc-font-weight-medium);
  font-size: var(--mc-font-size-base);
  margin-bottom: var(--mc-spacing-xs);
  font-family: var(--mc-font-family);
  line-height: var(--mc-line-height-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-date {
  color: var(--mc-text-muted);
  font-size: var(--mc-font-size-small);
  font-family: var(--mc-font-family);
}

/* Loading indicator */
.loading-indicator {
  text-align: center;
  padding: var(--mc-spacing-md);
  color: var(--mc-text-muted);
  font-size: var(--mc-font-size-small);
  font-family: var(--mc-font-family);
}

/* ========================================
   Load More Button
   ======================================== */

.load-more-button {
  margin: var(--mc-spacing-md);
  background: transparent;
  color: var(--mc-accent-blue);
  border: 1px solid var(--mc-accent-blue);
  padding: var(--mc-spacing-sm) var(--mc-spacing-lg);
  border-radius: var(--mc-radius-md);
  cursor: pointer;
  font-family: var(--mc-font-family);
  font-size: var(--mc-font-size-base);
  font-weight: var(--mc-font-weight-medium);
  transition: background var(--mc-transition-normal), transform var(--mc-transition-fast);
  flex-shrink: 0;
  width: calc(100% - 2 * var(--mc-spacing-md));
}

.load-more-button:hover {
  background: var(--mc-accent-blue-light);
  transform: translateY(-1px);
}

.load-more-button:active {
  transform: translateY(0);
}

.load-more-button:focus {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
}

.load-more-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
  .chat-sidebar.mobile .sidebar-content {
    padding-bottom: var(--mc-spacing-md);
  }

  .session-item {
    padding: var(--mc-spacing-sm) var(--mc-spacing-md);
  }

  .new-chat-button,
  .load-more-button {
    padding: var(--mc-spacing-sm) var(--mc-spacing-md);
  }
}

/* ========================================
   Accessibility
   ======================================== */

/* Keyboard focus styles */
.session-item:focus-visible,
.new-chat-button:focus-visible,
.load-more-button:focus-visible {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .session-item,
  .new-chat-button,
  .load-more-button,
  .sidebar-header-mobile,
  .chat-sidebar.mobile .sidebar-content {
    transition: none;
  }
}

/*!***********************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/ChatArea.css ***!
  \***********************************************************************************************************/
/**
 * ChatArea Component Styles
 * 
 * Styles for the chat conversation area with message display and input:
 * - Desktop: Right side, 70-75% width
 * - Mobile: Full width below collapsible header
 * 
 * Uses MachiningCloud theme colors and design tokens from variables.css
 */

/* ========================================
   Desktop Layout - Right Side
   ======================================== */

.chat-area.desktop {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--mc-bg-light);
  min-width: 0; /* Allow flex shrinking */
  height: 100%;
  overflow: hidden;
}

/* ========================================
   Mobile Layout - Full Width
   ======================================== */

.chat-area.mobile {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--mc-bg-light);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ========================================
   Empty State
   ======================================== */

.chat-area.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  text-align: center;
  padding: var(--mc-spacing-xxl);
  color: var(--mc-text-muted);
  max-width: 400px;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: var(--mc-spacing-lg);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--mc-font-size-large);
  font-weight: var(--mc-font-weight-medium);
  color: var(--mc-text-primary);
  margin-bottom: var(--mc-spacing-sm);
  font-family: var(--mc-font-family);
}

.empty-state-hint {
  font-size: var(--mc-font-size-base);
  color: var(--mc-text-muted);
  font-family: var(--mc-font-family);
  line-height: var(--mc-line-height-base);
}

/* ========================================
   Header (Desktop Only)
   ======================================== */

.chat-area-header {
  padding: var(--mc-spacing-lg);
  border-bottom: 1px solid var(--mc-secondary);
  background: var(--mc-bg-secondary);
  flex-shrink: 0;
}

.chat-area-header h3 {
  margin: 0;
  color: var(--mc-text-primary);
  font-size: var(--mc-font-size-large);
  font-weight: var(--mc-font-weight-medium);
  font-family: var(--mc-font-family);
}
.chat-area-header h4 {
  margin: 0;
  color: var(--mc-text-primary);
  font-size: var(--mc-font-size-large);
  font-weight: var(--mc-font-weight-medium);
  font-family: var(--mc-font-family);
  font-style: italic;
}

/* ========================================
   Messages Container
   ======================================== */

.messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--mc-spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--mc-spacing-md);
  background: var(--mc-bg-light);
  min-height: 0; /* Allow flex shrinking */
}

/* ========================================
   Message Bubbles
   ======================================== */

.message-bubble {
  display: flex;
  gap: var(--mc-spacing-sm);
  align-items: flex-start;
  animation: messageSlideIn 0.2s ease-out;
}

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

/* User messages - align right */
.message-bubble.user {
  flex-direction: row-reverse;
}

/* Assistant messages - align left */
.message-bubble.assistant {
  flex-direction: row;
}

/* Message avatar */
.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--mc-radius-full);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--mc-secondary);
}

/* Message content wrapper */
.message-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--mc-spacing-xs);
  max-width: 70%;
  min-width: 100px;
}

.message-bubble.user .message-content-wrapper {
  align-items: flex-end;
}

.message-bubble.assistant .message-content-wrapper {
  align-items: flex-start;
}

/* Message content */
.message-content {
  background: var(--mc-bg-secondary);
  padding: var(--mc-spacing-md);
  border-radius: var(--mc-radius-lg);
  color: var(--mc-text-primary);
  font-size: var(--mc-font-size-base);
  font-family: var(--mc-font-family);
  line-height: var(--mc-line-height-base);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.message-bubble.user .message-content {
  background: var(--mc-accent-blue);
  color: var(--mc-white);
}

.message-bubble.assistant .message-content {
  background: var(--mc-bg-light);
  border: 1px solid var(--mc-bg-secondary);
}

/* Message timestamp */
.message-timestamp {
  font-size: var(--mc-font-size-small);
  color: var(--mc-text-muted);
  font-family: var(--mc-font-family);
  padding: 0 var(--mc-spacing-xs);
}

/* ========================================
   Typing Indicator
   ======================================== */

.message-bubble.typing .message-content-wrapper {
  min-width: auto;
}

.typing-indicator {
  display: flex;
  gap: var(--mc-spacing-xs);
  padding: var(--mc-spacing-md);
  background: var(--mc-accent-yellow-light);
  border: 1px solid var(--mc-accent-yellow);
  border-radius: var(--mc-radius-lg);
  align-items: center;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--mc-radius-full);
  background: var(--mc-accent-blue);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* ========================================
   Input Container
   ======================================== */

.input-container {
  background: var(--mc-bg-secondary);
  border-top: 1px solid var(--mc-secondary);
  padding: var(--mc-spacing-md);
  display: flex;
  gap: var(--mc-spacing-sm);
  align-items: flex-end;
  flex-shrink: 0;
}

/* Message input textarea */
.message-input {
  flex: 1;
  background: #FFFFFF;
  color: var(--mc-text-primary);
  border: 1px solid var(--mc-secondary);
  border-radius: var(--mc-radius-md);
  padding: var(--mc-spacing-md);
  font-family: var(--mc-font-family);
  font-size: var(--mc-font-size-base);
  line-height: var(--mc-line-height-base);
  resize: none;
  transition: border-color var(--mc-transition-fast), box-shadow var(--mc-transition-fast);
  min-height: 44px;
  max-height: 120px;
  overflow-y: auto;
}

.message-input:focus {
  outline: none;
  border-color: var(--mc-accent-blue);
  box-shadow: 0 0 0 2px var(--mc-accent-blue-light);
}

.message-input::placeholder {
  color: var(--mc-text-muted);
}

/* Send button */
.send-button {
  background: var(--mc-accent-blue);
  color: #FFFFFF;
  border: none;
  padding: var(--mc-spacing-md) var(--mc-spacing-xl);
  border-radius: var(--mc-radius-md);
  cursor: pointer;
  font-family: var(--mc-font-family);
  font-size: var(--mc-font-size-base);
  font-weight: var(--mc-font-weight-medium);
  transition: background var(--mc-transition-normal), transform var(--mc-transition-fast);
  white-space: nowrap;
  min-height: 44px;
  flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
  background: var(--mc-accent-blue-hover);
  transform: translateY(-1px);
}

.send-button:active:not(:disabled) {
  transform: translateY(0);
}

.send-button:disabled {
  background: var(--mc-text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.send-button:focus {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
  .message-content-wrapper {
    max-width: 80%;
  }

  .input-container {
    padding: var(--mc-spacing-sm);
  }

  .message-input {
    padding: var(--mc-spacing-sm) var(--mc-spacing-md);
    font-size: var(--mc-font-size-small);
  }

  .send-button {
    padding: var(--mc-spacing-sm) var(--mc-spacing-lg);
    font-size: var(--mc-font-size-small);
  }

  .message-avatar {
    width: 32px;
    height: 32px;
  }
}

/* ========================================
   Accessibility
   ======================================== */

/* Keyboard focus styles */
.send-button:focus-visible {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
}

.message-input:focus-visible {
  outline: none;
  border-color: var(--mc-accent-blue);
  box-shadow: 0 0 0 2px var(--mc-accent-blue-light);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .message-bubble,
  .typing-dot,
  .send-button {
    animation: none;
    transition: none;
  }
}

/*!********************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/styles/variables.css ***!
  \********************************************************************************************************/
/**
 * Root CSS Variables for MachiningCloud Chatbot Widget
 * 
 * This file defines all theme colors, typography, spacing, and other design tokens
 * for the chatbot widget. Using CSS custom properties allows for easy theme
 * customization and potential dark mode support in the future.
 */

:root {
  /* ========================================
     Colors - MachiningCloud Theme
     ======================================== */
  
  /* Background Colors */
  --mc-bg-light: #FFFFFF;
  --mc-bg-secondary: #F5F5F5;
  --mc-white: #FFFFFF;
  
  /* Text Colors */
  --mc-text-dark: #252422;
  --mc-text-primary: #252422;
  --mc-text-muted: #807E7C;
  
  /* Accent Colors */
  --mc-accent-yellow: #F5F5F5;
  --mc-accent-yellow-light: #FFFFFF;
  --mc-accent-yellow-hover: rgba(0, 0, 0, 0.05);
  --mc-accent-orange: #FF8523;
  --mc-accent-orange-hover: #E67520;
  --mc-accent-orange-dark: #CC6A1D;
  --mc-accent-blue: #00539B;
  --mc-accent-blue-hover: #004180;
  --mc-accent-blue-light: rgba(0, 83, 155, 0.2);
  --mc-secondary: #e7e7e5;
  /*  --mc-secondary: #E6E3D6; */
  --mc-accent-blue-dark: #001a9b;
  
  /* ========================================
     Typography
     ======================================== */
  
  --mc-font-family: 'Rubik', sans-serif;
  --mc-font-size-base: 16px;
  --mc-font-size-small: 14px;
  --mc-font-size-large: 18px;
  --mc-font-size-xlarge: 20px;
  
  --mc-font-weight-normal: 400;
  --mc-font-weight-medium: 500;
  --mc-font-weight-bold: 700;
  
  --mc-line-height-base: 1.5;
  --mc-line-height-tight: 1.25;
  
  /* ========================================
     Spacing
     ======================================== */
  
  --mc-spacing-xs: 4px;
  --mc-spacing-sm: 8px;
  --mc-spacing-md: 12px;
  --mc-spacing-lg: 16px;
  --mc-spacing-xl: 24px;
  --mc-spacing-xxl: 32px;
  
  /* ========================================
     Border Radius
     ======================================== */
  
  --mc-radius-sm: 4px;
  --mc-radius-md: 6px;
  --mc-radius-lg: 8px;
  --mc-radius-xl: 12px;
  --mc-radius-full: 50%;
  
  /* ========================================
     Shadows
     ======================================== */
  
  --mc-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --mc-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --mc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --mc-shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.25);
  
  /* ========================================
     Transitions
     ======================================== */
  
  --mc-transition-fast: 0.15s ease;
  --mc-transition-normal: 0.2s ease;
  --mc-transition-slow: 0.3s ease;
  
  /* ========================================
     Z-Index Layers
     ======================================== */
  
  --mc-z-base: 1;
  --mc-z-dropdown: 100;
  --mc-z-modal: 1000;
  --mc-z-floating-icon: 9999;
  --mc-z-modal-overlay: 10000;
  
  /* ========================================
     Layout
     ======================================== */
  
  --mc-modal-width-desktop: 60vw;
  --mc-modal-min-width: 700px;
  --mc-modal-max-width: 1200px;
  --mc-modal-height-desktop: 70vh;
  --mc-modal-min-height: 500px;
  
  --mc-sidebar-width: 30%;
  --mc-sidebar-min-width: 250px;
  --mc-sidebar-max-width: 350px;
  
  --mc-icon-size: 60px;
  --mc-icon-size-min: 48px;
  --mc-icon-size-max: 56px;
  
  /* ========================================
     Breakpoints (for reference in JS)
     ======================================== */
  
  --mc-breakpoint-mobile: 768px;
  --mc-breakpoint-tablet: 1024px;
  --mc-breakpoint-desktop: 1280px;
}

/* ========================================
   Global Reset and Base Styles
   ======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ========================================
   Utility Classes
   ======================================== */

.mc-hidden {
  display: none !important;
}

.mc-visible {
  display: block !important;
}

.mc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================
   Scrollbar Styling (Webkit browsers)
   ======================================== */

.mc-scrollable::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.mc-scrollable::-webkit-scrollbar-track {
  background: var(--mc-bg-secondary);
  border-radius: var(--mc-radius-sm);
}

.mc-scrollable::-webkit-scrollbar-thumb {
  background: var(--mc-text-muted);
  border-radius: var(--mc-radius-sm);
  transition: background var(--mc-transition-fast);
}

.mc-scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--mc-accent-blue);
}

/* Firefox scrollbar styling */
.mc-scrollable {
  scrollbar-width: thin;
  scrollbar-color: var(--mc-text-muted) var(--mc-bg-secondary);
}

/*!****************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/MessageBubble.css ***!
  \****************************************************************************************************************/
/**
 * MessageBubble Component Styles
 * 
 * Styles for individual chat message bubbles with role-based theming.
 * User messages are right-aligned with orange accent.
 * Assistant messages are left-aligned with yellow accent.
 * 
 * Requirements: 5.3, 5.4, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7
 */

.message-bubble {
  display: flex;
  gap: var(--mc-spacing-md);
  margin-bottom: var(--mc-spacing-md);
  max-width: 85%;
  animation: fadeIn 0.2s ease-in;
}

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

/* User messages: right-aligned with orange accent */
.message-bubble.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  margin-left: auto;
}

/* Assistant messages: left-aligned with yellow accent */
.message-bubble.assistant {
  align-self: flex-start;
  flex-direction: row;
  margin-right: auto;
}

/* Avatar styling */
.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--mc-radius-full);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--mc-secondary);
  background: var(--mc-bg-light);
}

.message-bubble.user .message-avatar {
  border-color: var(--mc-accent-blue);
}

.message-bubble.assistant .message-avatar {
  border-color: var(--mc-accent-yellow);
}

/* Content wrapper */
.message-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--mc-spacing-xs);
  min-width: 0; /* Allow text wrapping */
}

/* Message content bubble */
.message-content {
  padding: var(--mc-spacing-md) var(--mc-spacing-lg);
  border-radius: var(--mc-radius-lg);
  font-family: var(--mc-font-family);
  font-size: var(--mc-font-size-base);
  line-height: var(--mc-line-height-base);
  color: var(--mc-text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

/* User message bubble styling */
.message-bubble.user .message-content {
  background: linear-gradient(135deg, var(--mc-accent-blue) 0%, var(--mc-accent-blue-hover) 100%);
  color: #FFFFFF;
  border-bottom-right-radius: var(--mc-radius-sm);
  box-shadow: var(--mc-shadow-sm);
}

/* Assistant message bubble styling */
.message-bubble.assistant .message-content {
  background: linear-gradient(135deg, var(--mc-accent-yellow) 0%, var(--mc-accent-yellow-light) 100%);
  color: var(--mc-text-primary);
  border-bottom-left-radius: var(--mc-radius-sm);
  box-shadow: var(--mc-shadow-sm);
}

/* Timestamp styling */
.message-timestamp {
  font-size: var(--mc-font-size-small);
  color: var(--mc-text-muted);
  font-family: var(--mc-font-family);
  padding: 0 var(--mc-spacing-sm);
}

.message-bubble.user .message-timestamp {
  text-align: right;
}

.message-bubble.assistant .message-timestamp {
  text-align: left;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .message-bubble {
    max-width: 90%;
  }
  
  .message-avatar {
    width: 32px;
    height: 32px;
  }
  
  .message-content {
    padding: var(--mc-spacing-sm) var(--mc-spacing-md);
    font-size: var(--mc-font-size-small);
  }
  
  .message-timestamp {
    font-size: 12px;
  }
}

/* Hover effects for better interactivity */
.message-bubble:hover .message-content {
  box-shadow: var(--mc-shadow-md);
  transition: box-shadow var(--mc-transition-fast);
}

/* Accessibility: Focus styles for keyboard navigation */
.message-bubble:focus-within {
  outline: 2px solid var(--mc-accent-blue);
  outline-offset: 2px;
  border-radius: var(--mc-radius-lg);
}

