/* Agentforce-Style Chatbot CSS - Complete with Maximize/Minimize States */

@import url('https://db.onlinewebfonts.com/c/0fadaa21fcac88ceee0bb8da992c221b?family=Salesforce+Sans');

/* .agentforce-chat-widget #chatWindow .chat-content {
  background: linear-gradient(248.35deg, #c0c0c0 -11.3%, #f5f5f5 16.44%, #fff 28.3%, #fff 72.47%, #f0f0f0 89.69%, #d3d3d3 101.94%) !important;
}

/* Additional override for maximum specificity */
/* #chatWidget .chat-content {
  background: linear-gradient(248.35deg, #c0c0c0 -11.3%, #f5f5f5 16.44%, #fff 28.3%, #fff 72.47%, #f0f0f0 89.69%, #d3d3d3 101.94%) !important;
} */

.refresh-session-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px 28px !important;
    margin: 20px auto !important;
    background: linear-gradient(135deg, #000000 0%, #383838 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: 680px !important;
    min-height: 20px !important;
}

.refresh-session-btn:hover {
    background: rgba(61, 26, 102, 1)!important;
    transform: translateY(-2px) !important;
}

.refresh-session-btn:active {
    transform: translateY(0) !important;
}

/* Base: keep existing look, but allow state rules to win */
.refresh-session-btn{
  box-sizing: border-box !important;
}

/* MINIMIZED chat (small panel) */
#chatWidget[data-state="chat-min"] .refresh-session-btn,
.chat-window.active:not(.maximized) .refresh-session-btn{
  min-width: 0 !important;                  /* stop forcing 680px */
  width: calc(100% - 56px) !important;      /* 28px side padding from .chat-messages */
  margin: 12px 28px !important;             /* align with message gutter */
  padding: 10px 16px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}

/* MAXIMIZED chat (center panel) — keep your big button */
#chatWidget[data-state="chat-max"] .refresh-session-btn,
.chat-window.maximized .refresh-session-btn{
  min-width: 680px !important;
  width: auto !important;
  margin: 20px auto !important;
  padding: 14px 28px !important;
  font-size: 15px !important;
}


/* === CurrentIQ AI disclaimer popover === */
.chat-header { position: relative; } /* anchor for absolute popover */

.ai-disclaimer-popover {
  position: absolute;
  top: 44px;                 /* drops below the header row */
  left: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 10000;
}

.ai-disclaimer-popover.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ai-disclaimer-popover .popover-card {
  position: relative;
  max-width: 620px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 44px 14px 16px;
  line-height: 1.45;
}

.ai-disclaimer-popover .popover-text {
  font-size: 14px;
  color: #111827;
}

.ai-disclaimer-popover .popover-link {
  margin-left: 8px;
  font-weight: 600;
  color: #0d5ba9;
  text-decoration: none;
}
.ai-disclaimer-popover .popover-link:hover { text-decoration: underline; }

.ai-disclaimer-popover .popover-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 6px;
}
.ai-disclaimer-popover .popover-close:hover {
  background: rgba(61, 26, 102, 1) !important;
  color: #ffffff !important;
}

.ai-disclaimer-popover .popover-arrow {
  position: absolute;
  top: -8px;
  left: 28px;                /* JS repositions this to point at the icon */
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  transform: rotate(45deg);
}

/* Dark mode */
.dark-mode .ai-disclaimer-popover .popover-card {
  background: #1f2937;
  border-color: #374151;
}
.dark-mode .ai-disclaimer-popover .popover-text { color: #e5e7eb; }
.dark-mode .ai-disclaimer-popover .popover-link { color: #93c5fd; }
.dark-mode .ai-disclaimer-popover .popover-close { color: #9ca3af; }
.dark-mode .ai-disclaimer-popover .popover-close:hover { background: #374151; }
.dark-mode .ai-disclaimer-popover .popover-arrow {
  background: #1f2937;
  border-color: #374151;
}

/* Search results pill — match .feedback-trigger look */
#chatWidget .search-results-header {
  display: flex !important;
  justify-content: center !important;
  margin: 12px auto 16px !important;
  background: transparent !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 12px !important; /* Add padding to prevent edge touching */
}

#chatWidget .search-results-header .search-info {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  background: #f8f9fa !important;
  color: #6c757d !important;
  border: 1px solid #000000 !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  max-width: fit-content !important;
}

/* Optional: hide the magnifier for a cleaner pill */
#chatWidget .search-results-header .search-info .fa-search {
  display: none !important;
}

/* “Clear Search” button inside the pill */
#chatWidget .search-results-header .clear-search-btn {
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  color: #000000 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 10px 5px 12px !important;
  margin-left: 6px !important;
  border-left: 1px solid rgba(0,0,0,0.15) !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* Compact search results for minimized window */
#chatWidget[data-state="chat-min"] .search-results-header {
    margin: 8px auto 12px !important;
    padding: 0 8px !important; /* Less padding on sides */
}

#chatWidget[data-state="chat-min"] .search-results-header .search-info {
    padding: 6px 10px !important; /* Smaller padding */
    font-size: 11px !important; /* Smaller text */
    gap: 4px !important;
    max-width: calc(100% - 16px) !important; /* Ensure it fits */
}

#chatWidget[data-state="chat-min"] .search-results-header .clear-search-btn {
    padding: 4px 6px 4px 8px !important; /* Smaller padding */
    font-size: 10px !important; /* Smaller text */
    gap: 3px !important;
    margin-left: 4px !important;
}

#chatWidget .search-results-header .clear-search-btn:hover {
  background: rgba(61, 26, 102, 1) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

#chatWidget .search-results-header .clear-search-btn:focus-visible {
  outline: 2px solid #0d5ba9 !important;
  outline-offset: 2px !important;
}

#chatWidget .search-results-header .clear-search-btn .fa-times {
  font-size: 16px !important;
  opacity: 0.8 !important;
}

/* Extra compact for very narrow minimized windows */
#chatWidget[data-state="chat-min"] .search-results-header .clear-search-btn .fa-times {
    font-size: 10px !important;
}

/* Custom Popup Styles for All Confirmations and Prompts */
.custom-popup-overlay {
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  width: 100vw !important; height: 100vh !important;
  background: rgba(0,0,0,0.6) !important;
  z-index: 10000000 !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  /* hidden by default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}

/* OPEN */
.custom-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: customPopupFadeIn 0.3s ease !important;
}

.custom-popup {
  background: #ffffff !important;
  border-radius: 20px !important;
  width: 90% !important;
  max-width: 520px !important;
  overflow: hidden !important;
  animation: customPopupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.custom-popup-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 28px 32px 20px !important;
  border-bottom: 1px solid #f1f3f4 !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.custom-popup-header h3 {
  margin: 0 !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  letter-spacing: -0.01em !important;
}

