@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap);
/**
* Revenue Expert Chatbot - Optimized CSS
* STRATEGY: High-specificity selectors with a consolidated universal reset.
* All styles are nested under .reveg-chatbot-root. A universal reset (*)
* within this scope removes massive code duplication, making the file
* smaller and more maintainable without sacrificing style isolation.
*/

/* ==========================================================================
 COMPREHENSIVE COLOR SYSTEM - Consolidates all repeated values
========================================================================== */

:root {
/* Primary Brand Colors */
--primary: #4a8edb;
--primary-hover: #3a7bd5;
--primary-light: rgba(74, 142, 219, 0.1);
--primary-shadow: rgba(74, 142, 219, 0.2);
--primary-border: rgba(74, 142, 219, 0.3);
--primary-bg-light: rgba(74, 142, 219, 0.05);

/* Grayscale System */
--white: #ffffff;
--gray-50: #f9fafb;
--gray-100: #f3f4f6;
--gray-200: #e5e7eb;
--gray-300: #d1d5db;
--gray-400: #9ca3af;
--gray-500: #6b7280;
--gray-600: #4b5563;
--gray-700: #374151;
--gray-800: #1f2937;
--gray-900: #111827;

/* Semantic Colors */
--success: #22c55e;
--success-light: rgba(34, 197, 94, 0.1);
--success-hover: #16a34a;
--error: #ef4444;
--error-light: rgba(239, 68, 68, 0.1);
--warning: #f59e0b;

/* Background Colors */
--bg-primary: #ffffff;
--bg-secondary: #f8fafc;
--bg-tertiary: #f1f5f9;
--bg-muted: #f1f3f4;

/* Border Colors */
--border-light: #e5e7eb;
--border-medium: #d1d5db;
--border-focus: #3b82f6;

/* Text Colors */
--text-primary: #1a202c;
--text-secondary: #374151;
--text-muted: #6b7280;
--text-light: #9ca3af;
--text-inverse: #ffffff;

/* Shadow System */
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
--shadow-primary: 0 4px 20px rgba(74, 142, 219, 0.4);
--shadow-primary-lg: 0 8px 25px rgba(74, 142, 219, 0.15);

/* Backdrop & Overlay */
--backdrop: rgba(0, 0, 0, 0.5);
--overlay-light: rgba(255, 255, 255, 0.1);
--overlay-medium: rgba(255, 255, 255, 0.2);

/* Chart & Data Colors */
--chart-bg: #ffffff;
--chart-border: #e1e8ed;
--chart-header: #0a1f2f;
--table-header: var(--gray-100);
--table-hover: #f7fafc;

/* Status Colors */
--status-online: #10b981;
--status-dot: #22c55e;
}

/* ==========================================================================
 CORE RESET & ISOLATION
========================================================================== */

.reveg-chatbot-root {
 /* --- Style Isolation Boundary --- */
isolation: isolate !important;
position: relative !important;
z-index: 99 !important;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
font-size: 15px !important;
line-height: 1.5 !important;
color: var(--text-secondary) !important;
direction: ltr !important;
text-align: left !important;
box-sizing: border-box !important;
font-weight: normal !important;
font-style: normal !important;
text-transform: none !important;
letter-spacing: normal !important;
word-spacing: normal !important;
white-space: normal !important;
vertical-align: baseline !important;
overflow: visible !important;
display: block !important;
}

/*
  CONSOLIDATED UNIVERSAL RESET: Applied within the chatbot scope.
  This removes the need to manually reset properties like margin, padding,
  and border on individual elements, drastically reducing code repetition.
*/
.reveg-chatbot-root *,
.reveg-chatbot-root *::before,
.reveg-chatbot-root *::after {
  box-sizing: inherit;
  font: inherit;
  color: inherit;
  text-align: inherit;
  vertical-align: baseline;
  background-repeat: no-repeat;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  text-decoration: none;
}

/* Essential element defaults */
.reveg-chatbot-root button {
  cursor: pointer;
  user-select: none;
}

.reveg-chatbot-root input,
.reveg-chatbot-root textarea {
  user-select: text;
  resize: none;
  outline: none;
}

.reveg-chatbot-root img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.reveg-chatbot-root ul,
.reveg-chatbot-root ol {
    list-style: none;
}

.reveg-chatbot-root table {
    border-collapse: separate;
    border-spacing: 0;
}

/* ==========================================================================
 BUBBLE CHAT WIDGET - FLOATING MODE
========================================================================== */

/* Shortcode container */
.reveg-chatbot-root [data-reveg-chatbot="true"] {
position: relative;
width: auto;
height: auto;
display: block;
}

/* Widget container */
.reveg-chatbot-root .reveg-chatbot-widget {
position: fixed;
bottom: 24px;
right: 24px;
z-index: 99;
pointer-events: auto;
display: block;
width: auto;
height: auto;
max-width: none;
max-height: none;
overflow: visible;
}

/* Trigger button */
.reveg-chatbot-root .reveg-chatbot-trigger {
width: 60px;
height: 60px;
border-radius: 50%;
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
color: white;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 20px rgba(74, 142, 219, 0.4);
font-size: 0;
position: relative;
overflow: hidden;
}

.reveg-chatbot-root .reveg-chatbot-trigger:hover {
transform: scale(1.1);
box-shadow: 0 6px 30px rgba(74, 142, 219, 0.5);
}

.reveg-chatbot-root .reveg-chatbot-trigger:active {
transform: scale(0.95);
}

/* Chat container */
.reveg-chatbot-root .reveg-chatbot-container {
position: fixed;
bottom: 100px;
right: 24px;
width: 380px;
height: 600px;
background: var(--bg-primary);
border-radius: 16px;
box-shadow: var(--shadow-xl);
border: 1px solid var(--border-light);
display: none;
flex-direction: column;
overflow: hidden;
z-index: 98;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveg-chatbot-root .reveg-chatbot-container.is-open {
display: flex;
animation: chatOpen 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ==========================================================================
 CHAT HEADER
========================================================================== */

.reveg-chatbot-root .reveg-chatbot-header {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
color: var(--text-inverse);
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid var(--overlay-medium);
box-shadow: var(--shadow-sm);
flex-shrink: 0;
position: relative;
}

.reveg-chatbot-root .reveg-chatbot-header-content {
display: flex;
align-items: center;
gap: 12px;
}

.reveg-chatbot-root .reveg-chatbot-avatar {
width: 40px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
flex-shrink: 0;
}

.reveg-chatbot-root .reveg-chatbot-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}

.reveg-chatbot-root .reveg-chatbot-header-text h3 {
font-size: 16px;
font-weight: 600;
color: var(--text-inverse);
line-height: 1.2;
}

.reveg-chatbot-root .reveg-chatbot-status {
font-size: 12px;
display: flex;
align-items: center;
gap: 4px;
margin-top: 4px;
color: var(--text-inverse);
line-height: 1.2;
}

.reveg-chatbot-root .reveg-chatbot-status-dot {
width: 8px;
height: 8px;
background: var(--status-online);
border-radius: 50%;
display: block;
flex-shrink: 0;
animation: pulse 2s infinite;
}

@keyframes pulse {
0%, 100% {
 opacity: 1;
}
50% {
 opacity: 0.5;
}
}

@keyframes spin {
from {
 transform: rotate(0deg);
}
to {
 transform: rotate(360deg);
}
}

.reveg-chatbot-root .reveg-chatbot-header-actions {
display: flex;
align-items: center;
gap: 8px;
}

.reveg-chatbot-root .reveg-chatbot-header-button {
width: 32px;
height: 32px;
border-radius: 6px;
background: var(--overlay-light);
color: var(--text-inverse);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background-color 0.2s ease;
font-size: 0;
}

.reveg-chatbot-root .reveg-chatbot-header-button:hover {
background: var(--overlay-medium);
}

/* ==========================================================================
 MESSAGES AREA
========================================================================== */

.reveg-chatbot-root .reveg-chatbot-messages {
flex: 1;
overflow-y: auto;
padding: 16px;
background: var(--bg-primary);
}

/* ==========================================================================
 CLEAN MESSAGE ARCHITECTURE
========================================================================== */

.reveg-chatbot-root .chat-message {
display: flex;
align-items: flex-end;
gap: 8px;
margin-bottom: 16px;
max-width: 100%;
}

.reveg-chatbot-root .chat-message.user {
flex-direction: row-reverse;
}

.reveg-chatbot-root .chat-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--bg-primary);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
box-shadow: var(--shadow-sm);
}

.reveg-chatbot-root .chat-avatar-icon {
width: 20px;
height: 20px;
color: var(--primary);
display: block;
}

.reveg-chatbot-root .chat-avatar-icon.error {
color: #FF3B30;
}

.reveg-chatbot-root .chat-content {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
max-width: 100%;
flex-shrink: 1;
position: relative;
}

.reveg-chatbot-root .chat-message.user .chat-content {
padding-bottom: 4px;
margin-bottom: -4px;
}

.reveg-chatbot-root .chat-message.user .chat-content {
align-items: flex-end;
}

.reveg-chatbot-root .chat-message.bot .chat-content {
align-items: flex-start;
}

.reveg-chatbot-root .chat-bubble {
display: inline-block;
width: auto;
max-width: 500px;
min-width: 0;
background: var(--bg-primary);
color: var(--text-secondary);
padding: 7px 14px;
border-radius: 18px;
font-size: 15px;
line-height: 1.5;
font-weight: normal;
word-wrap: break-word;
overflow-wrap: break-word;
white-space: pre-wrap;
hyphens: none;
}

/* Proper paragraph spacing within chat bubbles */
.reveg-chatbot-root .chat-bubble p {
margin: 0 0 12px 0 !important;
padding: 0 !important;
}

.reveg-chatbot-root .chat-bubble p:last-child {
margin-bottom: 0 !important;
}

/* Proper paragraph spacing for fullscreen mode text */
.reveg-chatbot-root .chat-text-plain p {
margin: 0 0 12px 0 !important;
padding: 0 !important;
}

.reveg-chatbot-root .chat-text-plain p:last-child {
margin-bottom: 0 !important;
}

.reveg-chatbot-root .chat-message.user .chat-bubble {
background: var(--gray-100);
color: var(--text-secondary);
border-radius: 18px;
}

/* Data Availability Disclaimers - Modern styling */
.reveg-chatbot-root .data-disclaimer {

border: 1px solid #e5e7eb !important;
border-radius: 8px !important;
padding: 12px 16px !important;
padding-left: 44px !important;
margin: 12px 0 !important;
font-size: 14px !important;
line-height: 1.5 !important;
color: #4b5563 !important;
position: relative !important;
display: flex !important;
align-items: flex-start !important;
}

.reveg-chatbot-root .data-disclaimer svg {
position: absolute !important;
left: 16px !important;
top: 12px !important;
width: 18px !important;
height: 18px !important;
color: #6b7280 !important;
flex-shrink: 0 !important;
}

/* Ensure disclaimers in bot messages have proper styling */
.reveg-chatbot-root .chat-message.bot .data-disclaimer {
background: none !important;
border-color: #e0e0e0;
font-size: 12px !important;
margin-bottom: 0 !important;
}

/* Markdown formatting in chat messages */
.reveg-chatbot-root .chat-message.bot strong,
.reveg-chatbot-root .chat-message.bot b {
font-weight: 600 !important;
color: inherit !important;
}

.reveg-chatbot-root .chat-message.bot em,
.reveg-chatbot-root .chat-message.bot i {
font-style: italic !important;
}

.reveg-chatbot-root .chat-message.bot p {
margin: 0 0 12px 0 !important;
line-height: 1.5 !important;
}

.reveg-chatbot-root .chat-message.bot p:last-child {
margin-bottom: 0 !important;
}

.reveg-chatbot-root .chat-message.bot h1,
.reveg-chatbot-root .chat-message.bot h2,
.reveg-chatbot-root .chat-message.bot h3,
.reveg-chatbot-root .chat-message.bot h4,
.reveg-chatbot-root .chat-message.bot h5,
.reveg-chatbot-root .chat-message.bot h6 {
font-weight: 600 !important;
margin: 12px 0 12px 0 !important;
line-height: 1.3 !important;
color: inherit !important;
}

.reveg-chatbot-root .chat-message.bot h1:first-child,
.reveg-chatbot-root .chat-message.bot h2:first-child,
.reveg-chatbot-root .chat-message.bot h3:first-child,
.reveg-chatbot-root .chat-message.bot h4:first-child,
.reveg-chatbot-root .chat-message.bot h5:first-child,
.reveg-chatbot-root .chat-message.bot h6:first-child {
margin-top: 0 !important;
}

/* Dark mode support if needed */
@media (prefers-color-scheme: dark) {
  .reveg-chatbot-root .data-disclaimer {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
  }
}

/* Chat list styling for markdown lists */
.reveg-chatbot-root .chat-list {
list-style: none !important;
padding: 0 !important;
margin: 12px 0 !important;
counter-reset: list-counter !important;
}

.reveg-chatbot-root .chat-list-item {
position: relative !important;
padding-left: 32px !important;
margin: 4px 0 !important;
line-height: 1.5 !important;
counter-increment: list-counter !important;
}

/* Bullet lists */
.reveg-chatbot-root ul.chat-list .chat-list-item::before {
content: "•" !important;
position: absolute !important;
left: 12px !important;
color: var(--primary-color) !important;
font-weight: bold !important;
}

/* Numbered lists */
.reveg-chatbot-root ol.chat-list-numbered {
list-style: none !important;
counter-reset: list-counter !important;
}

.reveg-chatbot-root ol.chat-list-numbered li {
position: relative !important;
padding-left: 32px !important;
margin: 4px 0 !important;
line-height: 1.5 !important;
counter-increment: list-counter !important;
}

.reveg-chatbot-root ol.chat-list-numbered li::before {
content: counter(list-counter) "." !important;
position: absolute !important;
left: 8px !important;
color: var(--text-color) !important;
font-weight: 600 !important;
}

/* Ensure lists in bot messages look good */
.reveg-chatbot-root .chat-bubble ul.chat-list {
margin: 12px 0;
}

.reveg-chatbot-root .chat-bubble ul.chat-list:first-child {
margin-top: 0;
}

.reveg-chatbot-root .chat-bubble ul.chat-list:last-child {
margin-bottom: 0;
}

.reveg-chatbot-root .chat-actions {
margin-top: 4px;
padding: 0 4px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
white-space: nowrap;
overflow: visible;
}

.reveg-chatbot-root .chat-feedback-controls {
display: flex;
align-items: center;
gap: 4px;
}

.reveg-chatbot-root .chat-sources-controls {
display: flex;
align-items: center;
}

.reveg-chatbot-root .chat-feedback-button {
padding: 2px;
cursor: pointer;
opacity: 0.6;
transition: all 0.2s ease;
border-radius: 4px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
font-size: 0;
position: relative;
z-index: 1;
}

.reveg-chatbot-root .chat-feedback-button:hover {
opacity: 1;
background: rgba(0, 0, 0, 0.05);
transform: scale(1.1);
}

.reveg-chatbot-root .chat-feedback-button:disabled {
opacity: 0.3;
cursor: not-allowed;
transform: none;
}

.reveg-chatbot-root .chat-feedback-button.active {
opacity: 1;
transform: scale(1.1);
}

.reveg-chatbot-root .chat-feedback-button.active.thumbs-up {
background: rgba(34, 197, 94, 0.1);
}

.reveg-chatbot-root .chat-feedback-button.active.thumbs-up .chat-feedback-icon {
color: #22c55e;
}

.reveg-chatbot-root .chat-feedback-button.active.thumbs-down {
background: rgba(239, 68, 68, 0.1);
}

.reveg-chatbot-root .chat-feedback-button.active.thumbs-down .chat-feedback-icon {
color: #ef4444;
}

.reveg-chatbot-root .chat-feedback-button.active.copy-success {
background: rgba(34, 197, 94, 0.1);
}

.reveg-chatbot-root .chat-feedback-button.active.copy-success .chat-feedback-icon {
color: #22c55e;
}

.reveg-chatbot-root .chat-feedback-icon {
width: 20px;
height: 20px;
color: #6b7280;
}

.reveg-chatbot-root .chat-feedback-button:hover .chat-feedback-icon {
color: #4a8edb;
}

.reveg-chatbot-root .chat-feedback-button:disabled .chat-feedback-icon {
color: #ccc;
}

/* Typing indicator */
.reveg-chatbot-root .chat-message.typing .chat-typing {
display: flex;
align-items: center;
gap: 4px;
padding: 12px 16px;
}

.reveg-chatbot-root .chat-typing-dot {
width: 9px;
height: 9px;
background: #999;
border-radius: 50%;
animation: chat-typing-pulse 1.5s ease-in-out infinite;
}

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

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

@keyframes chat-typing-pulse {
0%, 60%, 100% {
 opacity: 0.3;
 transform: scale(1);
}
30% {
 opacity: 1;
 transform: scale(1.2);
}
}

/* ==========================================================================
 INPUT AREA
 ========================================================================== */

.reveg-chatbot-root .reveg-chatbot-input-area {
padding: 16px;
border-top: 1px solid var(--border-light);
background: var(--bg-muted);
flex-shrink: 0;
}