.custom-popup-close {
  background: none !important;
  border: none !important;
  font-size: 20px !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  padding: 8px !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

.custom-popup-close:hover {
  background: rgba(61, 26, 102, 1) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
}

.custom-popup-close svg {
  width: 20px !important;
  height: 20px !important;
}

.custom-popup-content {
  padding: 32px !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 24px !important;
}

.custom-popup-icon {
  flex-shrink: 0 !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid rgba(61, 26, 102, 1) !important;
  transition: all 0.3s ease !important;
}

/* Icon variations */
.custom-popup-icon.warning {
  border-color: rgba(61, 26, 102, 1)!important;
}

.custom-popup-icon.danger {
  border-color: rgba(61, 26, 102, 1) !important;
}

.custom-popup-icon.info {
  border-color: rgba(61, 26, 102, 1) !important;
}

.custom-popup-icon .warning-icon {
  width: 28px !important;
  height: 28px !important;
  color: #f59e0b !important;
}

.custom-popup-message {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.custom-popup-message p {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #111827 !important;
  line-height: 1.5 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.custom-popup-subtitle {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #6b7280 !important;
  margin-top: 4px !important;
}

.custom-popup-input-container {
  margin-top: 16px !important;
}

.custom-popup-input {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  color: #111827 !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
}

.custom-popup-input:focus {
  outline: none !important;
  border-color: rgba(61, 26, 102, 1) !important;
}

.custom-popup-input::placeholder {
  color: #9ca3af !important;
  font-style: italic !important;
}

.custom-popup-actions {
  display: flex !important;
  gap: 16px !important;
  justify-content: flex-end !important;
  padding: 24px 32px 32px !important;
  background: rgba(249, 250, 251, 0.5) !important;
}

.custom-popup-btn {
  padding: 14px 32px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  border: 2px solid transparent !important;
  min-width: 120px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.custom-popup-btn.cancel {
  background: #ffffff !important;
  color: #6b7280 !important;
  border-color: #e5e7eb !important;
}

.custom-popup-btn.cancel:hover {
  border-color: rgba(61, 26, 102, 1) !important;
  background: #f9fafb !important;
  color: #374151 !important;
  transform: translateY(-1px) !important;
}

.custom-popup-btn.confirm {
  background: linear-gradient(135deg, #000000 0%, #383838 100%) !important;
  color: #ffffff !important;
}

.custom-popup-btn.confirm:hover {
  background: rgba(61, 26, 102, 1) !important;
  transform: translateY(-2px) !important;
}

/* Button variations for different popup types */
.custom-popup-btn.confirm.primary {
    background: linear-gradient(135deg, #000000 0%, #383838 100%) !important;
}

.custom-popup-btn.confirm.primary:hover {
    background: rgba(61, 26, 102, 1) !important;
}

.custom-popup-btn:active {
  transform: translateY(0) !important;
}

/* Animations */
@keyframes customPopupFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes customPopupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .custom-popup {
    width: 95% !important;
    margin: 20px !important;
    border-radius: 16px !important;
  }

  .custom-popup-content {
    flex-direction: column !important;
    text-align: center !important;
    padding: 24px !important;
  }

  .custom-popup-actions {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 20px 24px 24px !important;
  }

  .custom-popup-btn {
    width: 100% !important;
  }
}

.widget-initial-state {
    display: flex !important;
    background: linear-gradient(90deg,#000000 100%);
    border-radius: 12px 12px 0 0 !important;
    padding: 24px;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);

    /* FIXED positioning - anchored to bottom center */
    position: fixed !important;
    bottom: 0px !important;
    left: 0 !important;
    right: 0 !important;

    /* Center using margin auto instead of transform */
    width: 850px !important;  /* Fixed pixel width */
    max-width: 80vw !important;  /* Responsive fallback */
    margin: 0 auto !important;  /* Centers horizontally */

    height: auto !important;
    z-index: 999999 !important;
}

.widget-minimize-btn {
    display: flex !important;
    position: absolute !important;
    top: -35px !important;
    right: 15px !important;
    background: rgb(122 115 115 / 60%) !important;
    border: 2px solid #e8eaed;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: white !important;
    transition: all 0.2s ease !important;
}

.widget-input {
  width: 100% !important;                  /* optional, nicer than fixed vw */
  height: 50px !important;
  padding: 12px 72px 12px 56px !important; /* R = GO, L = avatar */
  border: 2px solid #e8eaed;
  border-radius: 10px;
  background: #fafbfc;
  font-size: 16px;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  outline: none;
  transition: all .3s ease;
}

/* Move only the input bar up inside the dock */
#chatWidget[data-state="dock"] .widget-input-box{
  margin-top:-20px !important;   /* try -6px, -10px, -14px to taste */
}


.widget-input::placeholder {
    display: flex !important;
    font-size: 16px;
    font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
    color: #9aa0a6;
    font-weight: 500;
}

.widget-button-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.widget-assistant-icon{
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover;
  opacity: 50%; transition: opacity .2s ease;
}

/* brighten the icon when the field (or its children) has focus */
.widget-input-box:focus-within .widget-assistant-icon { opacity: 50%; }

.widget-send-btn {
    display: flex !important;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #4285f4 0%, #667eea 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.widget-send-btn:hover {
   display: flex !important;
    transform: translateY(-50%) scale(1.05);
}

.widget-send-btn:disabled {
    display: flex !important;
    background: #dadce0;
    cursor: not-allowed;
    box-shadow: none;
}

.widget-send-btn:disabled:hover {
    transform: translateY(-50%) scale(1);
}

#widgetInitialState .widget-input-container,
#widgetInitialState .widget-input-box {
  width: 100% !important;           /* stretch inside centered flex parent */
}

#widgetInitialState .widget-input-box {
  position: relative !important;     /* for the GO button & avatar */
}

#widgetInitialState .widget-input {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  height: 52px !important;
  box-sizing: border-box !important;
  /* space for avatar (L) + GO image button (R) */
  padding: 12px 72px 12px 68px !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  border: 2px solid #e8eaed;
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
}

/* Remove placeholder padding that was pushing text */
#widgetInitialState .widget-input::placeholder {
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  padding: 0 !important;
  color: #9aa0a6;
  font-weight: 400;
  font-size: 16px !important;
}

/* Avatar position (don’t block clicks) */
#widgetInitialState .widget-button-icon {
  position: absolute !important;
  left: 18px !important;
  top: 54% !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
}

#widgetInitialState .widget-assistant-icon {
  width: 30px; height: 30px; border-radius: 50%;
  opacity: 50%; transition: opacity .2s ease;
}
#widgetInitialState .widget-input-box:focus-within .widget-assistant-icon { opacity: 1; }

/* Force reset for chatbot container */
.agentforce-chat-widget {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  top: auto !important;
  left: auto !important;
  z-index: 999999 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #374151 !important;
  max-width: 420px !important;
  max-height: 680px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  box-sizing: border-box !important;
}

/* Override ALL possible conflicting selectors */
.agentforce-chat-widget.block-mode,
.block-azure-ai-chat-block .azure-ai-chat-page .agentforce-chat-widget,
.azure-ai-chat-page .agentforce-chat-widget,
.clean-background .agentforce-chat-widget,
div .agentforce-chat-widget,
.layout-container .agentforce-chat-widget {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: 420px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

/* Reset any inherited styles */
.agentforce-chat-widget * {
  box-sizing: border-box !important;
}

/* Chat Button (Minimized State) */
.chat-button {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    background: linear-gradient(90deg, #000000 0%, #000000 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 5px 13px !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 190px !important;
    min-height: 50px !important;
    font-family: inherit !important;
    position: relative !important;
    margin: 20px !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* Hover state with gradient */
.chat-button:hover {
  background: linear-gradient(90deg, #351a58 0%, #351a58 50%, #341958 100%) !important;
  transform: translateY(-2px) !important;
}

/* Chat button wordmark styling */
.chat-button .button-wordmark {
    height: 30px !important;
    width: auto !important;
    max-width: 128px !important;
    max-height: 19px !important;
    display: block !important;
    object-fit: contain !important;
}

.chat-button-text {
  flex: 1 !important;
  text-align: left !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.chat-button-text span {
  display: block !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  margin-bottom: 3px !important;
  line-height: 1.2 !important;
  color: inherit !important;
  letter-spacing: -0.01em !important;
}

.chat-button-text small {
  display: block !important;
  font-size: 13px !important;
  opacity: 0.85 !important;
  font-weight: 400 !important;
  color: inherit !important;
  letter-spacing: -0.005em !important;
}

.chat-button-status {
display: none;
}

.chat-button-icon {
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.assistant-icon {
  border-radius: 50% !important;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.2); }
}

/* Chat Window States */
.chat-window {
  display: none !important;
  background: #ffffff !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  flex-direction: column !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  position: fixed !important;
  bottom: 24px !important;
  right: 2px !important;
  top: auto !important;
  left: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* Normal/Default state (like your Image 1) */
.chat-window.active {
  display: flex !important;
  width: 420px !important;
  height: 465px !important;
  bottom: 85px !important;
  border-radius: 20px !important;
  animation: slideUpScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  max-height: calc(100vh - 135px);
}

/* Maximized state (like your Image 2) */
.chat-window.maximized {
  display: flex !important;
  width: 90vw !important;
  max-width: 1200px !important;
  height: 78vh !important;
  max-height: 800px !important;
  bottom: 0px !important;
  right: 50% !important;
  transform: translate(50%) !important;
  border-radius: 20px 20px 0 0 !important;
  animation: expandToCenter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Minimized state shows only chat button */
.chat-window.minimized {
  display: none !important;
}

.agentforce-chat-widget.minimized .chat-button {
  display: flex !important;
}

.agentforce-chat-widget.maximized .chat-button {
  display: none !important;
}

.agentforce-chat-widget.active .chat-button {
  display: none !important;
}

/* Chat Header */
.chat-header {
  background: rgb(255 255 255 / 95%) !important;
  padding: 20px 24px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-radius: 20px 20px 0 0 !important;
  margin: 0 !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  min-height: 70px !important;
/* Apply Salesforce Sans font specifically to header */
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

/* Add to your main CSS file, e.g., chat_widget.css */
/* Chat header logo beside CurrentIQ title */
.chat-header-logo {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    /* border: 2px solid rgba(255,255,255,0.8) !important; */
    object-fit: cover !important;
    align-self: center !important;
}

.chat-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.chat-header h3 {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin: 0 !important;
    letter-spacing: -0.02em !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.info-icon {
  color: #9ca3af !important;
  font-size: 20px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  border-radius: 50% !important;
  padding: 6px !important;
  align-self: center !important;
}

.info-icon:hover {
  color: rgba(61, 26, 102, 1) !important;
  transform: scale(1.1) !important;
}

.chat-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.btn-icon {
  background: none !important;
  border: none !important;
  color: #0a0a0a !important;
  cursor: pointer !important;
  padding: 8px !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
}

.btn-icon:hover {
  border: 2px solid rgba(61, 26, 102, 1) !important;
  color: #000000 !important;
  transform: scale(1.05) !important;
}

.btn-icon:active {
  transform: scale(0.95) !important;
}

.btn-icon .hidden { display: none !important; }


.btn-icon svg,
.btn-icon i {
  width: 16px !important;
  height: 16px !important;
}

.menu-icon,
.expand-icon {
  fill: currentColor !important;
}

/* Chat Content */
.chat-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  background: rgba(255, 255, 255, 0.8) !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Welcome Section */
.welcome-section {
 position: relative !important;
 font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
 padding: 60px 32px 32px !important;
 text-align: center;
 background: transparent !important;
}
.welcome-section .ai-left {
  text-align: left !important;
}
.welcome-section .ai-center {
  text-align: center !important;
}
.welcome-section .ai-center h3 {
  text-align: center !important;
}
.welcome-section h1 {
  font-size: 36px !important;
  font-weight: 500 !important;
  color: #000000 !important;
  margin: 0 0 20px 0 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
}

.welcome-section .highlight {
  background: linear-gradient(135deg, #000000 0%, #000000 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-weight: 600 !important;
}

.join-text {
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  color: #5c5a5a !important;
  font-size: 14px !important;
  margin: 0 0 24px 0 !important;
  font-weight: 500 !important;
}

/* Welcome Section - Instructions */
.welcome-section h3 {
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1c1c1c !important;
  margin: 16px 0 12px 0 !important;
  line-height: 1.4 !important;
}

.welcome-section > p {
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #5c5a5a !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

.welcome-section .ai-left p {
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #5c5a5a !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.5 !important;
}

.welcome-section .ai-left p:first-child,
.welcome-section .ai-left p:nth-child(3) {
  margin-top: 16px !important;
}

.welcome-section .ai-left strong {
  font-weight: 700 !important;
  color: #1c1c1c !important;
}

.welcome-section .examples-text {
  font-size: 13px !important;
  color: #6b7280 !important;
  margin: 0 0 4px 0 !important;
  font-style: italic !important;
}

.welcome-section .closing-text {
  margin-top: 20px !important;
  font-size: 13px !important;
  color: #6b7280 !important;
  line-height: 1.6 !important;
}

/* Chat Messages */
.chat-messages {
  flex: 1 !important;
  padding: 0 28px 28px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  background: transparent !important;
  scroll-behavior: smooth !important;
}

.chat-input,
.input-group {
  position: relative !important;
  z-index: 100001 !important;
  overflow: visible !important; /* Allow tooltips to show */
}

.message {
  display: flex !important;
  gap: 14px !important;
  align-items: flex-start !important;
  margin-bottom: 0 !important;
  animation: fadeInUp 0.4s ease-out !important;

}

.message.user {
  flex-direction: row-reverse !important;
  justify-content: flex-start !important;
  margin-left: 60px !important;
  margin-right: 0 !important;

}

.message.agent {
  flex-direction: row !important;
  margin-right: 60px !important;
  margin-left: 0 !important;
}

[data-static="intro"] {
  display: none !important;
}

/* Fix z-index issues for menu dropdown */
.chat-header {
    position: relative !important;
    z-index: 1000 !important;
}

.ai-agent-menu-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    min-width: 220px !important;
    z-index: 99999 !important;
    animation: aiAgentMenuSlideIn 0.2s ease-out !important;
    margin-top: 8px !important;
}

/* Ensure chat content doesn't overlap */
.chat-content {
    z-index: 1 !important;
}

/* Menu items styling */
.ai-agent-menu-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #e5e5e5 !important;
    background: #f8f9fa !important;
    border-radius: 8px 8px 0 0 !important;
}

.ai-agent-menu-header h4 {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
}

.ai-agent-menu-items {
    padding: 8px 0 !important;
}

.ai-agent-menu-item {
    padding: 12px 16px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #000000 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.ai-agent-menu-item:hover {
    background: rgba(204, 204, 207, 0.4)  !important;
    color: #000000 !important;
}

.ai-agent-menu-item:last-child {
    border-bottom: none !important;
}

@keyframes aiAgentMenuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-avatar {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
}

.message-avatar .assistant-icon {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  filter: none !important;
}

.message-content {
  flex: 1 !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  position: relative !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.message.agent .message-content {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;

}

.message.user .message-content {
  background: linear-gradient(135deg, #000000 0%, #000000 100%) !important;
  color: #ffffff !important;
  border-radius: 24px 24px 24px 24px !important;
  padding: 16px 20px !important;
  max-width: fit-content !important;
  margin-left: auto !important;
  border: 1px solid rgb(255 255 255) !important;
}

.message-content p {
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: white !important;
  word-wrap: break-word !important;
  font-weight: 400 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.message.agent .message-content p {
  color: #000000 !important;
  font-weight: 400 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.message.user .message-content p {
  color: #f9f9f9 !important;
  font-weight: 500 !important;
}

.message-meta {
  margin-top: 8px !important;
  font-size: 12px !important;
  color: #565b62 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-weight: 500 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.message-text{
    color: #000000;
}

.message.user .message-meta {
  justify-content: flex-end !important;
  text-align: right !important;
  color: #ffffff !important;
}

.message.agent .message-meta {
  justify-content: flex-start !important;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute !important;
  bottom: 12px !important;
  left: 94% !important;
  transform: translateX(-50%) !important;
  z-index: 10 !important;
}

.scroll-button {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.6) !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.scroll-button:hover {
  background: rgba(255, 255, 255, 1) !important;
  transform: translateY(-2px) scale(1.05) !important;
  border-color: rgba(61, 26, 102, 1) !important;
}

.scroll-button i {
  color: #6b7280 !important;
  font-size: 14px !important;
}

/* Chat Input */
.chat-input {
  padding: 14px 28px 14px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 0 0 20px 20px !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  position: relative;
  overflow: visible !important; /* allow button to overflow if needed */
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

/* Left icon inside the chat input */
.input-group .input-icon{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;      /* don't block typing/clicks */
  color: rgb(0, 0, 0);            /* icon color (uses currentColor) */
  opacity: 50%;                  /* lighter color */
}

.input-group .input-icon svg{
  width: 100%;
  height: 100%;
  display: block;
}

/* Make room for the icon (was 20px left padding) */
.chat-input .input-group .message-input{
  padding-left: 52px !important;
}

.input-group {
  position: relative !important;
  display: flex !important;
  align-items: flex-end !important;
  background: rgba(248, 250, 252, 0.8) !important;
  border: 2px solid rgba(229, 231, 235, 0.6) !important;
  overflow: visible !important; /* Allow tooltips to show */
  border-radius: 8px !important;
  padding: 6px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.input-group:focus-within {
  border-color: rgba(61,26,102,1) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  transform: translateY(-1px) !important;
}

.message-input {
  flex: 1 !important;
  background: none !important;
  border: none !important;
  outline: none !important;
  resize: none !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: #111827 !important;
  min-height: 44px !important;
  max-height: 120px !important;
  padding: 12px 60px 12px 20px !important;
  overflow-y: auto !important;
  box-shadow: none !important;
  font-weight: 400 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

.message-input:focus,
.message-input:focus-visible,
.message-input:active {
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: #131414 !important;
}

.message-input::placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;

}

:root {
    --go-btn-rest: url("/modules/custom/azure_ai_chat/images/goButtonresting.png");
    --go-btn-hover: url("/modules/custom/azure_ai_chat/images/goButtonhover.png");
}

/* Make sure the dock input box is the positioning context */
.widget-input-box{ position:relative; }

/* Extra room on the right for the image button */
#initialMessageInput{
  padding-right:72px !important;
}

#messageInput {
      min-height: 44px !important;
      max-height: 120px !important;
      height: 44px !important;
      resize: none !important;
      transition: height 0.2s ease !important;
      overflow-y: hidden !important;
      line-height: 1.4 !important;
  }

/* Ensure proper reset after sending */
#messageInput:empty {
    height: 44px !important;
}

/* Turn the dock send button into the image button */
#initialSendButton{
  position:absolute !important;
  inset-inline-end:12px;     /* right in LTR, left in RTL */
  top:50%;
  --go-scale:1;
  transform:translateY(-50%) scale(var(--go-scale));
  transform-origin:center;

  width:40px; height:40px;
  border:none !important;
  border-radius:50% !important;
  padding:0 !important;

  background-image:var(--go-btn-rest) !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
  background-size:contain !important;
  background-color:transparent !important;

  cursor:pointer !important;
  overflow:hidden !important;
  transition:
    box-shadow .15s ease,
    filter .15s ease,
    opacity .15s ease,
    transform .15s ease,
    background-image .05s linear;
}

/* Hide the built-in SVG icon (no HTML edits needed) */
#initialSendButton .send-icon,
#initialSendButton svg{ display:none !important; }

/* Hover / focus */
#initialSendButton:hover:not(:disabled),
#initialSendButton:focus-visible:not(:disabled){
  --go-scale:1.04;
  background-image:var(--go-btn-hover) !important;
  outline:none;
}

/* Active press */
#initialSendButton:active:not(:disabled){
  --go-scale:.98;
  filter:brightness(.98);
}

/* Disabled state mirrors your rest image, dimmed */
#initialSendButton:disabled{
  --go-scale:1;
  background-image:var(--go-btn-rest) !important;
  opacity:.45 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
  pointer-events: auto !important; /* Allow hover for native title tooltip */
}

/* (Optional) tighten the icon at small widths */
@media (max-width:640px){
  #initialMessageInput{ padding-right:64px !important; }
  #initialSendButton{ width:44px; height:44px; inset-inline-end:10px; }
}

#messageInput,
.chat-input textarea,
.chat-input input[type="text"] {
    padding-right: 72px !important;
}

.btn-send.go-btn {
    position: absolute !important;
    inset-inline-end: 23px;
    top: 50%;
    --go-scale: 1;
    transform: translateY(-50%) scale(var(--go-scale));
    transform-origin: center;
    width: 40px;
    height: 40px;
    border: none !important;
    border-radius: 50% !important;
    padding: 0 !important;
    background-image: var(--go-btn-rest) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;   /* <-- THIS FIXES THE STRETCHING */
    background-color: transparent !important;
    cursor: pointer !important;
    overflow: visible !important; /* Changed to visible for tooltip display */
}

.btn-send.go-btn .send-icon {
    display: none !important;
}

.btn-send.go-btn:hover:not(:disabled),
.btn-send.go-btn:focus-visible:not(:disabled) {
    --go-scale: 1.04;
    background-image: var(--go-btn-hover) !important;
    outline: none;
}

.btn-send.go-btn:active:not(:disabled) {
    --go-scale: .98;
    filter: brightness(.98);
}

.btn-send.go-btn:disabled {
    --go-scale: 1;
    background-image: var(--go-btn-rest) !important;
    opacity: .45 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    pointer-events: auto !important; /* Allow hover for native title tooltip */
}

.btn-send.go-btn svg {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .agentforce-chat-widget {
    bottom: 20px !important;
    right: 20px !important;
    left: 20px !important;
    max-width: calc(100vw - 40px) !important;
  }

  .chat-window.active {
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 100px) !important;
    bottom: 20px !important;
    right: 20px !important;
    left: 20px !important;
    border-radius: 16px !important;
  }

  .chat-window.maximized {
    width: calc(100vw - 20px) !important;
    height: calc(100vh - 60px) !important;
    bottom: 50% !important;
    right: 50% !important;
    transform: translate(50%, 50%) !important;
  }

  .chat-header {
    border-radius: 16px 16px 0 0 !important;
  }
}

/* Enhanced Animations */
@keyframes slideUpScale {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes expandToCenter {
  from {
    opacity: 0;
    transform: translate(50%, 50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(50%, 50%) scale(1);
  }
}

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

/* Custom scrollbar with modern styling */
.chat-messages::-webkit-scrollbar {
  width: 3px !important;
  display: none !important;
}

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

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(119, 120, 123, 0.2) !important;
  border-radius: 6px !important;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background:  rgba(200, 198, 202, 0.4) !important
}

/* Final positioning override */
#chatWidget {
  position: fixed !important;
  bottom: 65px !important;
  right: 24px !important;
  z-index: 999999 !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

/* Ensure proper stacking context */
.agentforce-chat-widget,
.agentforce-chat-widget .chat-window,
.agentforce-chat-widget .chat-button {
  z-index: 999999 !important;
}

.feedback-trigger {
  background: #f8f9fa !important;
  color: #6c757d !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 20px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-weight: 500 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  margin-left: 8px !important;
  margin-right: 100px !important;
  visibility: visible !important;
  opacity: 1 !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.feedback-trigger:hover {
  background: rgba(61, 26, 102, 1) !important;
  color: #ffffff !important;
  border-color: #000000 !important;
  transform: translateY(-1px) !important;
}

.feedback-trigger:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.feedback-icon {
  margin-top: 8px !important;
  display: flex !important;
  justify-content: flex-start !important;
  padding: 0 4px !important;
  width: 100% !important;
}

/* Horizontal layout for minimized chat - more specific selectors */
.chat-window.active:not(.maximized) .inline-feedback-buttons,
#chatWidget[data-state="chat-min"] .inline-feedback-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    margin-top: 8px !important;
    margin-left: 8px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: calc(100% - 16px) !important;
}

/* Make thumbs buttons icon-only in minimized view */
.chat-window.active:not(.maximized) .inline-thumbs-up,
.chat-window.active:not(.maximized) .inline-thumbs-down,
#chatWidget[data-state="chat-min"] .inline-thumbs-up,
#chatWidget[data-state="chat-min"] .inline-thumbs-down {
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Make feedback button smaller and shorter text */
.chat-window.active:not(.maximized) .feedback-trigger,
#chatWidget[data-state="chat-min"] .feedback-trigger {
    font-size: 11px !important;
    padding: 6px 8px !important;
    height: 32px !important;
    white-space: nowrap !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    margin-right: 0px !important;
}

.chat-window.active:not(.maximized) .feedback-trigger span,
#chatWidget[data-state="chat-min"] .feedback-trigger span {
    font-size: 11px !important;
}

/* Overlay: covers the whole viewport */
.feedback-popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(44, 44, 44, 0.18) !important;
  z-index: 2147483646 !important;
  animation: fadeIn 0.3s ease !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transform: none !important;

  /* Center the popup */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Override with maximum specificity - for minimized window */
.chat-window.active .feedback-popup-overlay,
.chat-window.normal .feedback-popup-overlay,
#chatWindow.active .feedback-popup-overlay,
#chatWindow .feedback-popup-overlay,
.agentforce-chat-widget .chat-window .feedback-popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  transform: none !important;
  margin: 0 !important;
}

/* Popup - Default centered */
.feedback-popup {
  position: relative !important;
  z-index: 2147483647 !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
  padding: 32px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 420px !important;
  max-width: 90vw !important;
  margin: 0 !important;
}

/* Just update the inline buttons container to handle three buttons */
.inline-feedback-buttons {
    display: flex !important;
    gap: 8px !important;
    margin-top: 12px !important;
    margin-left: 8px !important;
    align-items: center !important;
    flex-wrap: wrap !important; /* Allow wrapping on small screens if needed */
}

/* Ensure popup stays centered in minimized state */
.chat-window.active .feedback-popup,
.chat-window.normal .feedback-popup,
#chatWindow.active .feedback-popup,
#chatWindow .feedback-popup {
  width: 420px !important;
  max-width: 90vw !important;
  margin: 0 !important;
}

/* MAXIMIZED state - offset positioning */
.chat-window.maximized .feedback-popup-overlay .feedback-popup,
#chatWindow.maximized .feedback-popup-overlay .feedback-popup {
  width: 380px !important;
  margin-right: 350px !important;
  margin-bottom: 150px !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
}

/* Mobile - always centered */
@media (max-width: 768px) {
  .feedback-popup {
    width: calc(100vw - 40px) !important;
    max-width: 420px !important;
    margin: 0 !important;
  }

  .chat-window.maximized .feedback-popup {
    width: calc(100vw - 40px) !important;
    margin: 0 !important;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.feedback-popup-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 24px 28px 20px !important;
  border-bottom: 1px solid #f1f3f4 !important;
}

.feedback-popup-header h3 {
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  letter-spacing: -0.01em !important;
}

.close-popup {
  background: none !important;
  border: none !important;
  font-size: 24px !important;
  margin-left: 10px !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  padding: 8px !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

.close-popup:hover {
  background: rgba(61, 26, 102, 1) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
}

.feedback-popup-content {
  padding: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
}

.feedback-actions {
  display: flex !important;
  gap: 16px !important;
}

.thumbs-up,
.thumbs-down {
  flex: 1 !important;
  background: #ffffff !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  color: #374151 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

.thumbs-up:hover,
.thumbs-down:hover {
  border-color: rgba(61, 26, 102, 1)!important;
  background: #f8faff !important;
  transform: translateY(-2px) !important;
}

.thumbs-up.active {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
}

.thumbs-down.active {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
}

.feedback-comment {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.feedback-comment label {
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

.feedback-comment textarea {
  width: 300px !important;
  padding: 16px 20px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  resize: vertical !important;
  min-height: 100px !important;
  color: #374151 !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  resize: none !important;
}

.feedback-comment textarea:focus {
  outline: none !important;
  border-color: rgba(61, 26, 102, 1) !important;
  background: #fefefe !important;
}

.feedback-comment textarea::placeholder {
  color: #9ca3af !important;
  font-style: italic !important;
}

.feedback-submit {
  display: flex !important;
  gap: 16px !important;
  justify-content: flex-end !important;
  margin-top: 12px !important;
}

.submit-feedback,
.cancel-feedback {
  padding: 14px 28px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
  border: none !important;
}

.submit-feedback {
  background: linear-gradient(135deg, #000000 0%, #000000 100%) !important;
  color: #ffffff !important;
}

.submit-feedback:hover {
  background: rgba(61, 26, 102, 1) !important;
  transform: translateY(-2px) !important;
}

.submit-feedback:active {
  transform: translateY(0) !important;
}

.cancel-feedback {
  background: #ffffff !important;
  color: #6b7280 !important;
  border: 2px solid #e5e7eb !important;
}

.cancel-feedback:hover {
  border-color: rgba(61, 26, 102, 1) !important;
  background: #f9fafb !important;
  color: #374151 !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .feedback-popup {
    width: 95% !important;
    margin: 20px !important;
    border-radius: 12px !important;
  }
}

/* Fix z-index issues for menu dropdown */
.chat-header {
    position: relative !important;
    z-index: 1000 !important;
}

.ai-agent-menu-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    min-width: 220px !important;
    z-index: 99999 !important;
    animation: aiAgentMenuSlideIn 0.2s ease-out !important;
    margin-top: 8px !important;
}

/* Ensure chat content doesn't overlap */
.chat-content {
    z-index: 1 !important;
}

/* Menu items styling */
.ai-agent-menu-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #e5e5e5 !important;
    background: #f8f9fa !important;
    border-radius: 8px 8px 0 0 !important;
}

.ai-agent-menu-header h4 {
    padding-top: 8px;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
}

.ai-agent-close-menu {
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    color: #9ca3af !important;
    cursor: pointer !important;
    padding: 8px !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.ai-agent-close-menu:hover {
    background: rgba(61, 26, 102, 1) !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
}


.ai-agent-menu-items {
    padding: 8px 0 !important;
}

.ai-agent-menu-item {
    padding: 12px 16px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #374151 !important;
    transition: background 0.2s ease !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.ai-agent-menu-item:last-child {
    border-bottom: none !important;
}

@keyframes aiAgentMenuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Authoritative visibility by state (do not change icons) === */
#chatWidget #widgetInitialState { display: none !important; }
#chatWidget #chatWindow         { display: none !important; }
#chatWidget #chatButton         { display: none !important; }

/* Button-only (initial) */
#chatWidget[data-state="button"] #chatButton { display: flex !important; }

/* Dock-only */
#chatWidget[data-state="dock"] #widgetInitialState { display: flex !important; }

/* Chat minimized / maximized */
#chatWidget[data-state="chat-min"] #chatWindow,
#chatWidget[data-state="chat-max"] #chatWindow { display: flex !important; }

/* states driven by data-state */
#chatWidget[data-state="button"] #widgetInitialState { display: none !important; }
#chatWidget[data-state="dock"]   #widgetInitialState { display: flex !important; }
#chatWidget[data-state="dock"]   #chatWindow        { display: none !important; }

/* make the dock input area actually visible */
#chatWidget[data-state="dock"] .widget-input-container { display: flex !important; }

/* Keep the expand icon from changing/rotating in any state */
#chatWidget .expand-icon {
  transform: none !important;
  rotate: 0deg !important;
}
#chatWidget.maximized .expand-icon,
#chatWidget[data-state="chat-max"] .expand-icon {
  transform: none !important;
  rotate: 0deg !important;
}


/* System/feedback message layout */
.message.system{
  justify-content: flex-end !important;
  margin: 0 !important;
}

.message.system .message-content{
  background: transparent !important;
  padding: 0 !important;
}

/* Pretty feedback chip */
.feedback-chip{
  display:inline-flex !important;
  align-items:center !important;
  gap:10px !important;
  padding:8px 12px !important;
  border-radius:9999px !important;
  border:1px solid rgba(0,0,0,.08) !important;
  font-size:14px !important;
  font-weight:600 !important;
  line-height:1 !important;
  animation: chipPop .22s ease-out !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.feedback-chip .chip-icon{
  width:18px; height:18px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:50%;
  font-size:13px;
}


.feedback-chip .chip-time{
  font-size:12px !important;
  opacity:.7 !important;
  margin-left:2px !important;
}

/* Variants */
.feedback-chip.positive{
  background:#dcfce7 !important;
  color:#14532d !important;
  border-color:#86efac !important;
}
.feedback-chip.positive .chip-icon{ background:#86efac33; }

.feedback-chip.negative{
  background:#fee2e2 !important;
  color:#7f1d1d !important;
  border-color:#fecaca !important;
}
.feedback-chip.negative .chip-icon{ background:#fecaca55; }

@keyframes chipPop{
  from{ opacity:0; transform: translateY(6px) scale(.96); }
  to  { opacity:1; transform: translateY(0)   scale(1);   }
}

/* Authoritative state rules */
#chatWidget #widgetInitialState { display: none !important; }
#chatWidget #chatWindow         { display: none !important; }
#chatWidget #chatButton         { display: none !important; }

#chatWidget[data-state="button"] #chatButton         { display: flex !important; }
#chatWidget[data-state="dock"]   #widgetInitialState { display: flex !important; }
#chatWidget[data-state="chat-min"] #chatWindow,
#chatWidget[data-state="chat-max"] #chatWindow       { display: flex !important; }

/* Failsafe: show the dock even if it isn’t a descendant of #chatWidget */
#widgetInitialState[data-force-open="true"] { display: flex !important; }

.error-popup {
  position: absolute;
  right: 16px;
  bottom: 60px; /* floats above the GO button */
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 15px;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  z-index: 99999;
  display: none;
  min-width: 220px;
  max-width: 320px;
  text-align: left;
  line-height: 1.4;
  transition: opacity 0.2s;
  white-space: normal;
}

.error-popup::before {
  content: "⚠️";
  margin-right: 8px;
  font-size: 18px;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .error-popup {
    right: 8px;
    bottom: 48px;
    min-width: 140px;
    max-width: 90vw;
    font-size: 13px;
    padding: 6px 10px;
  }
}

/* Make welcome behave like a normal block (no sticky, no hiding) */
#chatWidget .chat-messages {
  overflow-y: auto !important;   /* keep it scrollable */
}

#chatWidget .chat-messages .welcome-section{
  position: static !important;   /* <-- NOT sticky */
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  margin: 0 0 12px !important;
  padding: 16px 28px !important;
  background: transparent !important;
}

/* If some JS adds .hide-welcome, ignore it */
#chatWidget .chat-messages.hide-welcome .welcome-section{
  opacity: 1 !important;
  transform: none !important;
}

.unread-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: #e0245e;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
  display: none; /* hidden when 0 */
  justify-content: center;
  align-items: center;
}

.grecaptcha-badge {
  display: none;
}

#chatWidget .widget-initial-state{
  bottom: 0px !important;
  top: auto !important;
  width: 930px !important;
  max-width: 100vw !important;
  padding: 18px 22px 20px !important;
  background: linear-gradient(90deg,#404040 0%, #000 100%) !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: visible !important; /* Add this */
}

/* Title bar (like image 2) */
#chatWidget .dock-titlebar{
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 12px;
    overflow: visible !important;
    width: -webkit-fill-available;
}
#chatWidget .dock-titlebar > :first-child
 {
    margin-right: 15px;
}
#chatWidget .dock-brand .brand-mark{
    width: 50px;
    height: 50px;
    display: block;
}

#chatWidget .dock-title{
  margin: 0;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  font-size: 22px;                   /* compact */
  line-height: 1.2;
  font-weight: 600;
  color: #fff;
}

#chatWidget .dock-title,
#chatWidget .dock-subtitle {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#chatWidget .dock-subtitle{
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255,255,255,.85);
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
system-ui, sans-serif !important;
}