.reveg-chatbot-root .reveg-chatbot-input-wrapper {
display: flex;
align-items: center;
background: var(--bg-primary);
border: 1px solid var(--border-light);
border-radius: 24px;
padding: 20px 24px;
box-shadow: var(--shadow-sm);
width: 100%;
margin: 0 auto;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reveg-chatbot-root .reveg-chatbot-input-wrapper:focus-within {
/* No active state styling */
}

.reveg-chatbot-root .reveg-chatbot-input {
flex: 1;
font-size: 16px;
line-height: 1.5;
height: auto;
min-height: 36px;
max-height: 120px;
padding: 4px 8px;
overflow: hidden;
word-wrap: break-word;
color: var(--text-secondary);
font-weight: 400;
}

.reveg-chatbot-root .reveg-chatbot-input::placeholder {
color: var(--text-light);
opacity: 1;
font-size: 16px;
}

.reveg-chatbot-root .reveg-chatbot-send-button {
width: 28px;
height: 28px;
background: var(--primary);
color: var(--text-inverse);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.2s ease;
margin-left: 8px;
font-size: 0;
flex-shrink: 0;
}

.reveg-chatbot-root .reveg-chatbot-send-button:hover {
background: var(--primary-hover);
transform: scale(1.05);
}

.reveg-chatbot-root .reveg-chatbot-send-button:disabled {
background: var(--gray-300);
cursor: not-allowed;
}

/* ==========================================================================
 SUGGESTIONS
 ========================================================================== */

.reveg-chatbot-root .reveg-chatbot-suggestions {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 12px;
}

.reveg-chatbot-root .reveg-chatbot-suggestion {
padding: 8px 12px;
background: #f5f5f5;
border: 1px solid #e5e5e5;
border-radius: 16px;
font-size: 14px;
color: #333;
cursor: pointer;
transition: all 0.2s ease;
display: inline-block;
line-height: 1.3;
text-align: center;
}

.reveg-chatbot-root .reveg-chatbot-suggestion:hover {
background: var(--primary);
color: white;
border-color: var(--primary);
}

/* Suggestion Cards */
.reveg-chatbot-root .reveg-chatbot-suggestions-container {
margin-bottom: 20px;
}

.reveg-chatbot-root .reveg-chatbot-suggestions-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
padding: 0 4px;
}

.reveg-chatbot-root .reveg-chatbot-suggestions-header-icon {
width: 16px;
height: 16px;
color: var(--primary);
flex-shrink: 0;
display: block;
}

.reveg-chatbot-root .reveg-chatbot-suggestions-title {
font-size: 14px;
font-weight: 600;
color: #374151;
line-height: 1.3;
}

.reveg-chatbot-root .reveg-chatbot-suggestions-list {
display: flex;
flex-direction: column;
gap: 8px;
}

.reveg-chatbot-root .reveg-chatbot-suggestion-card {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background-color: white;
border: 1px solid #e5e7eb;
border-radius: 12px;
color: #374151;
font-size: 14px;
line-height: 1.4;
text-align: left;
cursor: pointer;
transition: all 0.2s ease;
width: 100%;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
position: relative;
z-index: 1;
min-height: 48px;
}

.reveg-chatbot-root .reveg-chatbot-suggestion-card:hover {
background-color: #f8fafc;
border-color: var(--primary);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 0 0 1px var(--primary-light);
}

.reveg-chatbot-root .reveg-chatbot-suggestion-icon-wrapper {
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
flex-shrink: 0;
}

.reveg-chatbot-root .reveg-chatbot-suggestion-icon {
width: 18px;
height: 18px;
color: var(--primary);
transition: color 0.2s ease;
display: block;
}

.reveg-chatbot-root .reveg-chatbot-suggestion-card:hover .reveg-chatbot-suggestion-icon {
color: #4a8edb;
}

.reveg-chatbot-root .reveg-chatbot-suggestion-text {
flex: 1;
font-weight: 500;
}

.reveg-chatbot-root .reveg-chatbot-suggestion-arrow {
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
flex-shrink: 0;
}

.reveg-chatbot-root .reveg-chatbot-suggestion-arrow-icon {
width: 14px;
height: 14px;
color: #6b7280;
transition: all 0.2s ease;
display: block;
}

.reveg-chatbot-root .reveg-chatbot-suggestion-card:hover .reveg-chatbot-suggestion-arrow-icon {
color: #4a8edb;
}

/* ==========================================================================
 CLARIFICATION OPTIONS
 ========================================================================== */

.reveg-chatbot-root .clarification-options-wrapper {
margin: 8px 0 16px 44px;
display: block;
}

.reveg-chatbot-root .clarification-options {
display: block;
width: 100%;
}

.reveg-chatbot-root .clarification-options-container {
display: flex;
flex-direction: column;
gap: 10px;
width: fit-content;
align-items: flex-start;
}

.reveg-chatbot-root .clarification-option-button {
background: #f8fafc;
border: 1.5px solid #4a8edb;
border-radius: 12px;
padding: 12px 16px;
text-align: left;
cursor: pointer;
transition: all 0.2s ease;
font-size: 13px;
line-height: 1.5;
color: #1f2937;
width: fit-content;
display: inline-block;
font-weight: 400;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
position: relative;
transform: translateY(-1px);
white-space: normal;
word-wrap: break-word;
}

.reveg-chatbot-root .clarification-option-button:hover {
background: #ffffff;
border-color: #4a8edb;
color: #111827;
box-shadow: 0 8px 20px rgba(74, 142, 219, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08);
transform: translateY(-2px);
}