/* Keep the minimize inside the bar at top-right */
#chatWidget .widget-minimize-btn{
  position: absolute !important;
  top: 0px !important;
  width: 34px !important;
  height: 34px !important;
  background: rgba(255,255,255,.2) !important;
  border: 2px solid #e8eaed !important;
}

/* Make the icon inside the INPUT dark @ 50% opacity (small) */
#chatWidget .widget-button-icon .widget-assistant-icon{
  width: 35px; height: 35px;
  opacity: 50% !important;
}

@media (max-width: 768px) {
  .custom-popup-content {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .custom-popup-icon {
    margin: 0 auto !important;
  }

  .custom-popup-message {
    align-items: center !important;
    text-align: center !important;
  }

  .custom-popup-message p {
    text-align: center !important;
  }

  .custom-popup-subtitle {
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  /* Compact search results on mobile */
  #chatWidget .search-results-header {
    margin: 8px 0 !important;
    padding: 0 !important;
  }

  #chatWidget .search-results-header .search-info {
    padding: 6px 12px !important;
    font-size: 12px !important;
    max-width: calc(100% - 16px) !important;
    width: auto !important;
    margin: 0 8px !important;
    gap: 6px !important;
  }

  #chatWidget .search-results-header .clear-search-btn {
    padding-left: 6px !important;
    margin-left: 4px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }

  #chatWidget .search-results-header .clear-search-btn .fa-times {
    font-size: 10px !important;
  }
}

@media (max-width: 768px) {
  /* Create visible top bar before header */
  #chatWidget .chat-header::before {
    content: '' !important;
    position: absolute !important;
    top: 28px !important;
    left: 0 !important;
    right: 0 !important;
    height: 8px !important;
    background: rgba(245, 245, 245, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  }

  #chatWidget .chat-header {
    position: relative !important;
    margin-top: 40px !important;
  }

  #chatWidget .chat-window {
    padding-top: 0 !important;
  }
}

/* Container for tables - enable horizontal scroll */
.chat-messages .message-text {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table styling */
.chat-messages table {
    width: 100%;
    min-width: 100%; /* Ensure table takes full width */
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
    table-layout: auto; /* Let columns size naturally */
}

.chat-messages table th,
.chat-messages table td {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: top;
    text-align: left;
}

.chat-messages table th {
    background: #000000;
    color: #ffffff;
    font-weight: 600;
    white-space: normal; /* Allow header text to wrap */
}

.chat-messages table td {
    background: #ffffff;
}

/* Ensure equal column widths for comparison tables */
.chat-messages table th:first-child,
.chat-messages table td:first-child {
    width: 25%; /* Feature column */
    min-width: 120px;
}

.chat-messages table th:nth-child(2),
.chat-messages table td:nth-child(2) {
    width: 37.5%; /* First product column */
    min-width: 150px;
}

.chat-messages table th:nth-child(3),
.chat-messages table td:nth-child(3) {
    width: 37.5%; /* Second product column */
    min-width: 150px;
}

/* Responsive adjustments for minimized chat */
#chatWidget[data-state="chat-min"] .chat-messages table {
    font-size: 13px;
    display: block;
    overflow-x: auto;
}