.reveg-chatbot-root .clarification-option-button:active {
transform: translateY(1px);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
 ICONS
========================================================================== */

.reveg-chatbot-root .reveg-chatbot-trigger-icon {
width: 24px;
height: 24px;
display: block;
color: white;
}

.reveg-chatbot-root .reveg-chatbot-avatar-icon {
width: 20px;
height: 20px;
display: block;
color: white;
}

.reveg-chatbot-root .reveg-chatbot-header-button-icon {
width: 16px;
height: 16px;
display: block;
color: white;
}

.reveg-chatbot-root .reveg-chatbot-send-button-icon {
width: 12px;
height: 12px;
display: block;
color: white;
transform: rotate(-90deg);
}

/* ==========================================================================
 HERO FLOAT MODE - Floating Card with Expansion
 ========================================================================== */

.reveg-chatbot-root .reveg-chatbot-hero-float-container {
display: flex;
justify-content: center;
align-items: center;
padding: 24px;
position: relative;
width: 100%;
min-height: 200px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-card {
width: 100%;
max-width: 860px;
position: relative;
overflow: visible;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveg-chatbot-root .reveg-chatbot-hero-float-card.expanded {
height: 500px;
max-height: 500px;
background: white;
border: 1px solid #e0e0e0;
border-radius: 16px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.reveg-chatbot-root .reveg-chatbot-hero-float-compact {
display: flex;
flex-direction: column;
gap: 2px;
height: auto;
align-items: center;
}

/* Minimal Input Section */
.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal {
display: flex;
flex-direction: column;
width: 100%;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-input-wrapper {
position: relative;
display: flex;
flex-direction: column;
align-items: stretch;
background: white;
border: 1px solid #e5e7eb;
border-radius: 16px;
padding: 16px 20px;
transition: all 0.2s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
width: 100%;
max-width: 860px;
min-height: 124px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-input-wrapper:focus-within {
/* No active state styling */
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-minimal {
flex: 1;
padding-bottom: 12px;
font-size: 16px;
line-height: 24px;
color: #000000;
max-height: 120px;
overflow-y: hidden; /* Hide scrollbar initially */
font-weight: 400;
display: block;
align-self: flex-start;
width: 100%;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-minimal::placeholder {
color: #94a3b8;
opacity: 1;
font-size: 16px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-minimal:focus {
background-color: transparent !important;
outline: none !important;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-button-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
width: 100%;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-data-button {
display: flex !important;
align-items: center !important;
gap: 6px !important;
padding: 8px 12px !important;
background: #fff !important;
border: 1px solid #e2e8f0 !important;
border-radius: 20px !important;
color: #475569 !important;
font-size: 13px !important;
font-weight: 500 !important;
cursor: pointer !important;
transition: all 0.2s ease !important;
white-space: nowrap !important;
flex-shrink: 0 !important;
height: 32px !important;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-data-button:hover {
background: #f1f5f9 !important;
border-color: var(--primary) !important;
color: var(--primary) !important;
box-shadow: 0 2px 8px rgba(74, 142, 219, 0.15) !important;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-data-icon {
width: 14px !important;
height: 14px !important;
color: currentColor !important;
flex-shrink: 0 !important;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-button {
position: relative;
width: 32px;
height: 32px;
background: var(--primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
flex-shrink: 0;
aspect-ratio: 1 / 1;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-button:hover:not(:disabled) {
background: var(--primary);
transform: scale(1.05);
box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-button:disabled {
background: #e9ecef;
cursor: not-allowed;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-icon {
width: 16px;
height: 16px;
color: white;
display: block;
transform: rotate(-90deg);
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-button:disabled .reveg-chatbot-hero-float-send-icon {
color: #9ca3af;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-spinner {
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-spinner .animate-spin {
animation: spin 1s linear infinite;
}

/* Hero Float Suggestion Chips */
.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chips {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
gap: 12px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chip {
background: white;
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 16px 20px;
font-size: 14px;
color: #334155;
cursor: pointer;
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
line-height: 1.5;
white-space: normal;
font-weight: 500;
text-align: left;
position: relative;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
display: flex;
align-items: flex-start;
gap: 12px;
width: 100%;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chip::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
opacity: 0;
transition: opacity 0.15s ease;
z-index: 0;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chip:hover {
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border-color: var(--primary);
color: #1e293b;
box-shadow: 0 4px 15px var(--primary-light), 0 2px 8px rgba(0, 0, 0, 0.08);
transform: translateY(-1px);
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chip:hover::before {
opacity: 1;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chip:active {
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
transform: translateY(0);
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-icon-wrapper {
flex-shrink: 0;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 1;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-icon {
width: 20px;
height: 20px;
color: #4a8edb;
flex-shrink: 0;
transition: color 0.15s ease;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chip:hover .reveg-chatbot-hero-float-suggestion-icon {
color: var(--primary);
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-text {
flex: 1;
position: relative;
z-index: 1;
word-wrap: break-word;
}

/* ==========================================================================
 CHART STYLING - Dedicated chart containers separate from table styling
========================================================================== */

.reveg-chatbot-root .chart-container {
width: 100% !important;
overflow: visible;
max-width: 100% !important;
margin: 20px 0 5px 0;
}

.reveg-chatbot-root .chart-container.fullscreen {
min-height: 550px;
width: 100% !important;
min-width: 100% !important;
max-width: 100% !important;
}

.reveg-chatbot-root .chart-container.compact {
min-height: 430px;
width: 100% !important;
}

/* Chart wrapper - main container for chart content */
.reveg-chatbot-root .chart-wrapper {
width: 100% !important;
overflow: visible !important;
/* Ensure tooltips can overflow beyond chart boundaries */
position: relative;
z-index: 1;
}

/* FULLSCREEN CHART OVERRIDE - Allow charts to use full width in fullscreen mode */
.reveg-chatbot-root .chat-fullscreen-container .chart-container,
.reveg-chatbot-root .chat-fullscreen-container .chart-wrapper,
.reveg-chatbot-root .chat-fullscreen-container .chart-exporter {
max-width: none !important;
width: 100% !important;
}

/* Override the message container constraints for charts in fullscreen */
.reveg-chatbot-root .chat-fullscreen-container .chat-message.has-chart {
max-width: none !important;
width: 100% !important;
}

.reveg-chatbot-root .chat-fullscreen-container .chat-message.has-chart .chat-content {
max-width: none !important;
width: 100% !important;
}

.reveg-chatbot-root .chart-wrapper h4 {
font-size: 20px;
font-weight: 700;
color: #1a202c;
margin: 0 0 20px 0;
padding: 0;
line-height: 1.3;
letter-spacing: -0.025em;
text-align: left;
}

/* Chart content container - holds the actual chart */
.reveg-chatbot-root .chart-content-container {
padding: 0;
background: #ffffff;
overflow: visible !important;
padding: 30px 17px 20px 5px;
position: relative;
font-size: 13px; /* Set base font size for chart text */
width: 100% !important;
border: 1px solid rgb(225, 232, 237);
border-radius: 8px;
margin-bottom: 8px;
/* Ensure tooltips can overflow beyond boundaries */
z-index: 1;
}

.reveg-chatbot-root .chart-container.fullscreen .chart-content-container {
padding: 24px 0px 0px 0px;
overflow: visible !important;
font-size: 13px; /* Ensure fullscreen charts also use 13px */
width: 100% !important;
/* Ensure tooltips can overflow beyond boundaries */
z-index: 1;
}

/* Override any inherited font sizes for SVG text elements in charts */
.reveg-chatbot-root .chart-content-container svg text {
font-size: 11px !important;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

/* Specific targeting for Recharts text elements */
.reveg-chatbot-root .recharts-text,
.reveg-chatbot-root .recharts-cartesian-axis-tick-value,
.reveg-chatbot-root .recharts-cartesian-axis-tick text {
font-size: 13px !important;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

/* Chart exporter - ensure 100% width */
.reveg-chatbot-root .chart-exporter {
width: 100% !important;
overflow: visible !important;
position: relative;
}

/* Mobile chart containers - always 100% width, no overflow */
@media (max-width: 768px) {
.reveg-chatbot-root .chart-container,
.reveg-chatbot-root .chart-wrapper,
.reveg-chatbot-root .chart-exporter {
width: 100% !important;
min-width: 100% !important;
max-width: 100% !important;
overflow: hidden !important;
}

.reveg-chatbot-root .chart-container.fullscreen {
min-width: 100% !important;
max-width: 100% !important;
}

.reveg-chatbot-root .chart-container.compact {
min-width: 100% !important;
max-width: 100% !important;
}

.reveg-chatbot-root .chart-content-container {
padding: 20px 5px 5px 5px;
overflow: visible !important;
width: 100% !important;
max-width: 100% !important;
margin-bottom: 6px !important;
}

.reveg-chatbot-root .chart-container.fullscreen .chart-content-container {
padding: 16px 12px 0px 12px;
overflow: visible !important;
width: 100% !important;
max-width: 100% !important;
}
}

/* Remove duplicate chart-container definition */

.reveg-chatbot-root .chart-header {
padding: 16px 20px 12px 20px;
display: flex;
justify-content: space-between;
align-items: center;
min-height: 60px;
}

.reveg-chatbot-root .chart-container.fullscreen .chart-header {
padding: 20px 32px 16px 32px;
height: 72px;
}

.reveg-chatbot-root .chart-title {
font-size: 16px;
font-weight: 600;
color: #1a202c;
line-height: 1.4;
}

.reveg-chatbot-root .chart-container.fullscreen .chart-title {
font-size: 18px;
}

.reveg-chatbot-root .chart-header-actions {
display: flex;
align-items: center;
gap: 8px;
height: 32px;
}

.reveg-chatbot-root .chart-action-button {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 12px;
background: white;
border: 1px solid #e2e8f0;
border-radius: 8px;
color: #475569;
font-size: 13px;
font-weight: 500;
cursor: pointer;
min-height: 30px;
user-select: none;
position: relative;
overflow: hidden;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .chart-action-button:hover:not(:disabled) {
background: #f8fafc;
border-color: #4a8edb;
color: #4a8edb;
box-shadow: 0 2px 8px rgba(74, 142, 219, 0.15);
}

.reveg-chatbot-root .chart-action-button:disabled {
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
}

.reveg-chatbot-root .chart-action-button svg {
width: 14px;
height: 14px;
flex-shrink: 0;
stroke-width: 2;
transition: transform 0.15s ease;
}

.reveg-chatbot-root .chart-action-button:hover:not(:disabled) svg {
transform: scale(1.1);
}

.reveg-chatbot-root .chart-content {
padding: 8px 16px 4px 16px;
background: #ffffff;
overflow: visible;
}

.reveg-chatbot-root .chart-container.fullscreen .chart-content {
padding: 24px 0px 0px 0px;
overflow: visible;
}

/* Mobile chart content - ensure no horizontal overflow */
@media (max-width: 768px) {
.reveg-chatbot-root .chart-content {
padding: 8px 12px 4px 12px;
overflow: hidden !important;
width: 100% !important;
max-width: 100% !important;
}

.reveg-chatbot-root .chart-container.fullscreen .chart-content {
padding: 16px 12px 0px 12px;
overflow: hidden !important;
width: 100% !important;
max-width: 100% !important;
}
}

.reveg-chatbot-root .chart-error {
padding: 20px;
text-align: center;
color: #ef4444;
font-size: 14px;
background: #fef2f2;
border-radius: 6px;
margin: 16px;
}

/* Chart tooltip styling */
.reveg-chatbot-root .chart-tooltip {
background: rgba(0, 0, 0, 0.8);
color: white;
padding: 8px 12px;
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
font-size: 12px;
line-height: 1.4;
}

.reveg-chatbot-root .chart-cursor-tooltip {
position: absolute;
z-index: 9999 !important;
pointer-events: none;
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
transform: translate(-50%, -100%);
/* Allow tooltip to overflow beyond chart boundaries */
overflow: visible !important;
white-space: nowrap;
/* Prevent clipping by parent containers */
clip: auto !important;
}

.reveg-chatbot-root .chart-cursor-tooltip-content {
background: rgba(17, 24, 39, 0.97);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
color: white;
padding: 20px 24px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.15);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.2);
font-size: 15px;
line-height: 1.4;
min-width: 220px;
text-align: center;
white-space: nowrap;
min-height: 60px;
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
overflow: hidden;
}

.reveg-chatbot-root .chart-cursor-tooltip-content::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
pointer-events: none;
z-index: -1;
}

.reveg-chatbot-root .chart-cursor-tooltip-label {
font-weight: 600;
margin-bottom: 8px;
color: #e5e7eb;
font-size: 13px;
opacity: 0.9;
letter-spacing: 0.5px;
text-transform: uppercase;
line-height: 1.2;
}

.reveg-chatbot-root .chart-cursor-tooltip-value {
font-weight: 700;
color: #ffffff;
font-size: 18px;
letter-spacing: -0.3px;
margin: 4px 0;
line-height: 1.1;
}

.reveg-chatbot-root .chart-cursor-tooltip-percentage {
font-weight: 500;
color: #cbd5e1;
font-size: 13px;
opacity: 0.9;
margin-top: 4px;
display: block;
line-height: 1.2;
}

/* Recharts tooltip container overflow fix */
.reveg-chatbot-root .recharts-tooltip-wrapper {
overflow: visible !important;
z-index: 9999 !important;
}

.reveg-chatbot-root .recharts-wrapper {
overflow: visible !important;
}

/* Ensure all chart containers allow tooltip overflow */
.reveg-chatbot-root .recharts-responsive-container {
overflow: visible !important;
}

/* Fix for tooltips getting cut off at chart edges */
.reveg-chatbot-root .chart-content-container .recharts-wrapper svg {
overflow: visible !important;
}

/* ==========================================================================
 TABLE EXPORT STYLING - Essential for inline tables
========================================================================== */

.reveg-chatbot-root .chat-table-container {
margin: 20px 0 5px 0;
overflow: visible;
}

/* Mobile chat table container - ensure charts don't cause horizontal overflow */
@media (max-width: 768px) {
.reveg-chatbot-root .chat-table-container {
width: 100% !important;
max-width: 100% !important;
overflow: hidden !important;
}
}

.reveg-chatbot-root .chat-table-container h4,
.reveg-chatbot-root .exportable-table-wrapper h4 {
font-size: 20px;
font-weight: 700;
color: #1a202c;
margin: 0 0 20px 0;
padding: 0;
line-height: 1.3;
letter-spacing: -0.025em;
text-align: left;
}

/* NEW: Fullscreen chat table container with horizontal scroll */
.reveg-chatbot-root .chat-fullscreen-container .chat-table-container {
overflow-x: auto;
overflow-y: visible;
width: 100%;
max-width: 100%;
-webkit-overflow-scrolling: touch;
scrollbar-width: thin;
scrollbar-color: #cbd5e1 #f1f5f9;
}

/* NEW: Custom scrollbar styling for fullscreen chat webkit browsers */
.reveg-chatbot-root .chat-fullscreen-container .chat-table-container::-webkit-scrollbar {
height: 6px;
background: transparent;
}

.reveg-chatbot-root .chat-fullscreen-container .chat-table-container::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 6px;
border: 2px solid transparent;
background-clip: content-box;
}

.reveg-chatbot-root .chat-fullscreen-container .chat-table-container::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
background-clip: content-box;
}

.reveg-chatbot-root .chat-fullscreen-container .chat-table-container::-webkit-scrollbar-track {
background: #f8fafc;
border-radius: 6px;
border: 1px solid #e2e8f0;
}

/* NEW: Fullscreen chat wide table card with horizontal scroll */
.reveg-chatbot-root .chat-fullscreen-container .wide-table-card {
overflow-x: auto;
width: 100%;
max-width: 100%;
border: 1px solid #e2e8f0;
border-radius: 8px;
background: white;
}

/* Custom scrollbar styling for wide table cards in new fullscreen */
.reveg-chatbot-root .chat-fullscreen-container .wide-table-card::-webkit-scrollbar {
height: 6px;
background: transparent;
}

.reveg-chatbot-root .chat-fullscreen-container .wide-table-card::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 6px;
border: 2px solid transparent;
background-clip: content-box;
}

.reveg-chatbot-root .chat-fullscreen-container .wide-table-card::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
background-clip: content-box;
}

.reveg-chatbot-root .chat-fullscreen-container .wide-table-card::-webkit-scrollbar-track {
background: #f8fafc;
border-radius: 6px;
border: 1px solid #e2e8f0;
}

/* NEW: Fullscreen chat wide table content with minimum width */
.reveg-chatbot-root .chat-fullscreen-container .wide-table-content {
min-width: 600px;
}

.reveg-chatbot-root .table-exporter {
width: 100%;
overflow: visible !important;
}

.reveg-chatbot-root .exportable-table-wrapper {
width: 100%;
}

.reveg-chatbot-root .chart-exporter {
width: 100% !important;
overflow: visible !important;
}

/* Mobile chart exporter - ensure no overflow */
@media (max-width: 768px) {
.reveg-chatbot-root .chart-exporter {
width: 100% !important;
max-width: 100% !important;
overflow: visible !important;
}
}



.reveg-chatbot-root .exportable-table {
background: white;
border: 1px solid #e1e8ed;
border-radius: 12px;
margin-bottom: 8px;
overflow: hidden;
}

.reveg-chatbot-root .exportable-table.chart-wrapper {
padding: 0;
border: none;
border-radius: 16px;
background: white;
overflow: visible; /* Override overflow: hidden from .exportable-table to allow charts to display */
}

/* Mobile chart wrapper - ensure no overflow */
@media (max-width: 768px) {
.reveg-chatbot-root .exportable-table.chart-wrapper {
width: 100% !important;
max-width: 100% !important;
overflow: hidden !important;
}
}


/* NEW: Fullscreen chat table container - enable horizontal scroll when needed */
.reveg-chatbot-root .chat-fullscreen-container .chat-table-container {
width: 100%;
overflow-x: auto;
overflow-y: visible;
-webkit-overflow-scrolling: touch;
}

/* NEW: Fullscreen chat exportable table wrapper - always full width */
.reveg-chatbot-root .chat-fullscreen-container .table-exporter {
width: 100%;
min-width: 100%;
}

/* NEW: Fullscreen chat exportable table - responsive behavior */
.reveg-chatbot-root .chat-fullscreen-container .exportable-table {
width: 100%;
min-width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: thin !important;
scrollbar-color: #cbd5e1 #f1f5f9 !important;
}

/* NEW: Fullscreen chat table - always try to fill available width */
.reveg-chatbot-root .chat-fullscreen-container .exportable-table table {
width: 100%;
min-width: 100%;
table-layout: auto;
border-collapse: collapse;
}

/* NEW: For tables with few columns, stretch to fill width */
.reveg-chatbot-root .chat-fullscreen-container .exportable-table:not([data-many-columns="true"]) table {
table-layout: fixed;
}

/* NEW: For tables with many columns, allow natural width with minimum */
.reveg-chatbot-root .chat-fullscreen-container .exportable-table[data-many-columns="true"] table {
width: auto;
min-width: 100%;
table-layout: auto;
}

/* NEW: Fullscreen chat exportable table with many columns - cell styling */
.reveg-chatbot-root .chat-fullscreen-container .exportable-table[data-many-columns="true"] th,
.reveg-chatbot-root .chat-fullscreen-container .exportable-table[data-many-columns="true"] td {
min-width: 100px;
white-space: nowrap;
}

.reveg-chatbot-root .table-header {
padding: 20px 24px 16px 24px;
background: #0a1f2f;
border-bottom: 1px solid #e1e8ed;
}

.reveg-chatbot-root .exportable-table h3 {
font-size: 18px;
font-weight: 600;
color: white;
line-height: 1.4;
letter-spacing: -0.025em;
}

.reveg-chatbot-root .exportable-table table {
width: 100%;
font-size: 14px;
background: white;
}

.reveg-chatbot-root .exportable-table th {
background: var(--table-header);
padding: 16px 24px;
text-align: left;
font-weight: 600;
color: #4a5568;
border-bottom: 1px solid #e2e8f0;
font-size: 13px;
line-height: 1.4;
text-transform: capitalize;
letter-spacing: 0.05em;
white-space: nowrap;
}

.reveg-chatbot-root .exportable-table td {
padding: 16px 24px;
border-bottom: 1px solid #e2e8f0;
color: #2d3748;
font-size: 13px;
line-height: 1.5;
background: white;
transition: background-color 0.15s ease;
vertical-align: middle;
white-space: nowrap;
}

.reveg-chatbot-root .exportable-table td:first-child {
font-weight: 500;
color: #1a202c;
}

.reveg-chatbot-root .exportable-table tbody tr:last-child td {
border-bottom: none;
}

.reveg-chatbot-root .exportable-table tbody tr:hover td {
background: var(--table-hover);
}

.reveg-chatbot-root .export-controls {
display: flex;
gap: 18px;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
overflow: visible !important;
color: #6b7280 !important;
padding: 0 5px !important;
}

.reveg-chatbot-root .export-buttons {
display: flex;
gap: 18px;
flex-wrap: wrap;
align-items: center;
}

.reveg-chatbot-root .export-btn {
color: #6b7280;
border-radius: 8px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
line-height: 1.4;
user-select: none;
position: relative;
overflow: hidden;
}

.reveg-chatbot-root .export-btn:hover:not(:disabled) {
color: #585e69;
}

.reveg-chatbot-root .export-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
pointer-events: none;
}

.reveg-chatbot-root .export-btn svg {
width: 16px;
height: 16px;
flex-shrink: 0;
transition: transform 0.15s ease;
}

/* Wide Table Cards */
.reveg-chatbot-root .wide-table-card {
background: white;
border: 1px solid #e5e7eb;
border-radius: 12px;
margin: 16px 0;
overflow: hidden;
}

.reveg-chatbot-root .wide-table-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 20px 0 20px;
}

.reveg-chatbot-root .wide-table-content {
padding: 20px 20px 4px 20px;
}

.reveg-chatbot-root .wide-table-title {
margin-bottom: 12px;
font-size: 18px;
font-weight: 600;
color: #1f2937;
line-height: 1.3;
}

.reveg-chatbot-root .wide-table-actions {
padding: 16px 20px;
}

.reveg-chatbot-root .wide-table-main-button {
background: #4a8edb;
color: white;
border-radius: 8px;
padding: 12px 20px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
width: 100%;
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 2px 4px rgba(74, 142, 219, 0.2);
user-select: none;
position: relative;
overflow: hidden;
min-height: 44px;
}

.reveg-chatbot-root .wide-table-main-button:hover:not(:disabled) {
background: #3a7bd5;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(74, 142, 219, 0.3);
}

/* ==========================================================================
 ENHANCED BUTTON SYSTEM - Essential for all interactions
========================================================================== */

.reveg-chatbot-root .btn-base,
.reveg-chatbot-root .btn-primary,
.reveg-chatbot-root .btn-secondary {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 10px 16px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
line-height: 1.4;
cursor: pointer;
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
user-select: none;
position: relative;
overflow: hidden;
min-height: 36px;
white-space: nowrap;
}

.reveg-chatbot-root .btn-primary {
background: var(--primary);
color: white;
box-shadow: 0 2px 4px var(--primary-shadow);
}

.reveg-chatbot-root .btn-primary:hover:not(:disabled) {
background: var(--primary-hover);
box-shadow: 0 4px 12px var(--primary-shadow);
transform: translateY(-1px);
}

.reveg-chatbot-root .btn-secondary {
background: white;
color: #475569;
border: 1px solid #e2e8f0;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .btn-secondary:hover:not(:disabled) {
background: #f8fafc;
border-color: var(--primary);
color: var(--primary);
box-shadow: 0 2px 4px var(--primary-light);
transform: translateY(-1px);
}

.reveg-chatbot-root .btn-base:disabled,
.reveg-chatbot-root .btn-primary:disabled,
.reveg-chatbot-root .btn-secondary:disabled {
opacity: 0.6;
cursor: not-allowed;
pointer-events: none;
}

/* ==========================================================================
 FULLSCREEN PROMPT - Essential for large dataset redirects
========================================================================== */

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt {
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
border: 1px solid #e2e8f0;
border-radius: 16px;
padding: 20px;
margin: 16px 0;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
border-radius: 16px 16px 0 0;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt:hover {
transform: translateY(-2px);
box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-content {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-header {
display: flex;
align-items: flex-start;
gap: 16px;
flex: 1;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-icon-wrapper {
width: 48px;
height: 48px;
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-icon {
width: 24px;
height: 24px;
color: white;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-text {
flex: 1;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-title {
font-size: 18px;
font-weight: 600;
color: #1f2937;
margin-bottom: 8px;
line-height: 1.3;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-description {
font-size: 14px;
color: #6b7280;
line-height: 1.5;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-button {
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
color: white;
border-radius: 12px;
padding: 12px 20px;
font-size: 14px;
font-weight: 600;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
flex-shrink: 0;
min-width: 140px;
justify-content: center;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-button:hover {
background: linear-gradient(135deg, #1d4ed8, #1e40af);
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
 DATA SHOWCASE - Compact dataset overview
 ========================================================================== */

.reveg-chatbot-root .data-showcase-compact {
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
border: 1px solid #d1d5db;
border-radius: 8px;
padding: 14px 16px;
margin: 16px 0;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.reveg-chatbot-root .data-showcase-compact-info {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 12px;
}

.reveg-chatbot-root .data-showcase-compact-badge {
background: linear-gradient(135deg, #4a8edb 0%, #4a8edb 100%);
color: white;
padding: 4px 10px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.reveg-chatbot-root .data-showcase-compact-details {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
justify-content: center;
}

.reveg-chatbot-root .data-showcase-compact-stat {
background: white;
color: #374151;
padding: 3px 8px;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
border: 1px solid #e5e7eb;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .data-showcase-compact-examples {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
gap: 8px;
}

.reveg-chatbot-root .data-showcase-compact-examples button {
border: 1px solid #d1d5db;
border-radius: 6px;
padding: 4px 8px;
font-size: 11px;
color: #4a8edb;
cursor: pointer;
transition: all 0.15s ease;
font-weight: 500;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .data-showcase-compact-examples button:hover {
background: #4a8edb;
color: white;
border-color: #4a8edb;
box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* ==========================================================================
 CONTEXTUAL SUGGESTIONS - Smart follow-up suggestions
 ========================================================================== */

.reveg-chatbot-root .chat-suggestion-container {
margin-top: 8px;
display: block;
width: 100%;
}

.reveg-chatbot-root .chat-suggestion-button {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
border: 1px solid #cbd5e1;
border-radius: 8px;
color: #475569;
font-size: 13px;
font-weight: 500;
font-style: italic;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
max-width: 100%;
white-space: normal;
word-wrap: break-word;
text-align: left;
}

.reveg-chatbot-root .chat-suggestion-button:hover {
background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
border-color: #94a3b8;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
color: #334155;
}

.reveg-chatbot-root .chat-suggestion-icon {
width: 14px;
height: 14px;
color: #4a8edb;
flex-shrink: 0;
opacity: 0.8;
}

.reveg-chatbot-root .chat-suggestion-button:hover .chat-suggestion-icon {
opacity: 1;
color: #0066CC;
}

/* Transparency panel container */
.reveg-chatbot-root .chat-transparency-container {
margin-top: 8px;
display: flex;
justify-content: flex-end;
}

/* Transparency panel styles */
.reveg-chatbot-root .transparency-dropdown-portal {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.reveg-chatbot-root .transparency-dropdown-portal .detail-value a {
color: #007AFF !important;
text-decoration: none !important;
font-weight: 500 !important;
transition: color 0.2s ease !important;
}

.reveg-chatbot-root .transparency-dropdown-portal .detail-value a:hover {
color: #0056CC !important;
text-decoration: underline !important;
}

.reveg-chatbot-root .transparency-dropdown-portal .detail-value a:visited {
color: #5856D6 !important;
}

.reveg-chatbot-root .transparency-dropdown-portal .detail-value a:active {
color: #0056CC !important;
}

/* ==========================================================================
 ACCESSIBILITY & HIGH CONTRAST
========================================================================== */

@media (prefers-contrast: high) {
.reveg-chatbot-root button,
.reveg-chatbot-root .chart-action-button,
.reveg-chatbot-root .export-btn {
border-width: 2px;
outline-width: 3px;
}
}

@media (prefers-reduced-motion: reduce) {
.reveg-chatbot-root * {
transition: none !important;
animation: none !important;
  transform: none !important;
}
}

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

/* ==========================================================================
 MOBILE RESPONSIVE - Consolidated
 ========================================================================== */

@media (max-width: 480px) {
/* Ultra-compact mobile adjustments */
.reveg-chatbot-root .chart-container.fullscreen {
min-height: 300px;
}

.reveg-chatbot-root .chart-container.compact {
min-height: 250px;
}

.reveg-chatbot-root .chat-table-container h4,
.reveg-chatbot-root .exportable-table-wrapper h4 {
font-size: 18px;
margin: 0 0 16px 0;
}

.reveg-chatbot-root .chart-header {
padding: 12px 16px 8px 16px;
flex-direction: column;
align-items: flex-start;
gap: 8px;
height: 80px;
}

.reveg-chatbot-root .chart-title {
font-size: 14px;
}

.reveg-chatbot-root .chart-content {
padding: 12px;
}

.reveg-chatbot-root .chart-action-button {
padding: 10px 12px;
font-size: 12px;
gap: 4px;
min-height: 40px;
min-width: 80px;
flex: 1;
max-width: 120px;
}

.reveg-chatbot-root .exportable-table {
border-radius: 8px;
overflow-x: auto;
}

.reveg-chatbot-root .table-header {
padding: 16px 20px 12px 20px;
}

.reveg-chatbot-root .exportable-table h3 {
font-size: 16px;
}

.reveg-chatbot-root .exportable-table table {
min-width: 500px;
}

.reveg-chatbot-root .exportable-table th,
.reveg-chatbot-root .exportable-table td {
padding: 12px 16px;
font-size: 13px;
}

/* Remove mobile export controls - use desktop styling */

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt {
padding: 16px;
margin: 12px 0;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-content {
flex-direction: column;
align-items: stretch;
gap: 16px;
margin-bottom: 12px;
}

.reveg-chatbot-root .reveg-chatbot-fullscreen-prompt-button {
width: 100%;
min-width: auto;
padding: 14px 20px;
}

.reveg-chatbot-root .data-showcase-compact {
margin: 12px 0;
padding: 12px;
}
}

@media (max-width: 768px) {
/* Bubble Chat Mobile */
.reveg-chatbot-root .reveg-chatbot-widget {
bottom: 20px;
right: 20px;
}

.reveg-chatbot-root .chat-table-container h4,
.reveg-chatbot-root .exportable-table-wrapper h4 {
font-size: 19px;
margin: 0 0 18px 0;
}

.reveg-chatbot-root .reveg-chatbot-trigger {
width: 56px;
height: 56px;
}

.reveg-chatbot-root .reveg-chatbot-container {
width: calc(100vw - 40px);
height: calc(100vh - 120px);
bottom: 90px;
right: 20px;
left: 20px;
}

.reveg-chatbot-root .reveg-chatbot-container.is-open {
width: 100vw;
height: calc(100% - 1rem);
bottom: 0;
right: 0;
left: 0;
top: 1rem;
border-radius: 12px 12px 0 0;
}

/* Export controls - keep desktop styling on mobile */

/* Hero Float Mobile */
.reveg-chatbot-root .reveg-chatbot-hero-float-container {
padding: 16px 0;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-card {
max-width: 100%;
border-radius: 12px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-card.expanded {
height: 400px;
max-height: 400px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-input-wrapper {
padding: 10px;
border-radius: 14px;
min-height: 124px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-minimal {
font-size: 16px;
padding-bottom: 12px;
min-height: 24px;
max-height: 100px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-button-row {
gap: 10px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-data-button {
padding: 6px 10px !important;
font-size: 12px !important;
height: 28px !important;
border-radius: 16px !important;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-data-icon {
width: 12px !important;
height: 12px !important;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-button {
width: 28px;
height: 28px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-icon {
width: 14px;
height: 14px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-content-box {
max-width: 100%;
box-shadow: none;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-header {
padding: 12px 16px;
min-height: 60px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-title {
font-size: 16px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-messages {
padding: 16px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-input-area {
padding: 16px 16px 20px 16px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-input-wrapper {
padding: 16px 12px;
border-radius: 14px;
height: 70px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-input {
font-size: 16px;
padding: 8px 40px 8px 8px;
height: 36px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-send-button {
width: 28px;
height: 28px;
right: 8px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-fullscreen-send-icon {
width: 14px;
height: 14px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chips {
grid-template-columns: 1fr;
gap: 10px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-chip {
padding: 14px 16px;
font-size: 13px;
gap: 10px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-suggestion-icon {
width: 18px;
height: 18px;
}
}

/* ==========================================================================
QUESTION PILLS - Essential for hero-float mode
========================================================================== */

.reveg-chatbot-root .reveg-chatbot-question-pills {
display: flex;
justify-content: center;
gap: 12px;
margin-bottom: 24px;
flex-wrap: wrap;
align-items: flex-start;
}

.reveg-chatbot-root .reveg-chatbot-question-pill {
position: relative;
}

.reveg-chatbot-root .reveg-chatbot-pill-button {
display: flex !important;
align-items: center !important;
gap: 8px !important;
padding: 8px 16px !important;
background: white !important;
border: 1px solid #e2e8f0 !important;
border-radius: 30px !important;
color: #000000 !important;
font-size: 14px !important;
font-weight: 500 !important;
cursor: pointer !important;
transition: all 0.2s ease !important;
height: 2.5rem !important;
white-space: nowrap !important;
min-height: 44px !important;
touch-action: manipulation !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-button:hover,
.reveg-chatbot-root .reveg-chatbot-pill-button.active {
background: #f8fafc !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-icon {
width: 18px !important;
height: 18px !important;
color: currentColor !important;
flex-shrink: 0 !important;
transition: color 0.2s ease !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-text {
font-size: 14px !important;
font-weight: 500 !important;
line-height: 1.3 !important;
color: inherit !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-chevron {
width: 16px !important;
height: 16px !important;
color: #6b7280 !important;
transition: all 0.2s ease !important;
flex-shrink: 0 !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-chevron.rotated {
transform: rotate(180deg);
}

.reveg-chatbot-root .reveg-chatbot-pill-dropdown {
position: fixed !important;
background: white !important;
border: 1px solid #e2e8f0 !important;
border-radius: 8px !important;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
z-index: 1000 !important;
padding: 8px !important;
min-width: 670px !important;
max-height: 400px !important;
overflow-y: auto !important;
left: 50% !important;
transform: translateX(-50%) !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-dropdown-item {
display: block !important;
width: 100% !important;
padding: 12px 16px !important;
text-align: left !important;
border-radius: 6px !important;
color: #374151 !important;
font-size: 14px !important;
font-weight: 400 !important;
line-height: 1.4 !important;
cursor: pointer !important;
transition: all 0.2s ease !important;
margin-bottom: 4px !important;
white-space: normal !important;
word-wrap: break-word !important;
min-height: 44px !important;
touch-action: manipulation !important;
background: transparent !important;
border: none !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-dropdown-item:last-child {
margin-bottom: 0 !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-dropdown-item:hover {
background: #f8fafc !important;
color: #1f2937 !important;
}

/* Mobile-specific dropdown styles */
@media (max-width: 768px) {
.reveg-chatbot-root .reveg-chatbot-question-pills {
flex-direction: row !important;
align-items: center !important;
justify-content: center !important;
gap: 8px !important;
margin-bottom: 16px !important;
flex-wrap: wrap !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-button {
width: auto !important;
max-width: none !important;
justify-content: center !important;
padding: 8px 14px !important;
font-size: 13px !important;
min-height: 36px !important;
height: auto !important;
flex-shrink: 0 !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-dropdown {
position: fixed !important;
left: 16px !important;
right: 16px !important;
width: auto !important;
min-width: auto !important;
max-width: none !important;
transform: none !important;
max-height: 60vh !important;
border-radius: 12px !important;
padding: 12px !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-dropdown-item {
padding: 16px 20px !important;
font-size: 15px !important;
line-height: 1.5 !important;
min-height: 48px !important;
border-radius: 8px !important;
margin-bottom: 6px !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-icon {
width: 16px;
height: 16px;
}

.reveg-chatbot-root .reveg-chatbot-pill-text {
font-size: 13px !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-chevron {
width: 14px !important;
height: 14px !important;
}
}

/* Extra small mobile devices */
@media (max-width: 480px) {
.reveg-chatbot-root .reveg-chatbot-question-pills {
margin-bottom: 12px;
gap: 6px;
}

.reveg-chatbot-root .reveg-chatbot-pill-button {
max-width: none;
padding: 12px 14px;
font-size: 12px;
min-height: 32px;
}

.reveg-chatbot-root .reveg-chatbot-pill-dropdown {
left: 12px !important;
right: 12px !important;
max-height: 70vh !important;
padding: 16px !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-dropdown-item {
padding: 18px 24px !important;
font-size: 16px !important;
min-height: 52px !important;
margin-bottom: 8px !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-text {
font-size: 13px !important;
}
}

/* ==========================================================================
MOBILE DRAWER FOR QUESTION PILLS - HARDENED VERSION
========================================================================== */

.reveg-chatbot-root .reveg-chatbot-pill-drawer-overlay {
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100vw !important;
height: 100vh !important;
height: 100dvh !important; /* Dynamic viewport height for mobile */
background: rgba(0, 0, 0, 0.5) !important;
z-index: 2147483646 !important; /* Very high z-index, just below drawer */
backdrop-filter: blur(4px) !important;
-webkit-backdrop-filter: blur(4px) !important;
animation: drawerOverlayFadeIn 0.3s ease-out !important;
touch-action: none !important; /* Prevent scrolling behind overlay */
-webkit-touch-callout: none !important;
-webkit-user-select: none !important;
-moz-user-select: none !important;
-ms-user-select: none !important;
user-select: none !important;
overscroll-behavior: contain !important;
}

@keyframes drawerOverlayFadeIn {
from {
 opacity: 0 !important;
 backdrop-filter: blur(0px) !important;
 -webkit-backdrop-filter: blur(0px) !important;
}
to {
 opacity: 1 !important;
 backdrop-filter: blur(4px) !important;
 -webkit-backdrop-filter: blur(4px) !important;
}
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer {
position: fixed !important;
bottom: 0 !important;
left: 0 !important;
right: 0 !important;
width: 100vw !important;
background: white !important;
border-radius: 20px 20px 0 0 !important;
box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2) !important;
z-index: 2147483647 !important; /* Maximum safe z-index */
max-height: 85vh !important;
max-height: 85dvh !important; /* Dynamic viewport height */
min-height: 60vh !important;
min-height: 60dvh !important; /* Dynamic viewport height */
overflow: hidden !important;
animation: drawerSlideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
display: flex !important;
flex-direction: column !important;
touch-action: pan-y !important; /* Allow vertical scrolling within drawer */
-webkit-touch-callout: none !important;
overscroll-behavior: contain !important;
transform: translateZ(0) !important; /* Force hardware acceleration */
will-change: transform, opacity !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer.closing {
animation: drawerSlideDown 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19) !important;
pointer-events: none !important; /* Prevent interaction during close */
}

@keyframes drawerSlideUp {
from {
 transform: translateY(100%) translateZ(0) !important;
 opacity: 0 !important;
}
to {
 transform: translateY(0) translateZ(0) !important;
 opacity: 1 !important;
}
}

@keyframes drawerSlideDown {
from {
 transform: translateY(0) translateZ(0) !important;
 opacity: 1 !important;
}
to {
 transform: translateY(100%) translateZ(0) !important;
 opacity: 0 !important;
}
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-header {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
padding: 20px 24px 16px 24px !important;
border-bottom: 1px solid #e5e7eb !important;
background: #f8fafc !important;
border-radius: 20px 20px 0 0 !important;
flex-shrink: 0 !important;
position: relative !important;
z-index: 1 !important;
min-height: 60px !important; /* Ensure minimum touch target */
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-title {
font-size: 18px !important;
font-weight: 600 !important;
color: #1f2937 !important;
line-height: 1.3 !important;
margin: 0 !important;
padding: 0 !important;
flex: 1 !important;
text-align: left !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-close {
width: 32px !important;
height: 32px !important;
min-width: 32px !important;
min-height: 32px !important;
background: #e5e7eb !important;
border-radius: 50% !important;
color: #6b7280 !important;
font-size: 20px !important;
font-weight: 600 !important;
cursor: pointer !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
transition: all 0.2s ease !important;
line-height: 1 !important;
border: none !important;
outline: none !important;
-webkit-tap-highlight-color: transparent !important;
touch-action: manipulation !important;
flex-shrink: 0 !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-close:hover {
background: #d1d5db !important;
color: #374151 !important;
transform: scale(1.05) !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-close:active {
transform: scale(0.95) !important;
background: #9ca3af !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-content {
flex: 1 !important;
overflow-y: auto !important;
overflow-x: hidden !important;
padding: 20px 24px 32px 24px !important;
background: white !important;
-webkit-overflow-scrolling: touch !important;
scrollbar-width: thin !important;
scrollbar-color: #cbd5e1 #f1f5f9 !important;
overscroll-behavior: contain !important;
touch-action: pan-y !important;
position: relative !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-content::-webkit-scrollbar {
width: 6px !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-content::-webkit-scrollbar-track {
background: #f1f5f9 !important;
border-radius: 3px !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-content::-webkit-scrollbar-thumb {
background: #cbd5e1 !important;
border-radius: 3px !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-content::-webkit-scrollbar-thumb:hover {
background: #94a3b8 !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-item {
display: block !important;
width: 100% !important;
padding: 18px 20px !important;
text-align: left !important;
border: 1px solid #e5e7eb !important;
border-radius: 12px !important;
color: #374151 !important;
font-size: 14px !important;
font-weight: 400 !important;
line-height: 1.5 !important;
cursor: pointer !important;
transition: all 0.2s ease !important;
margin-bottom: 16px !important;
white-space: normal !important;
word-wrap: break-word !important;
min-height: 60px !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
background: white !important;
-webkit-tap-highlight-color: transparent !important;
touch-action: manipulation !important;
outline: none !important;
position: relative !important;
z-index: 1 !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-item:last-child {
margin-bottom: 0 !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-item:hover {
background: #f8fafc !important;
border-color: #4a8edb !important;
color: #1f2937 !important;
box-shadow: 0 4px 12px rgba(74, 142, 219, 0.1) !important;
transform: translateY(-1px) !important;
}

.reveg-chatbot-root .reveg-chatbot-pill-drawer-item:active {
transform: translateY(0) !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
background: #e2e8f0 !important;
}

/* Enhanced mobile-specific fixes */
@media (max-width: 768px) {
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-header {
    padding: 16px 20px 12px 20px !important;
    min-height: 56px !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-title {
    font-size: 16px !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-close {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    font-size: 18px !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-content {
    padding: 16px 20px 24px 20px !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-item {
    padding: 16px 18px !important;
    font-size: 15px !important;
    min-height: 56px !important;
    margin-bottom: 12px !important;
  }
}

/* Extra defensive styles for older mobile browsers */
@media (max-width: 480px) {
  .reveg-chatbot-root .reveg-chatbot-pill-drawer {
    max-height: 90vh !important;
    max-height: 90dvh !important;
    min-height: 50vh !important;
    min-height: 50dvh !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-header {
    padding: 12px 16px 8px 16px !important;
    min-height: 48px !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-content {
    padding: 12px 16px 20px 16px !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-item {
    padding: 14px 16px !important;
    font-size: 14px !important;
    min-height: 52px !important;
    margin-bottom: 10px !important;
  }
}

/* Prevent body scroll when drawer is open */
.reveg-chatbot-root .reveg-chatbot-pill-drawer-overlay ~ body,
.reveg-chatbot-root .reveg-chatbot-pill-drawer-overlay ~ html {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* iOS Safari specific fixes */
@supports (-webkit-appearance: none) {
  .reveg-chatbot-root .reveg-chatbot-pill-drawer {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
  }
  
  .reveg-chatbot-root .reveg-chatbot-pill-drawer-content {
    -webkit-overflow-scrolling: touch !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
  }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .reveg-chatbot-root .reveg-chatbot-pill-drawer {
    transform: translateZ(0) !important;
  }
}

/* ==========================================================================
TRUST INDICATORS - Essential for hero-float mode
========================================================================== */

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-indicators {
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
margin-top: 16px;
flex-wrap: wrap;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-item {
display: flex;
align-items: center;
gap: 6px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-check {
width: 16px;
height: 16px;
background: #22c55e;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-check svg {
width: 10px;
height: 10px;
color: white;
stroke-width: 2.5;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-text {
font-size: 14px;
color: #212327;
font-weight: 500;
line-height: 1.3;
white-space: nowrap;
}

/* Mobile-specific trust indicators styles */
@media (max-width: 768px) {
.reveg-chatbot-root .reveg-chatbot-hero-float-trust-indicators {
gap: 16px;
margin-top: 12px;
justify-content: space-between;
max-width: 280px;
margin-left: auto;
margin-right: auto;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-item {
gap: 5px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-check {
width: 14px;
height: 14px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-check svg {
width: 8px;
height: 8px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-text {
font-size: 13px;
}
}

@media (max-width: 480px) {
.reveg-chatbot-root .reveg-chatbot-hero-float-trust-indicators {
gap: 12px;
margin-top: 10px;
flex-wrap: wrap;
justify-content: center;
max-width: 100%;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-item {
gap: 4px;
flex: 0 0 auto;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-trust-text {
font-size: 13px;
}
}

/* ==========================================================================
 CHART AND TABLE FOOTER STYLING - Consistent footer design
========================================================================== */

.reveg-chatbot-root .chart-table-footer {
padding: 12px 20px;
border-top: 1px solid #e2e8f0;
background: #f8fafc;
display: flex;
align-items: center;
font-size: 11px;
color: #64748b !important;
}

.reveg-chatbot-root .chart-table-footer-buttons {
display: flex;
align-items: center;
gap: 8px;
}

.reveg-chatbot-root .chart-table-footer-button {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 7px 12px;
background: white;
border: 1px solid #e2e8f0;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
color: #475569;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .chart-table-footer-button:hover:not(:disabled) {
background: #f8fafc;
border-color: #4a8edb;
color: #4a8edb;
box-shadow: 0 2px 8px rgba(74, 142, 219, 0.15);
}

.reveg-chatbot-root .chart-table-footer-button:disabled {
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
}

.reveg-chatbot-root .chart-table-footer-button svg {
width: 12px;
height: 12px;
flex-shrink: 0;
stroke-width: 2;
transition: transform 0.15s ease;
}

.reveg-chatbot-root .chart-table-footer-button:hover:not(:disabled) svg {
transform: scale(1.1);
}

/* Success/Loading states for footer buttons */
.reveg-chatbot-root .chart-table-footer-button.loading {
opacity: 0.7;
cursor: wait;
}

.reveg-chatbot-root .chart-table-footer-button.success {
background: #10b981;
color: white;
border-color: #10b981;
}

.reveg-chatbot-root .chart-table-footer-button.error {
background: #ef4444;
color: white;
border-color: #ef4444;
}


/* Pie chart label styling improvements */
.reveg-chatbot-root .recharts-pie-label-text {
font-size: 11px;
font-weight: 600;
fill: #1e293b;
text-anchor: middle;
dominant-baseline: middle;
stroke: #ffffff;
stroke-width: 0.5px;
paint-order: stroke fill;
}

/* Modern legend styling */
.reveg-chatbot-root .recharts-legend-wrapper {
font-family: inherit;
}

.reveg-chatbot-root .recharts-legend-item {
margin-right: 20px;
margin-bottom: 8px;
display: inline-flex;
align-items: center;
gap: 8px;
}

.reveg-chatbot-root .recharts-legend-item-text {
font-size: 14px;
font-weight: 500;
color: #374151 !important;
line-height: 1.5;
letter-spacing: 0.01em;
}

.reveg-chatbot-root .recharts-surface .recharts-legend-item .recharts-legend-icon {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-minimal {
font-size: 16px;
padding-bottom: 12px;
min-height: 24px;
max-height: 100px;
align-self: flex-start;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-button-row {
gap: 10px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-data-button {
padding: 6px 10px;
font-size: 12px;
height: 28px;
border-radius: 16px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-data-icon {
width: 12px;
height: 12px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-button {
width: 28px;
height: 28px;
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-section-minimal .reveg-chatbot-hero-float-send-icon {
width: 14px;
}

/* ==========================================================================
UNIFIED FULLSCREEN CHAT STYLES
========================================================================== */

/* Main fullscreen container */
.reveg-chatbot-root .chat-fullscreen-container {
display: flex;
height: 100dvh; /* Use dvh (dynamic viewport height) for better mobile support */
height: 100vh;  /* Fallback for older browsers */
width: 100vw;
position: fixed;
top: 0;
left: 0;
background: white;
padding-top: env(safe-area-inset-top, 0);
padding-right: env(safe-area-inset-right, 0);
padding-bottom: 0; /* Don't add bottom padding here, let chat-input-area handle it */
padding-left: env(safe-area-inset-left, 0);
overflow: hidden;
}

/* Sidebar */
.reveg-chatbot-root .chat-sidebar {
width: 280px;
background: #f8fafc;
border-right: 1px solid #e2e8f0;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
position: relative;
}

.reveg-chatbot-root .chat-sidebar.collapsed {
width: 72px;
border-right: 1px solid #e2e8f0;
overflow: hidden;
cursor: pointer;
transition: background-color 0.2s ease;
}

.reveg-chatbot-root .chat-sidebar.collapsed:hover {
background: #f1f5f9;
}

.reveg-chatbot-root .chat-sidebar.collapsed .sidebar-header {
padding: 16px 12px 20px 12px;
justify-content: center;
}

.reveg-chatbot-root .chat-sidebar.collapsed .sidebar-logo {
display: none;
}

.reveg-chatbot-root .chat-sidebar.collapsed .sidebar-new-chat,
.reveg-chatbot-root .chat-sidebar.collapsed .sidebar-content {
display: none;
}

.reveg-chatbot-root .chat-sidebar.collapsed .sidebar-collapse-button {
position: static;
margin: 0 auto;
right: auto;
top: auto;
}

.reveg-chatbot-root .sidebar-header {
padding: 16px 20px 20px 20px;
position: relative;
}

.reveg-chatbot-root .sidebar-collapse-button {
position: absolute;
top: 16px;
right: 16px;
width: 32px;
height: 32px;
background: white;
border: 1px solid #e2e8f0;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
color: #6b7280;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
z-index: 10;
}

.reveg-chatbot-root .sidebar-collapse-button:hover {
background: #f3f4f6;
border-color: #d1d5db;
color: #374151;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reveg-chatbot-root .sidebar-collapse-button:active {
transform: scale(0.95);
}

.reveg-chatbot-root .sidebar-collapse-button svg {
width: 16px;
height: 16px;
stroke-width: 2;
transition: transform 0.2s ease;
}

.reveg-chatbot-root .sidebar-logo {
display: flex;
align-items: center;
gap: 12px;
}

.reveg-chatbot-root .sidebar-new-chat {
padding: 0 10px 12px 10px;
}

.reveg-chatbot-root .new-chat-button {
display: flex;
align-items: center;
gap: 12px;
padding: 6px 12px;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.15s ease;
color: #374151;
font-size: 14px;
font-weight: 400;
width: 100%;
text-align: left;
}

.reveg-chatbot-root .new-chat-button:hover {
background: #e2e8f0;
}

.reveg-chatbot-root .new-chat-button:active {
transform: scale(0.98);
}

.reveg-chatbot-root .new-chat-button-content {
flex: 1;
min-width: 0;
}

.reveg-chatbot-root .new-chat-button-title {
font-size: 14px;
font-weight: 400;
margin-bottom: 0;
white-space: normal;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 1.4;
text-transform: capitalize;
}

.reveg-chatbot-root .new-chat-button svg {
flex-shrink: 0;
color: #6b7280;
width: 16px;
height: 16px;
}

.reveg-chatbot-root .sidebar-logo-img {
width: 32px;
height: 32px;
border-radius: 6px;
}

.reveg-chatbot-root .sidebar-logo h1 {
font-size: 18px;
font-weight: 600;
color: #1a202c;
}

.reveg-chatbot-root .sidebar-content {
flex: 1;
overflow-y: auto;
}

.reveg-chatbot-root .sidebar-section {
padding: 20px 10px;
}

.reveg-chatbot-root .sidebar-title {
font-size: 14px;
font-weight: 600;
color: #4a5568;
margin: 0 0 16px 12px;
text-transform: capitalize;
letter-spacing: 0.05em;
}

.reveg-chatbot-root .chat-history-list {
display: flex;
flex-direction: column;
gap: 8px;
}

.reveg-chatbot-root .chat-history-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 12px;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.15s ease;
}

.reveg-chatbot-root .chat-history-item:hover {
background: #e2e8f0;
}

.reveg-chatbot-root .chat-history-item.active {
background: #ebf1f7;
color: #333333;
}

.reveg-chatbot-root .chat-history-item-content {
flex: 1;
min-width: 0;
}

.reveg-chatbot-root .chat-history-item-title {
font-size: 14px;
font-weight: 400;
margin-bottom: 4px;
white-space: normal;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 1.4;
text-transform: capitalize;
}

.reveg-chatbot-root .chat-history-item-meta {
font-size: 12px;
color: #718096;
}

.reveg-chatbot-root .chat-history-item.active .chat-history-item-meta {
color: #718096;
}

.reveg-chatbot-root .chat-history-item-delete {
color: #718096;
cursor: pointer;
padding: 4px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: all 0.15s ease;

}

.reveg-chatbot-root .chat-history-item:hover .chat-history-item-delete {
opacity: 1;
}

.reveg-chatbot-root .chat-history-item-delete:hover {
background: rgba(239, 68, 68, 0.1);
color: #ef4444;
}

.reveg-chatbot-root .chat-history-item.active .chat-history-item-delete {
color: #6b7280;
}

.reveg-chatbot-root .chat-history-item.active:hover .chat-history-item-delete {
opacity: 1;
color: #6b7280;
}

.reveg-chatbot-root .chat-history-item.active .chat-history-item-delete:hover {
background: rgba(239, 68, 68, 0.1);
color: #6b7280;
}

.reveg-chatbot-root .chat-history-empty {
text-align: center;
padding: 40px 20px;
}

.reveg-chatbot-root .chat-history-empty-icon {
margin: 0 auto 16px auto;
color: #eaeef1;
}

.reveg-chatbot-root .chat-history-empty-text h4 {
font-size: 16px;
font-weight: 600;
color: #4a5568;
margin-bottom: 8px;
}

.reveg-chatbot-root .chat-history-empty-text p {
font-size: 14px;
color: #718096;
line-height: 1.5;
}

/* Main chat area */
.reveg-chatbot-root .chat-main {
flex: 1;
display: flex;
flex-direction: column;
height: 100%;
position: relative;
overflow-x: hidden;
min-width: 0;
padding-bottom: 0; /* Input area is absolutely positioned */
}

/* Expand button for when sidebar is collapsed */
.reveg-chatbot-root .chat-expand-button {
position: fixed;
top: 16px;
left: 16px;
width: 40px;
height: 40px;
background: white;
border: 1px solid #e2e8f0;
border-radius: 8px;
display: none;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
color: #6b7280;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
z-index: 1000;
}

.reveg-chatbot-root .chat-expand-button:hover {
background: #f3f4f6;
border-color: #d1d5db;
color: #374151;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reveg-chatbot-root .chat-expand-button:active {
transform: scale(0.95);
}

.reveg-chatbot-root .chat-expand-button svg {
width: 18px;
height: 18px;
stroke-width: 2;
}

.reveg-chatbot-root .chat-fullscreen-container.sidebar-collapsed .chat-expand-button {
display: none;
}

.reveg-chatbot-root .chat-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 24px;
position: relative;
box-shadow: none;
}

.reveg-chatbot-root .chat-header-left {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
justify-content: flex-start;
}

.reveg-chatbot-root .chat-header-left .chat-header-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 18px;
font-weight: 600;
color: #1a202c;
}

.reveg-chatbot-root .chat-header-left .chat-header-sparkles {
color: #4a8edb;
flex-shrink: 0;
width: 18px;
height: 18px;
}

.reveg-chatbot-root .chat-header-center {
display: none;
align-items: center;
justify-content: center;
position: absolute;
left: 50%;
transform: translateX(-50%);
pointer-events: none;
}

.reveg-chatbot-root .chat-header-right {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
justify-content: flex-end;
}

.reveg-chatbot-root .chat-new-thread-button.mobile-new-thread {
display: none;
}

.reveg-chatbot-root .chat-back-button {
background: #f3f4f6;
border: 1px solid #e5e7eb;
border-radius: 8px;
padding: 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #6b7280;
transition: all 0.15s ease;
}

.reveg-chatbot-root .chat-back-button:hover {
background: #e5e7eb;
border-color: #d1d5db;
color: #374151;
}

.reveg-chatbot-root .chat-header-logo {
width: 32px;
height: 32px;
border-radius: 6px;
}

.reveg-chatbot-root .chat-header-title {
font-size: 18px;
font-weight: 600;
color: #1a202c;
display: flex;
align-items: center;
gap: 8px;
}

.reveg-chatbot-root .chat-header-sparkles {
color: #4a8edb;
flex-shrink: 0;
}

.reveg-chatbot-root .chat-new-thread-button {
width: 36px;
height: 36px;
background: #f3f4f6;
border: 1px solid #e5e7eb;
border-radius: 8px;
display: none;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
color: #6b7280;
}

.reveg-chatbot-root .chat-new-thread-button:hover {
background: #e5e7eb;
border-color: #d1d5db;
color: #374151;
}

.reveg-chatbot-root .chat-new-thread-button:active {
transform: scale(0.95);
}

.reveg-chatbot-root .mobile-menu-button {
display: flex;
align-items: center;
justify-content: flex-start;
width: 38px;
height: 38px;
cursor: pointer;
position: relative;
background: transparent !important;
border: none !important;
}

.reveg-chatbot-root .mobile-menu-button svg {
width: 20px;
height: 20px;
display: block;
}

.reveg-chatbot-root .desktop-new-thread,
.reveg-chatbot-root .chat-new-thread-button.desktop-new-thread,
.reveg-chatbot-root .sidebar-close-button.mobile-only {
display: none;
visibility: hidden;
opacity: 0;
pointer-events: none;
}

.reveg-chatbot-root .mobile-only {
display: none;
}

.reveg-chatbot-root .desktop-only {
display: flex;
}

.reveg-chatbot-root .chat-header-status {
display: flex;
align-items: center;
gap: 6px;
background: rgba(34, 197, 94, 0.1);
border: 1px solid rgba(34, 197, 94, 0.2);
border-radius: 16px;
padding: 4px 8px;
transition: all 0.2s ease;
}

.reveg-chatbot-root .chat-status-dot {
width: 5px;
height: 5px;
background: #22c55e;
border-radius: 50%;
animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
0%, 100% {
 opacity: 1;
}
50% {
 opacity: 0.5;
}
}

.reveg-chatbot-root .chat-status-text {
font-size: 11px;
color: #22c55e;
font-weight: 600;
letter-spacing: 0.025em;
}

.reveg-chatbot-root .chat-messages {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 24px;
background: #ffffff;
display: flex;
justify-content: center;
align-items: flex-start;
scrollbar-width: none;
min-width: 0;
}

.reveg-chatbot-root .chat-messages-constrained {
width: 100%;
max-width: 860px;
display: flex;
flex-direction: column;
gap: 49px;
min-width: 0;
overflow-x: hidden;
}

.reveg-chatbot-root .chat-messages > * {
width: 100%;
max-width: 860px;
margin-left: auto;
  margin-right: auto;
}

.reveg-chatbot-root .chat-welcome {
text-align: center;
padding: 40px 20px 20px 20px;
max-width: 900px;
}

/* Center the welcome screen when it's the only content */
.reveg-chatbot-root .chat-messages-constrained:has(.chat-welcome:only-child) {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: calc(100vh - 200px);
}

/* Fallback for browsers that don't support :has() */
.reveg-chatbot-root .chat-messages-welcome-only {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: calc(100vh - 200px);
}

.reveg-chatbot-root .chat-welcome-header {
margin-bottom: 48px;
padding: 0 20px;
}

.reveg-chatbot-root .chat-welcome-icon {
margin: 0 auto 24px auto;
color: #4a8edb;
display: flex;
align-items: center;
justify-content: center;
width: 80px;
height: 80px;
padding: 16px;
background: linear-gradient(135deg, rgba(74, 142, 219, 0.1) 0%, rgba(74, 142, 219, 0.05) 100%);
border-radius: 20px;
box-shadow: 0 4px 20px rgba(74, 142, 219, 0.15);
}

.reveg-chatbot-root .chat-welcome h2 {
font-size: 28px;
font-weight: 700;
color: #1a202c;
margin-bottom: 16px;
line-height: 1.3;
letter-spacing: -0.025em;
}

.reveg-chatbot-root .chat-welcome p {
font-size: 16px;
color: #64748b;
line-height: 1.6;
max-width: 600px;
margin-left: auto;
  margin-right: auto;
}

.reveg-chatbot-root .chat-feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
margin-bottom: 48px;
padding: 0 20px;
}

.reveg-chatbot-root .chat-feature-card {
border: 1px solid #e2e8f0;
border-radius: 16px;
padding: 32px 24px;
text-align: center;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .chat-feature-card::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(74, 142, 219, 0.02) 0%, rgba(74, 142, 219, 0.01) 100%);
opacity: 0;
transition: opacity 0.3s ease;
z-index: 0;
}

.reveg-chatbot-root .chat-feature-card:hover {
border-color: #4a8edb;
box-shadow: 0 8px 25px rgba(74, 142, 219, 0.12);
transform: translateY(-2px);
}

.reveg-chatbot-root .chat-feature-card:hover::before {
opacity: 1;
}

.reveg-chatbot-root .chat-feature-icon {
width: 64px;
height: 64px;
margin: 0 auto 20px auto;
padding: 16px;
color: #4a8edb;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, rgba(74, 142, 219, 0.1) 0%, rgba(74, 142, 219, 0.05) 100%);
border-radius: 16px;
position: relative;
z-index: 1;
transition: all 0.3s ease;
}

.reveg-chatbot-root .chat-feature-card:hover .chat-feature-icon {
background: linear-gradient(135deg, rgba(74, 142, 219, 0.15) 0%, rgba(74, 142, 219, 0.1) 100%);
transform: scale(1.05);
}

.reveg-chatbot-root .chat-feature-card h3 {
font-size: 18px;
font-weight: 600;
color: #1a202c;
margin-bottom: 12px;
position: relative;
z-index: 1;
line-height: 1.4;
}

.reveg-chatbot-root .chat-feature-card p {
font-size: 14px;
color: #64748b;
line-height: 1.5;
position: relative;
z-index: 1;
}

.reveg-chatbot-root .chart-showcase {
margin-bottom: 48px;
padding: 0 20px;
}

.reveg-chatbot-root .chart-showcase-header {
text-align: center;
margin-bottom: 32px;
}

.reveg-chatbot-root .chart-showcase-header h3 {
font-size: 22px;
font-weight: 600;
color: #1a202c;
margin-bottom: 8px;
letter-spacing: -0.025em;
}

.reveg-chatbot-root .chart-showcase-header p {
font-size: 14px;
color: #64748b;
line-height: 1.5;
}

.reveg-chatbot-root .chart-showcase-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 20px;
max-width: 800px;
margin-left: auto;
  margin-right: auto;
}

.reveg-chatbot-root .chart-showcase-item {
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 20px;
display: flex;
align-items: center;
gap: 16px;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
text-align: left;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .chart-showcase-item:hover {
border-color: #4a8edb;
box-shadow: 0 4px 12px rgba(74, 142, 219, 0.1);
}

.reveg-chatbot-root .chart-showcase-icon {
color: #4a8edb;
flex-shrink: 0;
width: 40px;
height: 40px;
padding: 8px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(74, 142, 219, 0.1);
border-radius: 10px;
transition: all 0.2s ease;
}

.reveg-chatbot-root .chart-showcase-item:hover .chart-showcase-icon {
background: rgba(74, 142, 219, 0.15);
transform: scale(1.1);
}

.reveg-chatbot-root .chart-showcase-content {
flex: 1;
min-width: 0;
}

.reveg-chatbot-root .chart-showcase-content h4 {
font-size: 15px;
font-weight: 600;
color: #1a202c;
margin-bottom: 4px;
line-height: 1.3;
}

.reveg-chatbot-root .chart-showcase-content p {
font-size: 13px;
color: #64748b;
line-height: 1.4;
}

.reveg-chatbot-root .chat-examples {
margin-top: 48px;
padding: 0 20px;
}

.reveg-chatbot-root .chat-examples h3 {
font-size: 22px;
font-weight: 600;
color: #1a202c;
margin-bottom: 28px;
text-align: center;
letter-spacing: -0.025em;
}

.reveg-chatbot-root .chat-example-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 16px;
max-width: 800px;
margin-left: auto;
  margin-right: auto;
}

.reveg-chatbot-root .chat-example-button {
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 18px 20px;
text-align: left;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
align-items: center;
gap: 14px;
font-size: 14px;
font-weight: 500;
color: #374151;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
position: relative;
overflow: hidden;
}

.reveg-chatbot-root .chat-example-button::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(74, 142, 219, 0.02) 0%, rgba(74, 142, 219, 0.01) 100%);
opacity: 0;
transition: opacity 0.2s ease;
z-index: 0;
}

.reveg-chatbot-root .chat-example-button:hover {
border-color: #4a8edb;
background: #f8fafc;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(74, 142, 219, 0.1);
color: #1f2937;
}

.reveg-chatbot-root .chat-example-button:hover::before {
opacity: 1;
}

.reveg-chatbot-root .chat-example-button:active {
transform: translateY(0);
box-shadow: 0 2px 4px rgba(74, 142, 219, 0.1);
}

.reveg-chatbot-root .chat-example-button svg {
color: #4a8edb;
flex-shrink: 0;
width: 18px;
height: 18px;
padding: 2px;
position: relative;
z-index: 1;
transition: all 0.2s ease;
}

.reveg-chatbot-root .chat-example-button:hover svg {
color: #3a7bd5;
transform: scale(1.1);
}

.reveg-chatbot-root .chat-input-area {
padding: 0 24px 24px 24px;
padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
display: flex;
flex-direction: column;
align-items: center;
position: relative;
z-index: 10;
}

.reveg-chatbot-root .keyboard-open {
overflow: hidden;
}

.reveg-chatbot-root .keyboard-open .chat-fullscreen-container {
height: 100dvh;
}

.reveg-chatbot-root .keyboard-open .chat-input-area {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: white;
border-top: 1px solid #e2e8f0;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
z-index: 1000;
padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
}

.reveg-chatbot-root .keyboard-open .chat-messages {
padding-bottom: 140px;
max-height: calc(100dvh - 140px);
overflow-y: auto;
}

@media (max-width: 768px) {
  .reveg-chatbot-root .keyboard-open .chat-sidebar {
    display: none;
  }
}

@supports (height: 100dvh) {
  .reveg-chatbot-root .chat-fullscreen-container,
  .reveg-chatbot-root .keyboard-open .chat-fullscreen-container {
    height: 100dvh;
  }
  .reveg-chatbot-root .keyboard-open .chat-messages {
    max-height: calc(100dvh - 140px);
  }
}

.reveg-chatbot-root .reveg-chatbot-hero-float-input-minimal,
.reveg-chatbot-root .chat-input,
.reveg-chatbot-root input[type="text"],
.reveg-chatbot-root input[type="email"],
.reveg-chatbot-root input[type="search"],
.reveg-chatbot-root textarea {
font-size: 16px;
-webkit-appearance: none;
border-radius: 0;
}

.reveg-chatbot-root .chat-fullscreen-container,
.reveg-chatbot-root .chat-messages,
.reveg-chatbot-root .chat-input-area {
transition: height 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
}

@media (max-width: 768px) {
  .reveg-chatbot-root .keyboard-open {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }
  .reveg-chatbot-root .keyboard-open .chat-messages {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  /* FIXED: Consistent mobile input area positioning */
  .reveg-chatbot-root .chat-input-area {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    z-index: 100 !important;

  }
  
  /* FIXED: Increased padding to ensure content is never hidden behind input */
  .reveg-chatbot-root .chat-messages {
    padding-bottom: calc(180px + env(safe-area-inset-bottom, 0)) !important;
  }
  
  /* Prevent input from being cut off by safe areas */
  .reveg-chatbot-root .chat-main {
    padding-bottom: 0;
  }
}

.reveg-chatbot-root .chat-input-area > * {
width: 100%;
max-width: 860px;
}

/* iOS-specific viewport fixes */
@supports (-webkit-touch-callout: none) {
  /* iOS only */
  .reveg-chatbot-root .chat-fullscreen-container {
    height: -webkit-fill-available;
    min-height: -webkit-fill-available;
  }
  
  .reveg-chatbot-root .chat-main {
    height: 100%;
    min-height: -webkit-fill-available;
  }
  
  /* FIXED: Comprehensive iOS mobile input area positioning */
  @media (max-width: 768px) {
    .reveg-chatbot-root .chat-input-area {
      padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
      position: fixed !important;
      bottom: 0 !important;
      left: 0 !important;
      right: 0 !important;
      background: white !important;
      z-index: 100 !important;
    }
    
    /* FIXED: Ensure messages have enough padding to never be hidden on iOS */
    .reveg-chatbot-root .chat-messages {
      padding-bottom: calc(210px + env(safe-area-inset-bottom, 0)) !important;
    }
    
    /* FIXED: Ensure the main chat area accounts for input area height */
    .reveg-chatbot-root .chat-main {
      padding-bottom: 0;
      min-height: calc(100vh - 120px);
      min-height: calc(100dvh - 120px);
    }
  }
}

.reveg-chatbot-root .chat-input-area.hero-float-input > * {
width: 100%;
max-width: 860px;
}

.reveg-chatbot-root .chat-fullscreen-container .chat-message .chat-avatar {
display: none;
}

.reveg-chatbot-root .chat-input-wrapper {
display: flex;
align-items: flex-end;
gap: 12px;
max-width: 800px;
margin-left: auto;
  margin-right: auto;
}

.reveg-chatbot-root .chat-input {
flex: 1;
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 12px 16px;
font-size: 14px;
resize: none;
transition: border-color 0.15s ease;
min-height: 44px;
max-height: 120px;
}

.reveg-chatbot-root .chat-input:focus {
/* No active state styling */
}

.reveg-chatbot-root .chat-send-button {
background: #4a8edb;
color: white;
border-radius: 8px;
padding: 10px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.15s ease;
min-width: 44px;
height: 44px;
}

.reveg-chatbot-root .chat-send-button:hover:not(:disabled) {
background: #3a7bd5;
}

.reveg-chatbot-root .chat-send-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.reveg-chatbot-root .chat-send-icon {
width: 20px;
height: 20px;
transform: rotate(-90deg);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .reveg-chatbot-root .chat-sidebar {
    display: none;
  }
  .reveg-chatbot-root .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.2s ease-out;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  .reveg-chatbot-root .chat-sidebar.mobile-open {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 9999;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    animation: slideInLeft 0.3s ease-out;
  }
  @keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }

  .reveg-chatbot-root .sidebar-close-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    top: 12px;
    right: 12px;
  }
  .reveg-chatbot-root .sidebar-close-button:hover {
    background: #f3f4f6;
  }
  .reveg-chatbot-root .sidebar-close-button svg {
    width: 16px;
    height: 16px;
  }
  .reveg-chatbot-root .mobile-only,
  .reveg-chatbot-root .chat-sidebar.mobile-open .desktop-only {
    display: none;
  }
  .reveg-chatbot-root .desktop-only,
  .reveg-chatbot-root .chat-sidebar.mobile-open .mobile-only,
  .reveg-chatbot-root .chat-sidebar.mobile-open .sidebar-close-button.mobile-only {
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .reveg-chatbot-root .chat-sidebar.mobile-open .sidebar-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .reveg-chatbot-root .chat-sidebar.mobile-open .sidebar-header,
  .reveg-chatbot-root .chat-sidebar.mobile-open .sidebar-new-chat {
    flex-shrink: 0;
  }
  .reveg-chatbot-root .chat-sidebar.mobile-open .sidebar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .reveg-chatbot-root .chat-sidebar.mobile-open .sidebar-header {
    padding-right: 48px;
  }
  .reveg-chatbot-root .sidebar-collapse-button {
    display: none;
  }
  .reveg-chatbot-root .chat-header {
    padding: 8px 16px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 0px 0px !important;
  }
  .reveg-chatbot-root .chat-header-left .chat-header-title {
    display: none;
  }
  .reveg-chatbot-root .chat-header-center {
    display: flex;
  }
  .reveg-chatbot-root .chat-header-center .chat-header-title {
    font-size: 16px;
    gap: 6px;
  }
  .reveg-chatbot-root .chat-header-center .chat-header-sparkles {
    width: 16px;
    height: 16px;
  }
  .reveg-chatbot-root .mobile-menu-button {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    background: transparent !important;
    border: none !important;
  }
  .reveg-chatbot-root .mobile-menu-button svg {
    width: 20px;
    height: 20px;
    display: block;
  }
  .reveg-chatbot-root .desktop-new-thread,
  .reveg-chatbot-root .chat-new-thread-button.desktop-new-thread {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  .reveg-chatbot-root .chat-header-status.desktop-only {
    display: none;
  }
  .reveg-chatbot-root .chat-new-thread-button.mobile-new-thread {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    color: #6b7280;
    transition: color 0.2s ease;
  }
  .reveg-chatbot-root .chat-new-thread-button.mobile-new-thread:hover {
    color: #374151;
  }
  .reveg-chatbot-root .chat-new-thread-button.mobile-new-thread svg {
    width: 20px;
    height: 20px;
  }
  .reveg-chatbot-root .chat-header-status {
    padding: 3px 6px;
    border-radius: 12px;
  }
  .reveg-chatbot-root .chat-status-dot {
    width: 4px;
    height: 4px;
  }
  .reveg-chatbot-root .chat-status-text {
    font-size: 10px;
  }
  .reveg-chatbot-root .chat-welcome {
    padding: 40px 20px 32px 20px;
  }
  .reveg-chatbot-root .chat-welcome h2 {
    font-size: 28px;
  }
  .reveg-chatbot-root .chat-welcome p {
    font-size: 16px;
  }
  .reveg-chatbot-root .chat-feature-grid,
  .reveg-chatbot-root .chart-showcase-grid,
  .reveg-chatbot-root .chat-example-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .reveg-chatbot-root .chat-feature-grid {
      gap: 20px;
      margin-bottom: 40px;
  }
  .reveg-chatbot-root .chart-showcase-grid {
    max-width: 100%;
  }
  .reveg-chatbot-root .chart-showcase-item {
    padding: 12px;
  }
  .reveg-chatbot-root .chart-showcase-content h4 {
    font-size: 13px;
  }
  .reveg-chatbot-root .chart-showcase-content p {
    font-size: 11px;
  }
  .reveg-chatbot-root .chat-feature-card {
    padding: 20px;
  }
  .reveg-chatbot-root .chat-example-button {
    padding: 14px 16px;
    font-size: 13px;
  }
  .reveg-chatbot-root .chat-messages {
    padding: 8px 15px 8px 15px;
  }
  .reveg-chatbot-root .chat-messages-constrained {
    gap: 13px;
  }
  .reveg-chatbot-root .chat-input-area {
    padding: 0px 16px 6px 16px;
  }
  
  /* MOBILE TABLE WIDTH FIX - Allow tables to break out of message constraints */
  
  /* Override the message container constraints for tables */
  .reveg-chatbot-root .chat-fullscreen-container .chat-message:has(.chat-table-container) {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* Fallback for browsers without :has() support */
  .reveg-chatbot-root .chat-fullscreen-container .chat-message.has-table {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* Tables in fullscreen chat should use full width */
  .reveg-chatbot-root .chat-fullscreen-container .chat-table-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 5px 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Ensure the message constrained container is overridden */
  .reveg-chatbot-root .chat-fullscreen-container .chat-messages-constrained {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
  }
  

  
  /* But remove padding for messages with tables */
  .reveg-chatbot-root .chat-fullscreen-container .chat-message:has(.chat-table-container),
  .reveg-chatbot-root .chat-fullscreen-container .chat-message.has-table {
    padding: 0 !important;
  }
  
  /* Table exporters should also break out of constraints */
  .reveg-chatbot-root .chat-fullscreen-container .table-exporter {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Exportable tables should use available width */
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    border-radius: 12px !important; /* Keep border radius */
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Table content should have proper padding restored */
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table .table-header {
    padding: 16px 20px 12px 20px !important;
  }
  
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table th,
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table td {
    padding: 12px 16px !important;
    font-size: 13px !important;
  }
  
  /* Wide table cards should also break out */
  .reveg-chatbot-root .chat-fullscreen-container .wide-table-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Chart containers should also break out of constraints */
  .reveg-chatbot-root .chat-fullscreen-container .chart-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Chart exporters should break out too */
  .reveg-chatbot-root .chat-fullscreen-container .chart-exporter {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Ensure tables have proper minimum width for readability */
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table table {
    min-width: 600px !important; /* Minimum width for readable tables */
    width: auto !important;
    table-layout: auto !important;
  }
  
  /* Custom scrollbar for mobile tables */
  .reveg-chatbot-root .chat-fullscreen-container .chat-table-container::-webkit-scrollbar,
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table::-webkit-scrollbar,
  .reveg-chatbot-root .chat-fullscreen-container .wide-table-card::-webkit-scrollbar {
    height: 6px !important;
    background: transparent !important;
  }
  
  .reveg-chatbot-root .chat-fullscreen-container .chat-table-container::-webkit-scrollbar-thumb,
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table::-webkit-scrollbar-thumb,
  .reveg-chatbot-root .chat-fullscreen-container .wide-table-card::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 6px !important;
    border: 2px solid transparent !important;
    background-clip: content-box !important;
  }
  
  .reveg-chatbot-root .chat-fullscreen-container .chat-table-container::-webkit-scrollbar-thumb:hover,
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table::-webkit-scrollbar-thumb:hover,
  .reveg-chatbot-root .chat-fullscreen-container .wide-table-card::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
    background-clip: content-box !important;
  }
  
  .reveg-chatbot-root .chat-fullscreen-container .chat-table-container::-webkit-scrollbar-track,
  .reveg-chatbot-root .chat-fullscreen-container .exportable-table::-webkit-scrollbar-track,
  .reveg-chatbot-root .chat-fullscreen-container .wide-table-card::-webkit-scrollbar-track {
    background: #f8fafc !important;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
  }
  
  /* MOBILE TABLE CONTROLS - Hide action button text, show Sources text but hide icon */
  
  /* Hide text for Download, Embed, Share buttons on mobile */
  .reveg-chatbot-root .export-btn span {
    display: none !important;
  }
  
  /* Show Sources text but hide the Sources icon */
  .reveg-chatbot-root .transparency-toggle .toggle-text {
    display: inline !important;
  }
  
  .reveg-chatbot-root .transparency-toggle .toggle-icon {
    display: none !important;
  }
  
  /* Adjust transparency toggle layout without icon */
  .reveg-chatbot-root .transparency-toggle {
    gap: 4px !important;
  }
}

/* Desktop responsive */
@media (min-width: 769px) {
  .reveg-chatbot-root .mobile-menu-button {
    display: none;
  }
  .reveg-chatbot-root .desktop-new-thread {
    display: flex;
  }
}

/* ==========================================================================
 PIE CHART MODERN REDESIGN
========================================================================== */

.reveg-chatbot-root .pie-chart-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
width: 100% !important;
border-radius: 16px;
overflow: hidden;
}

.reveg-chatbot-root .pie-tooltip {
background: rgba(17, 24, 39, 0.96);
border-radius: 12px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
padding: 16px 20px;
min-width: 160px;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}

.reveg-chatbot-root .pie-tooltip-label {
color: #e5e7eb;
font-size: 13px;
font-weight: 600;
margin-bottom: 8px;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.reveg-chatbot-root .pie-tooltip-value {
color: #ffffff;
font-size: 16px;
font-weight: 700;
margin-bottom: 4px;
}

.reveg-chatbot-root .pie-tooltip-percentage {
color: #9ca3af;
font-size: 14px;
font-weight: 500;
}

.reveg-chatbot-root .pie-legend-container {
width: 100%;
padding: 0 20px 16px 20px;
}

.reveg-chatbot-root .pie-legend {
width: 100%;
}

.reveg-chatbot-root .pie-legend-grid {
display: grid;
gap: 12px;
width: 100%;
}

.reveg-chatbot-root .pie-legend.desktop .pie-legend-grid {
grid-template-columns: repeat(2, 1fr);
}

.reveg-chatbot-root .pie-legend.mobile .pie-legend-grid {
grid-template-columns: 1fr;
gap: 8px;
}

.reveg-chatbot-root .pie-legend-item {
display: flex;
align-items: center;
gap: 12px;
padding: 8px 12px;
background: #f9fafb;
border-radius: 8px;
border: 1px solid #e5e7eb;
transition: all 0.2s ease;
}

.reveg-chatbot-root .pie-legend-item:hover {
background: #f3f4f6;
border-color: #d1d5db;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reveg-chatbot-root .pie-legend-color {
width: 14px;
height: 14px;
border-radius: 50%;
flex-shrink: 0;
border: 2px solid rgba(255, 255, 255, 0.8);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reveg-chatbot-root .pie-legend-content {
flex: 1;
min-width: 0;
}

.reveg-chatbot-root .pie-legend-label {
font-size: 14px;
font-weight: 600;
color: #1f2937 !important;
margin-bottom: 2px;
line-height: 1.3;
word-wrap: break-word;
}

.reveg-chatbot-root .pie-legend-details {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}

.reveg-chatbot-root .pie-legend-value {
font-size: 13px;
font-weight: 700;
color: #374151 !important;
}

.reveg-chatbot-root .pie-legend-percentage {
font-size: 12px;
font-weight: 500;
color: #6b7280 !important;
}

@media (max-width: 768px) {
  .reveg-chatbot-root .pie-legend-container {
    padding: 0 16px 12px 16px;
  }
  .reveg-chatbot-root .pie-legend-item {
    padding: 10px;
    gap: 10px;
  }
  .reveg-chatbot-root .pie-legend-color {
    width: 12px;
    height: 12px;
  }
  .reveg-chatbot-root .pie-legend-label {
    font-size: 13px;
  }
  .reveg-chatbot-root .pie-legend-value {
    font-size: 12px;
  }
  .reveg-chatbot-root .pie-legend-percentage {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .reveg-chatbot-root .pie-legend-container {
    padding: 0 12px 12px 12px;
  }
  .reveg-chatbot-root .pie-legend-item {
    padding: 8px;
    gap: 8px;
  }
  .reveg-chatbot-root .pie-legend-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

.reveg-chatbot-root .new-chat-button svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
}



/* Examples page */
.reveg-chatbot-root .examples-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow-y: auto;
  padding: 24px;
}

.reveg-chatbot-root .examples-header {
  margin-bottom: 32px;
}

.reveg-chatbot-root .examples-back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.reveg-chatbot-root .examples-back-button:hover {
  background: var(--gray-100);
  color: var(--text-secondary);
}

.reveg-chatbot-root .examples-back-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.reveg-chatbot-root .examples-header h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.reveg-chatbot-root .examples-header p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
}

.reveg-chatbot-root .examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.reveg-chatbot-root .example-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.reveg-chatbot-root .example-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-bg-light) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 0;
}

.reveg-chatbot-root .example-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.reveg-chatbot-root .example-card:hover::before {
  opacity: 1;
}

.reveg-chatbot-root .example-card:active {
  transform: translateY(0);
}

.reveg-chatbot-root .example-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.reveg-chatbot-root .example-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.reveg-chatbot-root .example-card:hover .example-card-icon {
  background: var(--primary);
  color: white;
}

.reveg-chatbot-root .example-card-category {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--gray-100);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reveg-chatbot-root .example-card:hover .example-card-category {
  background: var(--primary-light);
  color: var(--primary);
}

.reveg-chatbot-root .example-card-content {
  position: relative;
  z-index: 1;
}

.reveg-chatbot-root .example-card-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.reveg-chatbot-root .example-card-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}

.reveg-chatbot-root .example-card-prompt {
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--gray-50);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 16px;
}

.reveg-chatbot-root .example-card:hover .example-card-prompt {
  background: var(--primary-bg-light);
  border-left-color: var(--primary-hover);
}

.reveg-chatbot-root .example-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.reveg-chatbot-root .example-card-try {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.reveg-chatbot-root .example-card:hover .example-card-try {
  color: var(--primary);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .reveg-chatbot-root .examples-page {
    padding: 16px;
  }
  
  .reveg-chatbot-root .examples-header {
    margin-bottom: 24px;
  }
  
  .reveg-chatbot-root .examples-header h2 {
    font-size: 24px;
  }
  
  .reveg-chatbot-root .examples-header p {
    font-size: 14px;
  }
  
  .reveg-chatbot-root .examples-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .reveg-chatbot-root .example-card {
    padding: 16px;
  }
  
  .reveg-chatbot-root .example-card-content h3 {
    font-size: 16px;
  }
  
  .reveg-chatbot-root .example-card-content p {
    font-size: 13px;
  }
  
  .reveg-chatbot-root .example-card-prompt {
    font-size: 13px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .reveg-chatbot-root .examples-grid {
    grid-template-columns: 1fr;
  }
  
  .reveg-chatbot-root .example-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .reveg-chatbot-root .example-card-category {
    align-self: flex-end;
  }
}

/* ==========================================================================
 CHART EXAMPLES PAGE - Clean, minimal 2-column layout
========================================================================== */

.reveg-chatbot-root .examples-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.reveg-chatbot-root .example-chart-card {
  background: var(--bg-primary);
  border: 1px solid #f1f3f4;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.reveg-chatbot-root .example-chart-card:hover {
  border-color: #e1e3e4;
}

.reveg-chatbot-root .example-chart-header {
  padding: 20px 20px 16px 20px;
}

.reveg-chatbot-root .example-chart-header h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.reveg-chatbot-root .example-chart-header p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.reveg-chatbot-root .example-chart-container {
  padding: 20px;
  background: var(--bg-primary);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.reveg-chatbot-root .example-chart-container .chart-exporter {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.reveg-chatbot-root .example-chart-container .chart-wrapper {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.reveg-chatbot-root .example-chart-container .chart-wrapper h4 {
  display: none;
}

.reveg-chatbot-root .example-chart-container .chart-content-container {
  flex: 1;
  min-height: 0;
}

/* Hide export controls in examples */
.reveg-chatbot-root .example-chart-container .export-controls {
  display: none;
}

.reveg-chatbot-root .example-chart-footer {
  padding: 16px 20px 20px 20px;
  background: var(--bg-primary);
}

.reveg-chatbot-root .example-chart-prompt {
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 12px;
  text-align: center;
}

.reveg-chatbot-root .example-chart-try-btn {
  background: #f8f9fa;
  color: var(--text-secondary);
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
}

.reveg-chatbot-root .example-chart-try-btn:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

/* Mobile responsive for chart examples */
@media (max-width: 1024px) {
  .reveg-chatbot-root .examples-charts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .reveg-chatbot-root .examples-charts-grid {
    gap: 16px;
  }
  
  .reveg-chatbot-root .example-chart-header {
    padding: 16px 16px 12px 16px;
  }
  
  .reveg-chatbot-root .example-chart-header h3 {
    font-size: 14px;
  }
  
  .reveg-chatbot-root .example-chart-header p {
    font-size: 11px;
  }
  
  .reveg-chatbot-root .example-chart-container {
    padding: 16px;
    height: 260px;
  }
  
  .reveg-chatbot-root .example-chart-footer {
    padding: 12px 16px 16px 16px;
  }
  
  .reveg-chatbot-root .example-chart-prompt {
    font-size: 10px;
    margin-bottom: 10px;
  }
  
  .reveg-chatbot-root .example-chart-try-btn {
    padding: 6px 12px;
    font-size: 10px;
  }
}

/* ==========================================================================
   QUERY TRANSPARENCY PANEL - Modern professional sources dropdown
========================================================================== */

/* Query transparency panel no longer needs container styles - using portal approach */

.reveg-chatbot-root .transparency-toggle {
  padding: 6px 8px !important;
  background: none !important;
  border: none !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  font-size: 12px !important;
  color: #6b7280 !important;
  white-space: nowrap !important;
}

.reveg-chatbot-root .transparency-toggle:hover {
  background: none !important;
  border-color: #d1d5db !important;
}

.reveg-chatbot-root .toggle-icon {
  width: 14px !important;
  height: 14px !important;
  color: #6b7280 !important;
  flex-shrink: 0 !important;
}

.reveg-chatbot-root .toggle-text {
  font-weight: 500 !important;
  color: inherit !important;
}

.reveg-chatbot-root .expand-arrow {
  width: 14px !important;
  height: 14px !important;
  transition: transform 0.2s ease !important;
  color: #9ca3af !important;
  transform: rotate(0deg) !important;
  flex-shrink: 0 !important;
}

.reveg-chatbot-root .expand-arrow.expanded {
  transform: rotate(180deg) !important;
}

/* Modern transparency dropdown container */
.reveg-chatbot-root .transparency-container {
  background: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Section styling */
.reveg-chatbot-root .transparency-data-section {
  padding: 14px 16px 12px 16px !important;
}

.reveg-chatbot-root .transparency-section-header {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin: 0 0 10px 0 !important;
}

/* Info list styling */
.reveg-chatbot-root .transparency-info-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.reveg-chatbot-root .transparency-info-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

.reveg-chatbot-root .transparency-icon {
  width: 16px !important;
  height: 16px !important;
  color: #6b7280 !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
}

.reveg-chatbot-root .transparency-info-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.reveg-chatbot-root .transparency-label {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #9ca3af !important;
  line-height: 1.2 !important;
}

.reveg-chatbot-root .transparency-value {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #111827 !important;
  line-height: 1.4 !important;
  word-break: break-word !important;
}

/* Divider */
.reveg-chatbot-root .transparency-divider {
  height: 1px !important;
  background: #e5e7eb !important;
  margin: 0 !important;
}

/* Sources section special styling */
.reveg-chatbot-root .transparency-sources-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.reveg-chatbot-root .transparency-sources-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.reveg-chatbot-root .transparency-sources-list {
  margin-left: 26px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  max-height: 150px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
}

/* Custom scrollbar for sources list */
.reveg-chatbot-root .transparency-sources-list::-webkit-scrollbar {
  width: 4px !important;
}

.reveg-chatbot-root .transparency-sources-list::-webkit-scrollbar-track {
  background: #f3f4f6 !important;
  border-radius: 2px !important;
}

.reveg-chatbot-root .transparency-sources-list::-webkit-scrollbar-thumb {
  background: #d1d5db !important;
  border-radius: 2px !important;
}

.reveg-chatbot-root .transparency-sources-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af !important;
}

.reveg-chatbot-root .transparency-source-item {
  font-size: 12px !important;
  color: #374151 !important;
  line-height: 1.4 !important;
  padding: 2px 0 !important;
}

.reveg-chatbot-root .transparency-source-text {
  color: inherit !important;
}

.reveg-chatbot-root .transparency-source-text a {
  color: #3b82f6 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.15s ease !important;
}

.reveg-chatbot-root .transparency-source-text a:hover {
  color: #2563eb !important;
  text-decoration: underline !important;
}

.reveg-chatbot-root .transparency-show-more-btn {
  margin-top: 4px !important;
  padding: 4px 6px !important;
  background: none !important;
  border: none !important;
  color: #6b7280 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

  /* Restore padding on individual messages */
  .reveg-chatbot-root .chat-fullscreen-container .chat-message {
    padding: 0 8px !important;
  }

.reveg-chatbot-root .transparency-show-more-btn:hover {
  color: #374151 !important;
  text-decoration: none !important;
}

.reveg-chatbot-root .transparency-chevron {
  width: 12px !important;
  height: 12px !important;
  color: #9ca3af !important;
  transition: transform 0.2s ease !important;
  flex-shrink: 0 !important;
}

.reveg-chatbot-root .transparency-chevron.rotated {
  transform: rotate(180deg) !important;
}

.reveg-chatbot-root .transparency-no-sources {
  font-size: 12px !important;
  color: #9ca3af !important;
  font-style: italic !important;
}

/* Footer styling */
.reveg-chatbot-root .transparency-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 16px !important;
  background: #fafbfc !important;
  border-top: 1px solid #e5e7eb !important;
}

.reveg-chatbot-root .transparency-view-btn {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  background: white !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.reveg-chatbot-root .transparency-view-btn:hover {
  background: #f9fafb !important;
  border-color: #d1d5db !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.reveg-chatbot-root .transparency-btn-icon {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}

/* Mobile Modal Styles */
.reveg-chatbot-root .transparency-mobile-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(0, 0, 0, 0.5) !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  animation: fadeIn 0.2s ease-out !important;
  inset: 0 !important;
  margin: 0 !important;
  padding-top: env(safe-area-inset-top, 0) !important;
  padding-right: env(safe-area-inset-right, 0) !important;
  padding-bottom: env(safe-area-inset-bottom, 0) !important;
  padding-left: env(safe-area-inset-left, 0) !important;
}

@keyframes fadeIn {
  from {
    opacity: 0 !important;
  }
  to {
    opacity: 1 !important;
  }
}

/* iOS-specific viewport fixes for modal overlay */
@supports (-webkit-touch-callout: none) {
  .reveg-chatbot-root .transparency-mobile-modal-overlay {
    min-height: -webkit-fill-available !important;
    min-width: -webkit-fill-available !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    inset: 0 !important;
    overflow: hidden !important;
  }
}

.reveg-chatbot-root .transparency-mobile-modal {
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
  width: 90vw !important;
  max-width: 500px !important;
  max-height: 80vh !important;
  overflow: hidden !important;
  animation: slideUp 0.3s ease-out !important;
  display: flex !important;
  flex-direction: column !important;
}

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

.reveg-chatbot-root .transparency-mobile-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 20px 24px !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #f8fafc !important;
  flex-shrink: 0 !important;
}

.reveg-chatbot-root .transparency-mobile-modal-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #111827 !important;
  margin: 0 !important;
}

.reveg-chatbot-root .transparency-mobile-modal-close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  color: #6b7280 !important;
  transition: all 0.15s ease !important;
}

.reveg-chatbot-root .transparency-mobile-modal-close:hover {
  background: #f3f4f6 !important;
  color: #374151 !important;
}

.reveg-chatbot-root .transparency-mobile-modal-close-icon {
  width: 20px !important;
  height: 20px !important;
}

.reveg-chatbot-root .transparency-mobile-modal-content {
  flex: 1 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Enhanced sources list for mobile */
.reveg-chatbot-root .transparency-mobile-modal .transparency-sources-list {
  max-height: 300px !important;
  overflow-y: auto !important;
}

/* Mobile modal text size adjustments */
.reveg-chatbot-root .transparency-mobile-modal .transparency-section-header {
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-label {
  font-size: 13px !important;
  font-weight: 500 !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-value {
  font-size: 15px !important;
  font-weight: 400 !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-source-item {
  font-size: 14px !important;
  line-height: 1.5 !important;
  padding: 4px 0 !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-source-text {
  font-size: 14px !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-show-more-btn {
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 8px 12px !important;
  margin-top: 8px !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-view-btn {
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 10px 16px !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-icon {
  width: 18px !important;
  height: 18px !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-btn-icon {
  width: 16px !important;
  height: 16px !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-data-section {
  padding: 18px 20px 16px 20px !important;
}

.reveg-chatbot-root .transparency-mobile-modal .transparency-footer {
  padding: 16px 20px !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .reveg-chatbot-root .transparency-dropdown-portal {
    width: 300px !important;
  }
  
  .reveg-chatbot-root .transparency-data-section {
    padding: 12px 14px 10px 14px !important;
  }
  
  .reveg-chatbot-root .transparency-section-header {
    font-size: 10px !important;
    margin-bottom: 8px !important;
  }
  
  .reveg-chatbot-root .transparency-icon {
    width: 14px !important;
    height: 14px !important;
  }
  
  .reveg-chatbot-root .transparency-info-item {
    gap: 8px !important;
  }
  
  .reveg-chatbot-root .transparency-label {
    font-size: 10px !important;
  }
  
  .reveg-chatbot-root .transparency-value {
    font-size: 12px !important;
  }
  
  .reveg-chatbot-root .transparency-source-item {
    font-size: 11px !important;
  }
  
  .reveg-chatbot-root .transparency-footer {
    padding: 10px 14px !important;
  }
  
  /* Mobile modal specific adjustments */
  .reveg-chatbot-root .transparency-mobile-modal {
    width: 95vw !important;
    max-height: 85vh !important;
  }
  
  .reveg-chatbot-root .transparency-mobile-modal-header {
    padding: 16px 20px !important;
  }
  
  .reveg-chatbot-root .transparency-mobile-modal-title {
    font-size: 17px !important;
    font-weight: 600 !important;
  }
  
  /* Further mobile text adjustments for very small screens */
  .reveg-chatbot-root .transparency-mobile-modal .transparency-section-header {
    font-size: 12px !important;
  }
  
  .reveg-chatbot-root .transparency-mobile-modal .transparency-label {
    font-size: 12px !important;
  }
  
  .reveg-chatbot-root .transparency-mobile-modal .transparency-value {
    font-size: 14px !important;
  }
  
  .reveg-chatbot-root .transparency-mobile-modal .transparency-source-item {
    font-size: 13px !important;
  }
  
  .reveg-chatbot-root .transparency-mobile-modal .transparency-source-text {
    font-size: 13px !important;
  }
  
  .reveg-chatbot-root .transparency-mobile-modal .transparency-show-more-btn {
    font-size: 13px !important;
  }
  
  .reveg-chatbot-root .transparency-mobile-modal .transparency-view-btn {
    font-size: 13px !important;
  }
}

/* Chart and Table Action Rows */
.reveg-chatbot-root .chart-actions-row,
.reveg-chatbot-root .table-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
}

.reveg-chatbot-root .chart-feedback-controls,
.reveg-chatbot-root .table-feedback-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Fullscreen-specific dropdown positioning */
.reveg-chatbot-root .chat-fullscreen-container .reveg-chatbot-pill-dropdown {
position: fixed !important;
background: white !important;
border: 1px solid #e2e8f0 !important;
border-radius: 8px !important;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
z-index: 1000 !important;
padding: 8px !important;
min-width: 670px !important;
max-height: 400px !important;
overflow-y: auto !important;
/* Center relative to the main content area, accounting for sidebar */
left: calc(280px + (100vw - 280px) / 2) !important;
transform: translateX(-50%) !important;
}

/* Fullscreen with collapsed sidebar */
.reveg-chatbot-root .chat-fullscreen-container.sidebar-collapsed .reveg-chatbot-pill-dropdown {
left: calc(72px + (100vw - 72px) / 2) !important;
}

/* Mobile fullscreen - no sidebar adjustment needed */
@media (max-width: 768px) {
.reveg-chatbot-root .chat-fullscreen-container .reveg-chatbot-pill-dropdown {
position: fixed !important;
left: 16px !important;
right: 16px !important;
width: auto !important;
min-width: auto !important;
max-width: none !important;
transform: none !important;
max-height: 60vh !important;
border-radius: 12px !important;
padding: 12px !important;
}

.reveg-chatbot-root .chat-fullscreen-container.sidebar-collapsed .reveg-chatbot-pill-dropdown {
left: 16px !important;
}
}

/* Chart no-data state */
.chart-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e0;
  border-radius: 8px;
  margin: 1rem 0;
  min-height: 200px;
}

.chart-no-data-icon {
  margin-bottom: 1rem;
  color: #9ca3af;
}

.chart-no-data-icon svg {
  width: 48px;
  height: 48px;
}

.chart-no-data-message {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
  max-width: 400px;
  line-height: 1.5;
}

.chart-disclaimer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #6b7280;
  max-width: 500px;
}

.chart-disclaimer .data-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fff3cd;
  border: 1px solid #ffd700;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #856404;
}

.chart-disclaimer .data-disclaimer svg {
  width: 16px;
  height: 16px;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

/* Table no-data state */
.table-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e0;
  border-radius: 8px;
  margin: 1rem 0;
  min-height: 200px;
}

.table-no-data-icon {
  margin-bottom: 1rem;
  color: #9ca3af;
}

.table-no-data-icon svg {
  width: 48px;
  height: 48px;
}

.table-no-data-message {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
  max-width: 400px;
  line-height: 1.5;
}

.table-disclaimer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #6b7280;
  max-width: 500px;
}

.table-disclaimer .data-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
}

/* NEW: Fullscreen chat exportable table wrapper - always full width */
.reveg-chatbot-root .chat-fullscreen-container .table-exporter {
width: 100%;
min-width: 100%;
}

/* ========================================================================== 
   ACCORDION TABLE STYLES - for streamlined response approach 
   ========================================================================== */

/* Table accordion container */
.reveg-chatbot-root .table-accordion {
  border-radius: 8px;
  overflow: visible;
  margin-bottom: 8px;
}

/* Accordion header (clickable summary box) */
.reveg-chatbot-root .table-accordion-header {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.15s ease;
  margin: 12px 0;
}

.reveg-chatbot-root .table-accordion-header:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.reveg-chatbot-root .table-accordion-header.expanded {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #f3f4f6;
  margin-bottom: 0;
}

/* Accordion content (text + meta) */
.reveg-chatbot-root .accordion-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* Icon container for the heroicon */
.reveg-chatbot-root .accordion-icon-container {
  width: 36px;
  height: 36px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reveg-chatbot-root .accordion-heroicon {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

/* Text content container */
.reveg-chatbot-root .accordion-text-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

/* Accordion text */
.reveg-chatbot-root .accordion-text {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
}

/* Accordion meta (row count) */
.reveg-chatbot-root .accordion-meta {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  line-height: 1.3;
}

/* Accordion expand/collapse icon */
.reveg-chatbot-root .accordion-icon {
  width: 28px;
  height: 28px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.reveg-chatbot-root .table-accordion-header:hover .accordion-icon {
  background: #f9fafb;
  color: #374151;
}

/* Accordion content container */
.reveg-chatbot-root .table-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.reveg-chatbot-root .table-accordion-content.expanded {
  max-height: 9999px; /* Very large value to accommodate any table size */
  overflow: visible; /* No scroll bars */
}

/* Table container within accordion content */
.reveg-chatbot-root .table-accordion-content .table-container {
  border: 1px solid #e5e7eb;
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  background: white;
  overflow: hidden;
}

/* Data table within accordion */
.reveg-chatbot-root .table-accordion-content .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.reveg-chatbot-root .table-accordion-content .data-table th,
.reveg-chatbot-root .table-accordion-content .data-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.reveg-chatbot-root .table-accordion-content .data-table th {
  background: #fff;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
}

.reveg-chatbot-root .table-accordion-content .data-table td {
  font-size: 14px;
  color: #4b5563;
}

.reveg-chatbot-root .table-accordion-content .data-table tr:last-child td {
  border-bottom: none;
}

/* Loading spinner for table expansion */
.reveg-chatbot-root .loading-spinner {
  animation: spin 1s linear infinite;
  width: 16px;
  height: 16px;
  color: #3b82f6;
}

/* ==========================================================================
   AVAILABILITY CELL STYLING - Green and red Heroicons
   ========================================================================== */

.reveg-chatbot-root .availability-cell {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px !important;
}

.reveg-chatbot-root .availability-cell.available svg {
  color: #22c55e !important; /* Green-500 */
}

.reveg-chatbot-root .availability-cell.unavailable svg {
  color: #ef4444 !important; /* Red-500 */
}

/* Ensure availability icons are properly sized and centered */
.reveg-chatbot-root .availability-cell svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
}

/* Hover effects for availability cells */
.reveg-chatbot-root .availability-cell.available svg:hover {
  color: #16a34a !important; /* Green-600 on hover */
}

.reveg-chatbot-root .availability-cell.unavailable svg:hover {
  color: #dc2626 !important; /* Red-600 on hover */
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Error state for table expansion */
.reveg-chatbot-root .expansion-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-top: 8px;
  display: flex;
  align-items: center;
}

/* Professional header action buttons */
.reveg-chatbot-root .header-actions {
  display: flex;
  gap: 8px;
  margin-right: 12px;
  align-items: center;
}

.reveg-chatbot-root .header-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.reveg-chatbot-root .header-action-btn:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reveg-chatbot-root .header-action-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reveg-chatbot-root .header-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.reveg-chatbot-root .header-action-btn .action-icon {
  width: 16px;
  height: 16px;
}

/* Success state for header buttons */
.reveg-chatbot-root .header-action-btn.success {
  background: #dcfdf7;
  border-color: #10b981;
  color: #047857;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .reveg-chatbot-root .header-actions {
    gap: 6px;
    margin-right: 8px;
  }
  
  .reveg-chatbot-root .header-action-btn {
    width: 28px;
    height: 28px;
  }
  
  .reveg-chatbot-root .header-action-btn .action-icon {
    width: 14px;
    height: 14px;
  }
}

.reveg-chatbot-root .expansion-error .error-text {
  color: #dc2626;
  font-size: 14px;
  flex: 1;
}

.reveg-chatbot-root .expansion-error .retry-button {
  background: #dc2626;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.reveg-chatbot-root .expansion-error .retry-button:hover {
  background: #b91c1c;
}

/* ==========================================================================
 USER MESSAGE ACTIONS - Hover-triggered copy and edit functionality
 ========================================================================== */

.reveg-chatbot-root .chat-user-actions {
  position: absolute;
  top: 100%;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin-top: -2px;
  padding: 4px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease 0.1s, transform 0.15s ease 0.1s;
  pointer-events: none;
  z-index: 10;
}

.reveg-chatbot-root .chat-message.user:hover .chat-user-actions,
.reveg-chatbot-root .chat-user-actions:hover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.reveg-chatbot-root .chat-user-action-button {
  padding: 6px;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s ease;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0;
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
}

.reveg-chatbot-root .chat-user-action-button:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.1);
  box-shadow: none;
}

.reveg-chatbot-root .chat-user-action-button.active.copy-success {
  background: rgba(34, 197, 94, 0.15);
}

.reveg-chatbot-root .chat-user-action-button.active.copy-success .chat-user-action-icon {
  color: #22c55e;
}

.reveg-chatbot-root .chat-user-action-icon {
  width: 18px;
  height: 18px;
  color: #6b7280;
  transition: color 0.2s ease;
}

.reveg-chatbot-root .chat-user-action-button:hover .chat-user-action-icon {
  color: #374151;
}

.reveg-chatbot-root .chat-user-action-button:focus {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
  box-shadow: 0 0 0 2px rgba(74, 142, 219, 0.3);
}

.reveg-chatbot-root .chat-user-action-button:focus .chat-user-action-icon {
  color: #374151;
}

/* Edit Interface Styling */
.reveg-chatbot-root .chat-edit-container {
  width: 100%;
  max-width: none !important; /* Override bubble max-width constraint */
  min-width: 400px; /* Ensure minimum comfortable width */
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  /* Break out of bubble constraints */
  margin-left: -14px;
  margin-right: -14px;
  padding: 0 14px;
}

.reveg-chatbot-root .chat-edit-textarea {
  width: 100%;
  min-width: 350px; /* Ensure comfortable minimum width */
  min-height: 60px;
  max-height: 200px;
  padding: 12px 16px; /* Slightly more padding for better UX */
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: #ffffff;
  resize: vertical;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box; /* Ensure padding is included in width */
}

.reveg-chatbot-root .chat-edit-textarea:focus {
  border-color: #4a8edb;
  box-shadow: 0 0 0 2px rgba(74, 142, 219, 0.1);
}

.reveg-chatbot-root .chat-edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.reveg-chatbot-root .chat-edit-send,
.reveg-chatbot-root .chat-edit-cancel {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

/* Mobile responsiveness for edit container */
@media (max-width: 480px) {
  .reveg-chatbot-root .chat-edit-container {
    min-width: unset; /* Remove minimum width constraint on mobile */
    margin-left: -7px; /* Adjust for smaller bubble padding on mobile */
    margin-right: -7px;
    padding: 0 7px;
  }
  
  .reveg-chatbot-root .chat-edit-textarea {
    min-width: unset; /* Remove minimum width constraint on mobile */
    padding: 10px 12px; /* Slightly smaller padding on mobile */
  }
}

.reveg-chatbot-root .chat-edit-send {
  background: #4a8edb;
  color: white;
  border-color: #4a8edb;
}

.reveg-chatbot-root .chat-edit-send:hover {
  background: #3a7bd5;
  border-color: #3a7bd5;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(74, 142, 219, 0.2);
}

.reveg-chatbot-root .chat-edit-cancel {
  background: #ffffff;
  color: #6b7280;
  border-color: #d1d5db;
}

.reveg-chatbot-root .chat-edit-cancel:hover {
  background: #f9fafb;
  color: #374151;
  border-color: #9ca3af;
}

/* Typing indicator */

/* ==========================================================================
   EMBED MODAL STYLES - Professional & Modern Design
========================================================================== */

/* Modal overlay - uses portal to render outside chatbot container */
.embed-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: var(--backdrop) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  
  /* Typography and inheritance overrides */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: var(--text-secondary) !important;
  box-sizing: border-box !important;
}

.embed-modal-overlay * {
  box-sizing: border-box !important;
  font-family: inherit !important;
}

/* Modal content container */
.embed-modal-content {
  background: var(--bg-primary) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-xl) !important;
  max-width: 640px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow: hidden !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--border-light) !important;
}

/* Modal body */
.embed-modal-body {
  padding: 40px !important;
  overflow-y: auto !important;
  max-height: 90vh !important;
}

/* Header section */
.embed-modal-header {
  margin-bottom: 32px !important;
  text-align: center !important;
}

.embed-modal-title {
  font-size: 28px !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
}

.embed-modal-subtitle {
  font-size: 16px !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

/* Instructions section */
.embed-modal-instructions {
  margin-bottom: 28px !important;
  padding: 24px !important;
  background: var(--bg-secondary) !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-light) !important;
}

.embed-modal-instructions h4 {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  margin: 0 0 16px 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.embed-modal-instructions h4::before {
  content: '📋' !important;
  font-size: 16px !important;
}

.embed-modal-instructions ol {
  margin: 0 !important;
  padding-left: 24px !important;
  list-style: decimal !important;
}

.embed-modal-instructions li {
  font-size: 15px !important;
  color: var(--text-secondary) !important;
  margin-bottom: 8px !important;
  line-height: 1.6 !important;
  list-style: decimal !important;
}

/* Code container */
.embed-code-container {
  margin-bottom: 24px !important;
}

.embed-code-block {
  position: relative !important;
  background: var(--gray-900) !important;
  border-radius: 12px !important;
  padding: 20px 60px 20px 20px !important;
  border: 1px solid var(--gray-700) !important;
  box-shadow: var(--shadow-md) !important;
}

.embed-code-text {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: var(--gray-100) !important;
  word-break: break-all !important;
  white-space: pre-wrap !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  resize: none !important;
  overflow: hidden !important;
}

/* Copy button in code block */
.embed-copy-button {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  background: var(--gray-700) !important;
  color: var(--gray-100) !important;
  border: 1px solid var(--gray-600) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.embed-copy-button:hover {
  background: var(--gray-600) !important;
  border-color: var(--gray-500) !important;
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow-md) !important;
}

/* Tip section */
.embed-modal-tip {
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
  padding: 20px !important;
  background: var(--primary-bg-light) !important;
  border-radius: 12px !important;
  border: 1px solid var(--primary-border) !important;
  margin-bottom: 32px !important;
}

.embed-modal-tip-icon {
  flex-shrink: 0 !important;
  width: 24px !important;
  height: 24px !important;
  color: var(--primary) !important;
  margin-top: 2px !important;
}

.embed-modal-tip-icon svg {
  width: 24px !important;
  height: 24px !important;
}

.embed-modal-tip-text {
  font-size: 15px !important;
  color: var(--text-secondary) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

.embed-modal-tip-text strong {
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

/* Action buttons */
.embed-modal-actions {
  display: flex !important;
  gap: 16px !important;
  justify-content: flex-end !important;
  margin-top: 32px !important;
  padding-top: 24px !important;
  border-top: 1px solid var(--border-light) !important;
}

.embed-modal-actions .btn-secondary {
  background: var(--bg-primary) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: 10px !important;
  padding: 12px 24px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 44px !important;
}

.embed-modal-actions .btn-secondary:hover {
  background: var(--bg-secondary) !important;
  border-color: var(--gray-400) !important;
  color: var(--text-secondary) !important;
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow-sm) !important;
}

.embed-modal-actions .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
  color: var(--text-inverse) !important;
  border: 1px solid var(--primary) !important;
  border-radius: 10px !important;
  padding: 12px 24px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 44px !important;
  box-shadow: var(--shadow-primary) !important;
}

.embed-modal-actions .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #2d6bb8 100%) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-primary-lg) !important;
}

.embed-modal-actions .btn-primary:active {
  transform: translateY(0) !important;
  box-shadow: var(--shadow-primary) !important;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .embed-modal-overlay {
    padding: 16px !important;
  }
  
  .embed-modal-content {
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 95vh !important;
  }
  
  .embed-modal-body {
    padding: 32px 24px !important;
  }
  
  .embed-modal-title {
    font-size: 24px !important;
  }
  
  .embed-modal-subtitle {
    font-size: 15px !important;
  }
  
  .embed-modal-instructions {
    padding: 20px !important;
  }
  
  .embed-code-block {
    padding: 16px 50px 16px 16px !important;
  }
  
  .embed-modal-actions {
    flex-direction: column-reverse !important;
    gap: 12px !important;
  }
  
  .embed-modal-actions .btn-secondary,
  .embed-modal-actions .btn-primary {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Animation for modal appearance */
@keyframes embed-modal-appear {
  from {
    opacity: 0 !important;
    transform: scale(0.95) translateY(20px) !important;
  }
  to {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
  }
}

.embed-modal-content {
  animation: embed-modal-appear 0.3s ease-out !important;
}