#chatWidget[data-state="chat-min"] .chat-messages table thead,
#chatWidget[data-state="chat-min"] .chat-messages table tbody,
#chatWidget[data-state="chat-min"] .chat-messages table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

#chatWidget[data-state="chat-min"] .chat-messages table th,
#chatWidget[data-state="chat-min"] .chat-messages table td {
    padding: 8px 10px;
    font-size: 12px;
}

/* Custom scrollbar for tables */
.chat-messages .message-text::-webkit-scrollbar {
    height: 8px;
}

.chat-messages .message-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-messages .message-text::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-messages .message-text::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Prevent table from breaking chat layout */
.chat-messages .message-content {
    max-width: 100%;
    overflow: visible;
}

/* Better mobile/narrow view handling */
@media (max-width: 768px) {
    .chat-messages table {
        font-size: 12px;
    }

    .chat-messages table th,
    .chat-messages table td {
        padding: 6px 8px;
    }
}

/* Inline feedback buttons */
.inline-feedback-buttons {
    display: flex !important;
    gap: 8px !important;
    margin-top: 12px !important;
    margin-left: 8px !important;
    align-items: center !important;
}

.inline-thumbs-up,
.inline-thumbs-down {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 20px !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-weight: 500 !important;
    min-width: 44px !important;
    height: 32px !important;
    justify-content: center !important;
}

.inline-thumbs-up:hover {
    background: #ceeece !important;
    border-color: #c2efc2 !important;
    color: #0b620b !important;
    transform: translateY(-1px) !important;
}

.inline-thumbs-down:hover {
    background: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
    transform: translateY(-1px) !important;
}

.inline-thumbs-up:active,
.inline-thumbs-down:active {
    transform: translateY(0) !important;
}

.inline-thumbs-up:disabled,
.inline-thumbs-down:disabled {
    cursor: not-allowed !important;
    transform: none !important;
}

.inline-thumbs-up.submitted {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.inline-thumbs-down.submitted {
    background: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

/* Thank you message after submission */
.feedback-submitted {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #28a745 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    animation: fadeIn 0.3s ease !important;
}

.feedback-submitted i {
    color: #28a745 !important;
    font-size: 14px !important;
}

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

/* ============================================
   NEW SIMPLIFIED FEEDBACK POPUP STYLES
   ============================================ */

/* Overlay: covers the whole viewport */
.simple-feedback-popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(44, 44, 44, 0.18) !important;
  z-index: 2147483646 !important;
  animation: fadeIn 0.3s ease !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Popup - Default centered */
.simple-feedback-popup {
  position: relative !important;
  z-index: 2147483647 !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 420px !important;
  max-width: 90vw !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Override for minimized window */
.chat-window.active .simple-feedback-popup-overlay,
.chat-window.normal .simple-feedback-popup-overlay,
#chatWindow.active .simple-feedback-popup-overlay,
#chatWindow .simple-feedback-popup-overlay,
.agentforce-chat-widget .chat-window .simple-feedback-popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  transform: none !important;
  margin: 0 !important;
}

/* Popup stays centered in minimized state */
.chat-window.active .simple-feedback-popup,
.chat-window.normal .simple-feedback-popup,
#chatWindow.active .simple-feedback-popup,
#chatWindow .simple-feedback-popup {
  width: 420px !important;
  max-width: 90vw !important;
  margin: 0 !important;
}

/* MAXIMIZED state - offset positioning */
.chat-window.maximized .simple-feedback-popup-overlay .simple-feedback-popup,
#chatWindow.maximized .simple-feedback-popup-overlay .simple-feedback-popup {
  width: 380px !important;
  margin-right: 350px !important;
  margin-bottom: 150px !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
}

.simple-feedback-popup-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 24px 28px 20px !important;
  border-bottom: 1px solid #f1f3f4 !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.simple-feedback-popup-header h3 {
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  letter-spacing: -0.01em !important;
}

.close-simple-popup {
  background: none !important;
  border: none !important;
  font-size: 24px !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  padding: 8px !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

.close-simple-popup:hover {
  background: rgba(61, 26, 102, 1) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
}

.simple-feedback-popup-content {
  padding: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
}

.simple-feedback-comment {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.simple-feedback-comment textarea {
  width: 100% !important;
  padding: 16px 20px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  resize: vertical !important;
  min-height: 120px !important;
  color: #374151 !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
  resize: none !important;
}

.simple-feedback-comment textarea:focus {
  outline: none !important;
  border-color: rgba(61, 26, 102, 1) !important;
  background: #fefefe !important;
}

.simple-feedback-comment textarea::placeholder {
  color: #9ca3af !important;
  font-style: italic !important;
}

.simple-feedback-submit {
  display: flex !important;
  gap: 16px !important;
  justify-content: flex-end !important;
  margin-top: 12px !important;
}

.submit-simple-feedback,
.cancel-simple-feedback {
  padding: 14px 28px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  border: none !important;
}

.submit-simple-feedback {
  background: linear-gradient(135deg, #000000 0%, #000000 100%) !important;
  color: #ffffff !important;
}

.submit-simple-feedback:hover {
  background: rgba(61, 26, 102, 1) !important;
  transform: translateY(-2px) !important;
}

.submit-simple-feedback:active {
  transform: translateY(0) !important;
}

.cancel-simple-feedback {
  background: #ffffff !important;
  color: #6b7280 !important;
  border: 2px solid #e5e7eb !important;
}

.cancel-simple-feedback:hover {
  border-color: rgba(61, 26, 102, 1) !important;
  background: #f9fafb !important;
  color: #374151 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .simple-feedback-popup {
    width: calc(100vw - 40px) !important;
    max-width: 420px !important;
    margin: 0 !important;
  }

  .chat-window.maximized .simple-feedback-popup {
    width: calc(100vw - 40px) !important;
    margin: 0 !important;
  }

  .simple-feedback-popup-content {
    padding: 20px !important;
  }

  .simple-feedback-submit {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .submit-simple-feedback,
  .cancel-simple-feedback {
    width: 100% !important;
  }
}

/* Welcome Section - With proper line breaks between sections */
#chatWidget .chat-messages .welcome-section,
.agentforce-chat-widget .chat-messages .welcome-section,
.chat-window .chat-messages .welcome-section {
  position: relative !important;
  padding: 32px 32px 24px !important;
  text-align: center !important;
  background: transparent !important;
}

/* Main heading */
#chatWidget .welcome-section h1,
.chat-window .welcome-section h1 {
  font-size: 36px !important;
  font-weight: 500 !important;
  color: #000000 !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em !important;
}

/* Subtitle - "To get the most accurate..." */
#chatWidget .welcome-section .join-text,
.chat-window .welcome-section .join-text {
  color: #5c5a5a !important;
  font-size: 14px !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

/* Main section paragraphs ("Be specific:", "Provide details:") */
#chatWidget .welcome-section .ai-left > p,
.chat-window .welcome-section .ai-left > p {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #5c5a5a !important;
  margin: 0 0 2px 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

/* Bold labels (Be specific:, Provide details:) */
#chatWidget .welcome-section .ai-left p strong,
.chat-window .welcome-section .ai-left p strong {
  font-weight: 700 !important;
  color: #1c1c1c !important;
}

/* Examples paragraphs - NORMAL font style, not italic */
#chatWidget .welcome-section .examples-text,
#chatWidget .welcome-section .ai-left p em,
.chat-window .welcome-section .examples-text,
.chat-window .welcome-section .ai-left p em {
  font-size: 14px !important;
  color: #5c5a5a !important;
  font-style: normal !important;
  line-height: 1.5 !important;
  display: block !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
}

/* First "Provide details:" paragraph - add extra space above for line break */
#chatWidget .welcome-section .ai-left > p:nth-child(3),
.chat-window .welcome-section .ai-left > p:nth-child(3) {
  margin-top: 16px !important;
}

/* Target the second Examples paragraph specifically for bigger gap */
#chatWidget .welcome-section .ai-left p:nth-child(4) em,
#chatWidget .welcome-section .ai-left p em:nth-of-type(2),
.chat-window .welcome-section .ai-left p:nth-child(4) em,
.chat-window .welcome-section .ai-left p em:nth-of-type(2) {
  margin-bottom: 24px !important;
}

/* Closing paragraph - MAXIMUM SPACE with padding AND margin */
#chatWidget .welcome-section .closing-text,
#chatWidget .welcome-section > p:last-child,
#chatWidget .welcome-section .ai-left ~ p,
.chat-window .welcome-section .closing-text,
.chat-window .welcome-section > p:last-child,
.chat-window .welcome-section .ai-left ~ p {
  margin-top: 32px !important; /* INCREASED from 24px to 32px */
  padding-top: 16px !important; /* ADDED padding on top */
  margin-bottom: 0 !important;
  font-size: 14px !important;
  color: #5c5a5a !important;
  line-height: 1.5 !important;
  text-align: left !important;
  display: block !important;
}

/* Extra nuclear option - target any paragraph after .ai-left */
#chatWidget .welcome-section .ai-left + p,
.chat-window .welcome-section .ai-left + p {
  margin-top: 32px !important;
  padding-top: 16px !important;
}

/* NUCLEAR OPTION - Force line break before closing paragraph */
#chatWidget .welcome-section p:last-child {
  margin-top: 16px !important;
  padding-top: 0px !important;
}

.chat-window .welcome-section p:last-child {
  margin-top: 16px !important;
  padding-top: 0px !important;
}

.agentforce-chat-widget .welcome-section p:last-child {
  margin-top: 16px !important;
  padding-top: 0px !important;
}

/* Target by text content - if it contains "Whether" */
#chatWidget .welcome-section p {
  &:last-of-type {
    margin-top: 16px !important;
    padding-top: 0px !important;
  }
}

/* All paragraphs after the ai-left div */
#chatWidget .welcome-section .ai-left ~ * {
  margin-top: 16px !important;
  padding-top: 0px !important;
}

.chat-window .welcome-section .ai-left ~ * {
  margin-top: 16px !important;
  padding-top: 0px !important;
}

/* If it's a direct child */
#chatWidget .welcome-section > p:nth-last-child(1) {
  margin-top: 16px !important;
  padding-top: 0px !important;
}

.chat-window .welcome-section > p:nth-last-child(1) {
  margin-top: 16px !important;
  padding-top: 0px !important;
}

/* Maximum specificity */
.agentforce-chat-widget #chatWidget .chat-window .welcome-section p:last-child {
  margin-top: 16px !important;
  padding-top: 0px !important;
}

/* Enhanced search highlight styling */
.search-highlight {
  background: #ffeb3b !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
  font-weight: 600 !important;
  box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.3) !important;
  transition: background-color 0.2s ease !important;
}

/* Simple fade-in for search results - no stagger delay */
@keyframes searchResultFadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.search-result-message {
  animation: searchResultFadeIn 0.3s ease-out !important;
}

/* Clear Chat Button Styling */
.clear-chat-btn {
  background: none !important;
  white-space: nowrap !important;
  border: 1px solid black !important;
  color: #0a0a0a !important;
  cursor: pointer !important;
  padding: 8px !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 92px !important;
  height: 36px !important;
  font-weight: 600;
}

/* Show text, hide icon in maximized view */
.chat-window.maximized .clear-chat-btn .clear-chat-text,
#chatWidget[data-state="chat-max"] .clear-chat-btn .clear-chat-text {
  display: inline !important;
}

.chat-window.maximized .clear-chat-btn .clear-chat-icon,
#chatWidget[data-state="chat-max"] .clear-chat-btn .clear-chat-icon {
  display: none !important;
}

.chat-window.maximized .clear-chat-btn,
#chatWidget[data-state="chat-max"] .clear-chat-btn {
  width: 92px !important;
  padding: 8px 12px !important;
}

/* Show icon, hide text in minimized view */
.chat-window.active:not(.maximized) .clear-chat-btn .clear-chat-text,
#chatWidget[data-state="chat-min"] .clear-chat-btn .clear-chat-text {
  display: none !important;
}

.chat-window.active:not(.maximized) .clear-chat-btn .clear-chat-icon,
#chatWidget[data-state="chat-min"] .clear-chat-btn .clear-chat-icon {
  display: block !important;
}

.chat-window.active:not(.maximized) .clear-chat-btn,
#chatWidget[data-state="chat-min"] .clear-chat-btn {
  width: 36px !important;
  height: 36px !important;
  padding: 8px !important;
  min-width: 36px !important;
}

.clear-chat-icon {
  width: 18px !important;
  height: 18px !important;
  display: none !important;
}

.clear-chat-btn:hover {
  border: 2px solid rgba(61, 26, 102, 1) !important;
  color: #000000 !important;
  transform: scale(1.05) !important;
}

.clear-chat-btn:active {
  transform: scale(0.95) !important;
}

.clear-chat-btn:hover {
  border: 2px solid rgba(61, 26, 102, 1) !important;
  color: #000000 !important;
  transform: scale(1.05) !important;
}

.clear-chat-btn:active {
  transform: scale(0.95) !important;
}

.clear-chat-btn svg {
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
}

/* Chat header wordmark styling - SMALLER size */
.chat-header-wordmark {
  width: 220px !important;
  height: 36px !important;
  max-width: 220px !important;
  max-height: 36px !important;
  margin-top: -5px !important;
  margin-left: 20px !important;
  flex-shrink: 0 !important;
  object-fit: contain !important;
  display: block !important;
}

/* MINIMIZED window - make wordmark smaller */
#chatWidget[data-state="chat-min"] .chat-header-wordmark,
.chat-window.active:not(.maximized) .chat-header-wordmark {
  width: 140px !important;
  height: 23px !important;
  max-width: 140px !important;
  max-height: 23px !important;
  margin-left: 15px !important;
  margin-top: -3px !important;
}

/* MAXIMIZED window - keep normal size */
#chatWidget[data-state="chat-max"] .chat-header-wordmark,
.chat-window.maximized .chat-header-wordmark {
  width: 220px !important;
  height: 36px !important;
  max-width: 220px !important;
  max-height: 36px !important;
  margin-left: 15px !important;
  margin-top: -5px !important;
}

/* Scale down for smaller screens */
@media (max-width: 1200px) {
  .chat-header-wordmark {
    width: 180px !important;
    height: 30px !important;
    margin-left: 20px !important;
  }
  
  #chatWidget[data-state="chat-min"] .chat-header-wordmark {
    width: 120px !important;
    height: 20px !important;
  }
}

@media (max-width: 768px) {
  .chat-header-wordmark {
    width: 140px !important;
    height: 23px !important;
    margin-left: 15px !important;
  }
  
  #chatWidget[data-state="chat-min"] .chat-header-wordmark {
    width: 100px !important;
    height: 16px !important;
  }
}

/* Hide the old h3 text */
.chat-header-left h3 {
  display: none !important;
}

/* Chat header layout */
.chat-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  flex: 1 !important;
  min-width: 0 !important;
  overflow: visible !important;
}

/* Info icon positioning */
.info-icon {
  margin-left: 0px !important;
  flex-shrink: 0 !important;
  color: #9ca3af !important;
  font-size: 20px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  border-radius: 50% !important;
  padding: 6px !important;
}

/* Reduce gap between header buttons in minimized window */
#chatWidget[data-state="chat-min"] .chat-header-actions,
.chat-window.active:not(.maximized) .chat-header-actions {
  gap: 2px !important; /* Reduced from 4px */
}

/* Optional: Make buttons slightly smaller in minimized view for even more compact look */
#chatWidget[data-state="chat-min"] .btn-icon,
.chat-window.active:not(.maximized) .btn-icon {
  width: 32px !important;
  height: 32px !important;
  padding: 6px !important;
}

#chatWidget[data-state="chat-min"] .btn-icon svg,
#chatWidget[data-state="chat-min"] .btn-icon i,
.chat-window.active:not(.maximized) .btn-icon svg,
.chat-window.active:not(.maximized) .btn-icon i {
  width: 14px !important;
  height: 14px !important;
}

/* ============================================
   Keyword Detection - Block & Escalation Styles
   ============================================ */

/* Disabled Chat Input */
#messageInput.disabled,
#messageInput:disabled,
#messageInput[readonly],
.chat-input.disabled,
.chat-input:disabled {
  background-color: #f5f5f5 !important;
  color: #999 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

/* Disabled Send Button - matches existing pattern */
#sendButton.disabled,
#sendButton:disabled,
.btn-send.go-btn.disabled,
.btn-send.go-btn:disabled,
#initialSendButton.disabled,
#initialSendButton:disabled,
.chat-send-button.disabled,
button[type="submit"].disabled,
button[type="submit"]:disabled {
  background-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  pointer-events: auto !important; /* Essential: Allow hover for native title tooltip on disabled buttons */
  /* Native title tooltip works - no custom CSS needed, matches rest of codebase */
}

/* Escalation Popup Styles - Matching Additional Feedback Style */
.escalation-popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(44, 44, 44, 0.18) !important;
  z-index: 2147483646 !important;
  animation: fadeIn 0.3s ease !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Popup - Default centered */
.escalation-popup {
  position: relative !important;
  z-index: 2147483647 !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 420px !important;
  max-width: 90vw !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Override for minimized window */
.chat-window.active .escalation-popup-overlay,
.chat-window.normal .escalation-popup-overlay,
#chatWindow.active .escalation-popup-overlay,
#chatWindow .escalation-popup-overlay,
.agentforce-chat-widget .chat-window .escalation-popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  transform: none !important;
  margin: 0 !important;
}

/* Popup stays centered in minimized state */
.chat-window.active .escalation-popup,
.chat-window.normal .escalation-popup,
#chatWindow.active .escalation-popup,
#chatWindow .escalation-popup {
  width: 360px !important;
  max-width: 90vw !important;
  margin: 0 !important;
  position: fixed !important;
  left: 30px;
  top: 0;
}

/* MAXIMIZED state - offset positioning */
.chat-window.maximized .escalation-popup-overlay .escalation-popup,
#chatWindow.maximized .escalation-popup-overlay .escalation-popup {
  width: 380px !important;
  margin-right: 740px !important;
  margin-bottom: 150px !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
}

.escalation-popup-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 24px 28px 20px !important;
  border-bottom: 1px solid #f1f3f4 !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.escalation-popup-header h3 {
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  letter-spacing: -0.01em !important;
}

.close-escalation-popup {
  background: none !important;
  border: none !important;
  font-size: 24px !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  padding: 8px !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

.close-escalation-popup:hover {
  background: rgba(61, 26, 102, 1) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
}

.escalation-popup-content {
  padding: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
}

.escalation-popup-description {
  margin-bottom: 8px !important;
}

.escalation-popup-description p {
  margin: 0 !important;
  color: #6b7280 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

.escalation-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

.escalation-form-group {
  display: flex !important;
  flex-direction: column !important;
}

.escalation-form-group input,
.escalation-form-group textarea {
  width: 100% !important;
  padding: 16px 20px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  resize: vertical !important;
  color: #374151 !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
}

.escalation-form-group textarea {
  min-height: 120px !important;
  resize: none !important;
}

.escalation-form-group input:focus,
.escalation-form-group textarea:focus {
  outline: none !important;
  border-color: rgba(61, 26, 102, 1) !important;
  background: #fefefe !important;
}

.escalation-form-group input::placeholder,
.escalation-form-group textarea::placeholder {
  color: #9ca3af !important;
  font-style: italic !important;
}

.escalation-form-actions {
  display: flex !important;
  gap: 16px !important;
  justify-content: flex-end !important;
  margin-top: 12px !important;
}

.escalation-submit-btn,
.escalation-cancel-btn {
  padding: 14px 28px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  border: none !important;
}

.escalation-submit-btn {
  background: linear-gradient(135deg, #000000 0%, #000000 100%) !important;
  color: #ffffff !important;
}

.escalation-submit-btn:hover:not(:disabled) {
  background: rgba(61, 26, 102, 1) !important;
  transform: translateY(-2px) !important;
}

.escalation-submit-btn:active:not(:disabled) {
  transform: translateY(0) !important;
}

.escalation-submit-btn:disabled {
  background: #9ca3af !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.escalation-cancel-btn {
  background: #ffffff !important;
  color: #6b7280 !important;
  border: 2px solid #e5e7eb !important;
}

.escalation-cancel-btn:hover {
  border-color: rgba(61, 26, 102, 1) !important;
  background: #f9fafb !important;
  color: #374151 !important;
}

.escalation-form-message {
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-family: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

.escalation-form-message.success {
  background: #d4edda !important;
  color: #155724 !important;
  border: 2px solid #c3e6cb !important;
}

.escalation-form-message.error {
  background: #f8d7da !important;
  color: #721c24 !important;
  border: 2px solid #f5c6cb !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .escalation-popup {
    width: calc(100vw - 40px) !important;
    max-width: 420px !important;
    margin: 0 !important;
  }

  .chat-window.maximized .escalation-popup {
    width: calc(100vw - 40px) !important;
    margin: 0 !important;
  }

  .escalation-popup-content {
    padding: 20px !important;
  }

  .escalation-form-actions {
    flex-direction: column !important;
    gap: 12px !important;
  }
}
