/* Font Face - NexaRegular */
@font-face {
    font-family: 'NexaRegular';
    src: url('../fonts/nexa-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties for Easy Customization */
:root {
    /* Default colors - can be overridden by admin settings */
    --lugenius-primary-color: #02B462;
    --lugenius-background-color: #ffffff;
    --lugenius-user-message-bg: #18C581;
    --lugenius-user-message-text: #FFFFFF;
    --lugenius-ai-message-bg: #FFFFFF;
    --lugenius-ai-message-text: #727272;
    --lugenius-header-bg: #FFFFFF;
    --lugenius-header-text: #02B462;
    --lugenius-input-border: #dddddd;

    /* System variables */
    --lugenius-chat-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --lugenius-chat-radius: 16px;
    --lugenius-chat-font: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Prevent body scroll when overlay is open */
body.lugenius-overlay-open {
    overflow: hidden;
}

/* Chat Container Styles */
.lugenius-chat-container {
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: var(--lugenius-chat-radius);
    background: var(--lugenius-background-color);
    box-shadow: var(--lugenius-chat-shadow), 0 2px 6px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lugenius-chat-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Chat Header */
.lugenius-chat-header {
    background: var(--lugenius-header-bg);
    color: var(--lugenius-header-text);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.lugenius-chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.lugenius-chat-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}



/* Chat Messages */
.lugenius-chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    max-width: 645px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.lugenius-message {
    display: flex;
    animation: fadeInUp 0.4s ease-out;
    max-width: 100%;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Messages - Green bubbles on right */
.lugenius-message.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    max-width: 70%;
}

.user-message .message-text {
    background: #10b981;
    color: white;
    padding: 14px 20px;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    word-wrap: break-word;
}

/* Bot Messages - White cards on left */
.lugenius-message.bot-message {
    justify-content: flex-start;
}

.bot-message .message-content {
    max-width: 65%;
    background: var(--lugenius-ai-message-bg, white) !important;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Bot Message Header with Logo */
.bot-message .message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px 12px;
    background: var(--lugenius-ai-message-bg, transparent);
    border-radius: 16px 16px 0 0;
}

.bot-message .message-logo-icon {
    width: 15px;
    flex-shrink: 0;
}

.bot-message .message-logo {
    font-size: 16px;
    font-weight: 700;
    color: #013934;
    letter-spacing: -0.3px;
    margin-top: 5px;
}

.bot-message .message-icon {
    display: none;
}

/* Bot Message Text */
.bot-message .message-text {
    background: transparent;
    color: #374151;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.6;
    border: none;
    box-shadow: none;
}

/* Markdown elements in bot messages */
.bot-message .message-text strong {
    font-weight: 700;
    color: #1f2937;
}

.bot-message .message-text em {
    font-style: italic;
}

.bot-message .message-text ol {
    margin: 8px 0;
    padding-left: 20px;
}

.bot-message .message-text li {
    margin: 4px 0;
    line-height: 1.5;
}

/* Remove old avatar styles */
.message-avatar {
    display: none;
}

.message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
    padding: 0 20px;
}

.user-message .message-time {
    text-align: right;
    padding: 0;
}

.message-audio {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-message .message-audio {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.audio-label {
    font-size: 14px;
    font-style: italic;
}

/* Typing Indicator - Green dots */
.typing-indicator {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.typing-indicator .typing-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 16px 20px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingAnimation {

    0%,
    80%,
    100% {
        transform: scale(0.7);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Chat Input */
.lugenius-chat-input {
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
    padding: 20px;
    position: relative;
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: white;
    border-radius: 28px;
    padding: 8px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
}

.input-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    background: var(--lugenius-input-border, linear-gradient(90deg, #ABF6A6 0%, #A663FF 17%, #32D6A0 37%, #008419 59%, #00EAFF 79%, #32D6A0 100%));
    z-index: -1;
    pointer-events: none;
}

.input-container:focus-within {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

#lugenius-chat-textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    max-height: 120px;
    padding: 12px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
    color: #ffffff !important;
}

#lugenius-chat-textarea::placeholder {
    color: #9ca3af !important;
    font-style: italic;
}

#lugenius-chat-textarea:focus {
    color: #ffffff !important;
}

#lugenius-chat-textarea:hover {
    color: #ffffff !important;
}

#lugenius-chat-textarea:not(:focus) {
    color: #ffffff !important;
}

.input-actions {
    display: flex;
    gap: 4px;
}

.record-btn,
.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--lugenius-primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.record-btn::before,
.send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.record-btn:hover::before,
.send-btn:hover::before {
    opacity: 1;
}

.record-btn:hover,
.send-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: scale(1.08) translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4), 0 3px 8px rgba(0, 0, 0, 0.12);
}

.record-btn:active,
.send-btn:active {
    transform: scale(1.02);
    transition: transform 0.1s ease;
}

.record-btn.recording {
    background: #ef4444;
    animation: recordingPulse 1s infinite;
}

.record-btn.recording .dashicons-controls-pause {
    color: #ffffff;
    font-size: 16px;
}

@keyframes recordingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Audio Recording Indicator */
.audio-recording-indicator {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recording-animation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recording-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: recordingDot 1s infinite;
}

@keyframes recordingDot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.recording-text {
    font-size: 14px;
    font-weight: 500;
    color: #92400e;
}

.stop-recording-btn {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.stop-recording-btn:hover {
    background: #dc2626;
}

/* Floating Chat Styles */
.lugenius-floating-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.chat-toggle-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--lugenius-primary-color, linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%));
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.chat-toggle-btn:hover {
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.5), 0 4px 12px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.chat-toggle-btn .dashicons {
    font-size: 24px;
}

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.floating-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    max-height: 680px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.floating-chat-header {
    background: var(--lugenius-header-bg, linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%));
    color: var(--lugenius-header-text, #1e293b);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
}

.floating-chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.7) 0%, transparent 50%, rgba(255, 255, 255, 0.3) 100%);
    pointer-events: none;
}

.floating-chat-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #334155;
}

.close-chat-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-chat-btn:hover {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    transform: scale(1.1);
}

.floating-chat-content .lugenius-chat-container {
    border: none;
    box-shadow: none;
    height: 560px;
}

.floating-chat-content .lugenius-chat-header {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .floating-chat-window {
        width: calc(100vw - 40px);
        right: -10px;
        bottom: 70px;
    }

    .lugenius-chat-container {
        height: 350px !important;
    }

    .message-content {
        max-width: 85%;
    }

    .chat-toggle-btn {
        width: 50px;
        height: 50px;
    }

    .chat-toggle-btn .dashicons {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .lugenius-floating-chat {
        bottom: 15px;
        right: 15px;
    }

    .floating-chat-window {
        width: calc(100vw - 30px);
        right: -7px;
    }
}

/* NO DARK MODE SUPPORT - ALWAYS LIGHT THEME */

/* Accessibility */
.record-btn:focus,
.send-btn:focus,
.chat-toggle-btn:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}


/* Scrollbar styling */
.lugenius-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.lugenius-chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.lugenius-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.lugenius-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Audio transcript styling */
.audio-transcript {
    font-style: italic;
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border-left: 2px solid #3b82f6;
}

/* Audio message styling */
.message-audio-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.audio-indicator {
    color: #ffffff;
    font-size: 14px;
    flex-shrink: 0;
}

/* Force light theme - override any dark theme styles */
.lugenius-chat-container,
.lugenius-floating-chat,
.floating-chat-window {
    background: #ffffff !important;
    color: #1e293b !important;
}

.lugenius-chat-header,
.floating-chat-header {
    background: var(--lugenius-header-bg, linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)) !important;
    color: var(--lugenius-header-text, #1e293b) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.lugenius-chat-messages {
    background: transparent !important;
}

.lugenius-chat-input {
    background: var(--lugenius-background-color, linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%)) !important;
    border-top: 1px solid var(--lugenius-input-border, rgba(226, 232, 240, 0.8)) !important;
}

.message-text {
    background: var(--lugenius-ai-message-bg, white) !important;
    color: var(--lugenius-ai-message-text, #1e293b) !important;
    border: none !important;
}

.user-message .message-text {
    background: var(--lugenius-user-message-bg, linear-gradient(135deg, #059669 0%, #047857 100%)) !important;
    color: var(--lugenius-user-message-text, white) !important;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

.record-btn,
.send-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

.chat-toggle-btn {
    background: var(--lugenius-primary-color, linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%)) !important;
}

/* Hide question tags IMMEDIATELY when CSS loads */
/* This targets text nodes that contain question tags */

/* Question Suggestions Fixed Area */
.lugenius-suggestions-area {
    flex-shrink: 0;
    background: transparent;
    max-height: 140px;
    overflow: auto;
}

/* Question Suggestions Styles */
.lugenius-question-suggestions {
    background: var(--lugenius-ai-message-bg, #f1f5f9);
    border: 1px solid var(--lugenius-input-border, #e2e8f0);
    border-radius: 8px;
    padding: 12px 16px;
    height: auto;
    overflow: hidden;
    display: block;
    max-height: fit-content;
    transition: all 0.3s ease;
    margin: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lugenius-question-suggestions.has-suggestions {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-top: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        max-height: 120px;
        padding-top: 12px;
        padding-bottom: 12px;
        margin-top: 16px;
        transform: translateY(0);
    }
}

/* Scroll indicator shadow */
.lugenius-question-suggestions::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lugenius-question-suggestions.scrollable::after {
    opacity: 0;
}

.suggestions-header {
    margin-bottom: 8px;
}

.suggestions-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--lugenius-ai-message-text, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestions-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.suggestion-button {
    background: var(--lugenius-ai-message-bg, #f1f5f9) !important;
    border: 1px solid var(--lugenius-input-border, #e2e8f0) !important;
    border-radius: 12px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    color: var(--lugenius-ai-message-text, #334155) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
    line-height: 1.4 !important;
    display: inline-block !important;
    width: auto !important;
    white-space: nowrap !important;
}

.suggestion-button:hover {
    background: var(--lugenius-user-message-bg, #3b82f6) !important;
    color: var(--lugenius-user-message-text, #ffffff) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.suggestion-button:active {
    transform: translateY(0) !important;
}

.pergunta-trigger {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

/* Custom scrollbar for suggestions */
.lugenius-question-suggestions::-webkit-scrollbar {
    width: 6px;
}

.lugenius-question-suggestions::-webkit-scrollbar-track {
    background: var(--lugenius-background-color, #f1f5f9);
    border-radius: 3px;
}

.lugenius-question-suggestions::-webkit-scrollbar-thumb {
    background: var(--lugenius-input-border, #cbd5e1);
    border-radius: 3px;
}

.lugenius-question-suggestions::-webkit-scrollbar-thumb:hover {
    background: var(--lugenius-primary-color, #94a3b8);
}

.perguntafixa-trigger {
    position: relative;
    display: none !important;
    visibility: hidden !important;
}

/* Utility classes for common inline styles */
.lugenius-hidden {
    display: none !important;
}

.lugenius-chat-input-white-text {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Force BLACK text color in input - multiple selectors for maximum specificity */
.lugenius-floating-chat #lugenius-chat-textarea,
.floating-chat-window #lugenius-chat-textarea,
div#lugenius-chat-textarea,
textarea#lugenius-chat-textarea,
#lugenius-chat-textarea,
#lugenius-chat-textarea:focus,
#lugenius-chat-textarea:hover,
#lugenius-chat-textarea:active,
#lugenius-chat-textarea:not(:focus) {
    color: #000000 !important;
    background: transparent !important;
    -webkit-text-fill-color: #000000 !important;
}

.lugenius-floating-chat #lugenius-chat-textarea::placeholder,
.floating-chat-window #lugenius-chat-textarea::placeholder,
#lugenius-chat-textarea::placeholder,
#lugenius-chat-textarea::-webkit-input-placeholder,
#lugenius-chat-textarea::-moz-placeholder,
#lugenius-chat-textarea:-ms-input-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #9ca3af !important;
}

/* Additional override for any dark theme interference */
.lugenius-floating-chat textarea,
.floating-chat-window textarea,
.lugenius-chat-input textarea {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* EXTREME override for text visibility - FORCE BLACK TEXT */
html body .lugenius-floating-chat #lugenius-floating-chat-window .floating-chat-content .lugenius-chat-input .input-container #lugenius-chat-textarea,
html body .lugenius-floating-chat #lugenius-floating-chat-window .floating-chat-content .lugenius-chat-input .input-container textarea#lugenius-chat-textarea,
html body #lugenius-floating-chat #lugenius-floating-chat-window .floating-chat-content .lugenius-chat-input textarea,
html body div#lugenius-floating-chat div#lugenius-floating-chat-window div.floating-chat-content div.lugenius-chat-input textarea#lugenius-chat-textarea,
textarea#lugenius-chat-textarea[style*="color"] {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background-color: transparent !important;
}

/* Override any inherited dark colors - FORCE WHITE */
*:not(:focus)>#lugenius-chat-textarea,
*:not(:hover)>#lugenius-chat-textarea {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Link Buttons Styles */
.lugenius-link-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 20px;
}

.lugenius-link-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    background: var(--lugenius-primary-color, #2271b1) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    min-height: 36px !important;
    max-width: 200px !important;
    overflow: hidden !important;
}

.lugenius-link-button:hover {
    background: var(--lugenius-primary-color, #1e5a8a) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.lugenius-link-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.lugenius-link-button .link-icon {
    display: none !important;
}

.lugenius-link-button .link-text {
    flex: 1 !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

/* Responsive adjustments for link buttons */
@media (max-width: 480px) {
    .lugenius-link-buttons-container {
        gap: 6px !important;
    }

    .lugenius-link-button {
        padding: 6px 10px !important;
        font-size: 12px !important;
        border-radius: 16px !important;
        max-width: 150px !important;
        min-height: 32px !important;
    }

    .lugenius-link-button .link-icon {
        font-size: 12px !important;
    }
}

/* Ensure link buttons appear above message text */
.lugenius-message .message-content {
    position: relative;
}

.lugenius-link-buttons-container+.message-text {
    position: relative;
    z-index: 1;
}

/* Animation for link buttons appearing */
.lugenius-link-button {
    animation: slideInButton 0.3s ease-out;
}

@keyframes slideInButton {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   NEW CHAT BAR LAYOUT - Fixed Bottom
   ======================================== */

/* Main Chat Bar Container */
.lugenius-chat-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100000 !important;
    pointer-events: none;
    /* Allow clicks through transparent areas */
}

/* Chat Bar Fixed Container */
.lugenius-chat-bar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 40px 20px;
    background: transparent;
    pointer-events: auto;
    max-width: 100%;
    margin: 0 auto;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* AI Icon (Left Side) - White circle with dark icon */
button.chat-bar-icon,
.chat-bar-icon {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    border-radius: 50% !important;
    background: white !important;
    color: #1a1a1a !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 800 !important;
    font-size: 28px !important;
    position: relative !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.chat-bar-icon::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--lugenius-input-border, linear-gradient(90deg, #ABF6A6 0%, #A663FF 17%, #32D6A0 37%, #008419 59%, #00EAFF 79%, #32D6A0 100%));
    z-index: -1;
    pointer-events: none;
}

.chat-bar-icon .dashicons,
.chat-bar-icon span {
    font-size: 28px;
    color: #1a1a1a;
}

/* Input Wrapper (Center) - White with green border */
.chat-bar-input-wrapper {
    flex: 1;
    max-width: 645px;
    position: relative;
    background: var(--lugenius-input-bg, white);
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    border: none;
    transition: all 0.3s ease;
    padding: 7px 130px 7px 24px;
    height: 59px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.chat-bar-input-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 53px;
    background: var(--lugenius-input-border, linear-gradient(90deg, #ABF6A6 0%, #A663FF 17%, #32D6A0 37%, #008419 59%, #00EAFF 79%, #32D6A0 100%));
    z-index: -1;
    pointer-events: none;
}

.chat-bar-input-wrapper:focus-within {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

/* Textarea */
.chat-bar-textarea {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: 15px;
    line-height: 20px;
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
    max-height: 29px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    text-overflow: clip;
}

.message-text a {
    color: var(--lugenius-primary-color, #02B462) !important;
}

.chat-bar-textarea::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
}

/* Send Button (Inside Input - Right) - Green circle with icon */
/* Audio Button */
button.chat-bar-audio-btn,
button[type="button"].chat-bar-audio-btn,
button#lugenius-audio-btn {
    position: absolute !important;
    right: 58px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #f3f4f6 !important;
    border: none !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    box-shadow: none !important;
}

button.chat-bar-audio-btn:hover,
button[type="button"].chat-bar-audio-btn:hover,
button#lugenius-audio-btn:hover {
    background: #e5e7eb !important;
    color: #10b981 !important;
}

.chat-bar-audio-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Audio Button Recording State */
.chat-bar-audio-btn.recording {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    animation: recordingPulse 1.5s infinite;
}

/* Stop Icon (Square) */
.dashicons-stop-icon::before {
    content: "" !important;
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
    border-radius: 2px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

@keyframes recordingPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Send Button */
button.chat-bar-send-btn,
button[type="button"].chat-bar-send-btn,
button#lugenius-send-btn {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--lugenius-send-button-bg, #10b981) !important;
    border: none !important;
    color: var(--lugenius-send-button-icon, white) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
}

button.chat-bar-send-btn:hover,
button[type="button"].chat-bar-send-btn:hover,
button#lugenius-send-btn:hover {
    background: var(--lugenius-send-button-bg, #059669) !important;
    transform: translateY(-50%) scale(1.05) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
}

button.chat-bar-send-btn:active,
button[type="button"].chat-bar-send-btn:active,
button#lugenius-send-btn:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.chat-bar-send-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Microphone icon animation */
.chat-bar-send-btn .dashicons-microphone {
    animation: microphonePulse 2s ease-in-out infinite;
}

@keyframes microphonePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Chat Overlay (Full Screen) */
.lugenius-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    pointer-events: auto;
    animation: fadeInOverlay 0.3s ease-out;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes overlaySlideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes overlaySlideDown {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

/* Full Screen Container */
.chat-overlay-fullscreen {
    width: 100%;
    height: 100vh;
    /* fallback */
    height: 100dvh;
    /* dynamic viewport height for mobile */
    background: var(--lugenius-background-gradient, linear-gradient(135deg, #FFFFFF 2%, #E8FDF2 54%, #E9FFE1 88%));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
}

.chat-overlay-fullscreen.slide-up {
    animation: overlaySlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.chat-overlay-fullscreen.slide-down {
    animation: overlaySlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Preview mode - reset transform */
.preview-mode .chat-overlay-fullscreen {
    transform: translateY(0);
}

/* Top Bar */
.chat-overlay-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: var(--lugenius-header-bg, white);
    color: var(--lugenius-header-text, #1e293b);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 10;
    --z-index: 10;
}

.chat-logo {
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.chat-logo h2 {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--lugenius-header-text, #10b981) !important;
    letter-spacing: -0.5px !important;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.chat-topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

button.chat-action-btn,
button[type="button"].chat-action-btn,
a.chat-action-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 14px 28px !important;
    background: var(--lugenius-primary-color, #02B462) !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

button.chat-action-btn:hover,
button[type="button"].chat-action-btn:hover,
a.chat-action-btn:hover {
    background: var(--lugenius-primary-color, #029954) !important;
    filter: brightness(0.9) !important;
    transform: scale(1.02) !important;
}

.chat-action-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.chat-action-btn .dashicons-external {
    margin-top: -6px;
}

button.close-overlay-btn,
button[type="button"].close-overlay-btn,
.close-overlay-btn {
    background: transparent !important;
    border: none !important;
    color: var(--lugenius-header-text, #9ca3af) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: inherit !important;
}

button.close-overlay-btn:hover,
button[type="button"].close-overlay-btn:hover,
.close-overlay-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--lugenius-header-text, #6b7280) !important;
}

.close-overlay-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Main Content Area */
.chat-overlay-main {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 40px 20px 0;
    overflow-y: auto;
    height: 100%;
}

/* Welcome Section */
.chat-welcome-section {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    min-height: 100%;
}

.welcome-content {
    text-align: center;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.welcome-greeting {
    font-size: 18px !important;
    color: #6b7280 !important;
    margin: 0 0 12px 0 !important;
    font-weight: 500 !important;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.welcome-title {
    font-size: 48px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin: 0 0 16px 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -1px !important;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.welcome-description {
    font-size: 18px !important;
    color: #6b7280 !important;
    margin: 0 !important;
    line-height: 1.6 !important;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Suggestions Cards */
.lugenius-suggestions-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
}

.suggestion-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.suggestion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #10b981;
}

.suggestion-card-text {
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
}

.suggestion-card-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.suggestion-card:hover .suggestion-card-icon {
    color: #10b981;
    transform: translate(4px, -4px);
}

/* Messages Section */
.chat-messages-section {
    width: 100%;
    max-width: 900px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-messages-section .lugenius-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: transparent;
    min-height: 0;
    max-width: 645px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Bottom Input (in overlay) */
.chat-overlay-input-container {
    padding: 0 40px 20px;
    background: transparent;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 20;
}

.chat-overlay-input-wrapper {
    width: 100%;
    max-width: 645px;
    position: relative;
    background: var(--lugenius-input-bg, white);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
    transition: all 0.3s ease;
    padding: 7px 130px 7px 24px;
    height: 59px;
    display: flex;
    align-items: center;
    overflow: visible;
    box-sizing: border-box;
}

.chat-overlay-input-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 35px;
    background: var(--lugenius-input-border, linear-gradient(90deg, #ABF6A6 0%, #A663FF 17%, #32D6A0 37%, #008419 59%, #00EAFF 79%, #32D6A0 100%));
    z-index: -1;
    pointer-events: none;
}

.chat-overlay-input-wrapper:focus-within {
    box-shadow: 0 8px 40px rgba(16, 185, 129, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.chat-overlay-textarea {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-family: 'NexaRegular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: 16px;
    line-height: 24px;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    height: 24px;
    max-height: 24px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    text-overflow: clip;
}

.chat-overlay-textarea::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
}

/* Overlay Audio Button */
.chat-overlay-audio-btn,
#lugenius-overlay-audio-btn {
    position: absolute !important;
    right: 68px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #f3f4f6 !important;
    border: none !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0px !important;
}

.chat-overlay-audio-btn:hover {
    background: #e5e7eb;
    color: #10b981;
}

.chat-overlay-audio-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Overlay Audio Button Recording State */
.chat-overlay-audio-btn.recording,
#lugenius-overlay-audio-btn.recording {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    animation: recordingPulse 1.5s infinite;
}

/* Stop Icon for Overlay */
.chat-overlay-audio-btn .dashicons-stop-icon::before,
#lugenius-overlay-audio-btn .dashicons-stop-icon::before {
    content: "" !important;
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
    border-radius: 2px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

/* Overlay Send Button */
.chat-overlay-send-btn,
#lugenius-overlay-send-btn {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--lugenius-send-button-bg, #10b981) !important;
    border: none !important;
    color: var(--lugenius-send-button-icon, white) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
    z-index: 100 !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0px !important;
}

.chat-overlay-send-btn:hover {
    background: var(--lugenius-send-button-bg, #059669);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.chat-overlay-send-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.chat-overlay-send-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

/* Suggestions Area (Above Input Bar) - Floating buttons */
.lugenius-chat-bar .lugenius-suggestions-area {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 900px;
    pointer-events: auto;
}

.lugenius-chat-bar .lugenius-question-suggestions {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    max-height: none;
    overflow: visible;
}

.lugenius-chat-bar .suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 0;
}

.lugenius-chat-bar .suggestion-button {
    background: white !important;
    border: 2px solid transparent !important;
    border-radius: 20px 4px 20px 20px !important;
    padding: 12px 28px !important;
    font-size: 14px !important;
    color: #1a1a1a !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: normal !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-block !important;
    animation: floatIn 0.5s ease-out backwards !important;
    background-clip: padding-box !important;
    position: relative !important;
    text-align: center !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.lugenius-chat-bar .suggestion-button::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 20px 4px 20px 20px !important;
    padding: 2px !important;
    background: linear-gradient(135deg, #10b981 0%, #e2e8f0 100%) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.lugenius-chat-bar .suggestion-button.removing {
    animation: floatOut 0.5s ease-out forwards !important;
}

.lugenius-chat-bar .suggestion-button:nth-child(1) {
    animation-delay: 0.1s !important;
}

.lugenius-chat-bar .suggestion-button:nth-child(2) {
    animation-delay: 0.2s !important;
}

.lugenius-chat-bar .suggestion-button:nth-child(3) {
    animation-delay: 0.3s !important;
}

.lugenius-chat-bar .suggestion-button:hover {
    background: #f9fafb !important;
    transform: translateY(-1px) !important;
    animation: none !important;
}

.lugenius-chat-bar .suggestion-button:hover::before {
    background: linear-gradient(135deg, #059669 0%, #cbd5e1 100%) !important;
    animation: none !important;
}

.lugenius-chat-bar .suggestion-button:active {
    transform: translateY(0) !important;
    background: #f1f5f9 !important;
    animation: none !important;
}

/* Audio Recording Indicator for Bar */
.lugenius-chat-bar-container .audio-recording-indicator {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 12px 20px;
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
    white-space: nowrap;
}

/* Scroll to Bottom Elements */
.chat-messages-section {
    position: relative;
}

.chat-bottom-gradient {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 200px !important;
    background: linear-gradient(to top, #D9FFFC 0%, #E9FFE1 15%, transparent 100%) !important;
    pointer-events: none !important;
    z-index: 5 !important;
    display: block !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.chat-bottom-gradient:not(.lugenius-hidden) {
    opacity: 1 !important;
    visibility: visible !important;
}

.chat-bottom-gradient.lugenius-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

@keyframes fadeInGradient {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.chat-scroll-to-bottom {
    position: fixed !important;
    bottom: 150px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 48px !important;
    height: 48px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    border: 2px solid #d1d5db !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    padding: 0px !important;
    z-index: 15 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.chat-scroll-to-bottom:not(.lugenius-hidden) {
    opacity: 1 !important;
    visibility: visible !important;
}

.chat-scroll-to-bottom:hover {
    transform: translateX(-50%) scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
    background: #f8f9fa !important;
}

.chat-scroll-to-bottom.lugenius-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

@keyframes fadeInButton {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.chat-scroll-to-bottom:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    transform: translateX(-50%) translateY(0) scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.chat-scroll-to-bottom .dashicons {
    font-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
    color: #1e293b !important;
}

/* Chat Bar Responsive */
@media (max-width: 1100px) {
    .lugenius-chat-bar-container {
        margin-left: 0px;
    }
}

/* Messages Responsive */
@media (max-width: 768px) {
    .lugenius-chat-messages {
        padding: 16px;
        gap: 16px;
    }

    .user-message .message-content {
        max-width: 85%;
    }

    .bot-message .message-content {
        max-width: 85%;
    }

    .bot-message .message-header {
        padding: 12px 16px 10px;
    }

    .bot-message .message-logo-icon {
        width: 20px;
        height: 26px;
    }

    .bot-message .message-logo {
        font-size: 14px;
    }

    .bot-message .message-text {
        padding: 14px 16px;
        font-size: 14px;
    }

    .user-message .message-text {
        padding: 12px 16px;
        font-size: 14px;
    }

}

@media (max-width: 480px) {

    .user-message .message-content,
    .bot-message .message-content {
        max-width: 95%;
    }

    .bot-message .message-text {
        font-size: 13px;
        padding: 12px 16px;
    }

    .user-message .message-text {
        font-size: 13px;
        padding: 10px 14px;
    }


    .bot-message .message-header {
        padding: 10px 16px 8px;
    }

    .bot-message .message-logo-icon {
        width: 18px;
        height: 24px;
    }

    .bot-message .message-logo {
        font-size: 13px;
    }
}

/* Responsive Design for Chat Bar */
@media (max-width: 768px) {
    .lugenius-chat-bar-container {
        gap: 16px;
        padding: 16px 20px 20px;
        background: transparent;
    }

    .chat-bar-icon {
        width: 56px;
        height: 56px;
        min-width: 56px;
        background: white;
        color: #1a1a1a;
    }

    .chat-bar-icon .dashicons {
        font-size: 28px;
        width: 28px;
        height: 28px;
        color: #1a1a1a;
    }

    .chat-bar-input-wrapper {
        border-radius: 40px;
        padding: 7px 130px 7px 20px;
        background: var(--lugenius-input-bg, white);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.06);
        height: 59px;
    }

    .chat-bar-textarea {
        font-size: 14px;
        line-height: 20px;
        color: #6b7280 !important;
        max-height: 28px;
    }

    .chat-bar-send-btn {
        width: 40px;
        height: 40px;
        background: var(--lugenius-send-button-bg, #10b981);
        color: var(--lugenius-send-button-icon, white);
        right: 6px;
    }

    .chat-bar-send-btn .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    .chat-bar-audio-btn {
        width: 40px;
        height: 40px;
        right: 58px;
    }

    .chat-bar-audio-btn .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    .lugenius-chat-bar .lugenius-suggestions-area {
        width: calc(100% - 40px);
        margin-bottom: 12px;
    }

    .lugenius-chat-bar .suggestions-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .lugenius-chat-bar .suggestion-button {
        font-size: 13px !important;
        padding: 10px 24px !important;
        background: white !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    }

    /* Overlay Responsive */
    .chat-overlay-topbar {
        padding: 16px 20px;
    }

    .chat-logo h2 {
        font-size: 22px !important;
    }

    .chat-action-btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .welcome-title {
        font-size: 32px;
    }

    .welcome-greeting,
    .welcome-description {
        font-size: 16px;
    }

    .lugenius-suggestions-cards {
        grid-template-columns: 1fr;
    }

    .chat-overlay-input-container {
        padding: 0 20px 20px;
    }
}

@media (max-width: 480px) {
    .lugenius-chat-bar-container {
        gap: 12px;
        padding: 12px 16px 20px;
        background: transparent;
    }

    .chat-bar-icon {
        width: 52px;
        height: 52px;
        min-width: 52px;
        background: white;
        color: #1a1a1a;
    }

    .chat-bar-icon .dashicons {
        font-size: 26px;
        width: 26px;
        height: 26px;
        color: #1a1a1a;
    }

    .chat-bar-input-wrapper {
        max-width: none;
        padding: 7px 130px 7px 16px;
        border-radius: 35px;
        background: var(--lugenius-input-bg, white);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
        height: 59px;
    }

    .chat-bar-textarea {
        font-size: 13px;
        line-height: 18px;
        max-height: 28px;
    }

    .chat-bar-send-btn {
        width: 40px;
        height: 40px;
        background: var(--lugenius-send-button-bg, #10b981);
        color: var(--lugenius-send-button-icon, white);
        right: 6px;
    }

    .chat-bar-send-btn .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    .chat-bar-audio-btn {
        width: 40px;
        height: 40px;
        right: 58px;
    }

    .chat-bar-audio-btn .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    .lugenius-chat-bar .suggestion-button {
        width: fit-content !important;
    }

    .lugenius-chat-bar .lugenius-suggestions-area {
        width: calc(100% - 32px);
        margin-bottom: 10px;
    }

    .lugenius-chat-bar .suggestions-list {
        gap: 8px;
    }

    .lugenius-chat-bar .suggestion-button {
        font-size: 12px !important;
        padding: 9px 20px !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12), 0 2px 5px rgba(0, 0, 0, 0.08) !important;
    }

    /* Overlay Mobile */
    .chat-overlay-topbar {
        flex-wrap: nowrap;
        gap: 12px;
        padding: 12px 16px;
        justify-content: space-between;
    }

    .chat-logo {
        flex: 0 1 auto;
        min-width: 0;
    }

    .chat-logo h2 {
        font-size: 16px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .chat-topbar-actions {
        flex-shrink: 0;
        gap: 8px;
    }

    .chat-action-btn span:not(.dashicons) {
        display: inline !important;
        font-size: 13px;
    }

    .chat-action-btn {
        padding: 10px 16px;
        width: auto;
        height: auto;
        justify-content: center;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .chat-action-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .close-overlay-btn {
        flex-shrink: 0;
        width: 32px;
        height: 32px;
    }

    .welcome-title {
        font-size: 28px;
    }

    .welcome-greeting,
    .welcome-description {
        font-size: 14px;
    }

    .chat-overlay-input-wrapper {
        max-width: none;
        padding: 7px 130px 7px 20px;
    }

    .chat-overlay-textarea {
        font-size: 15px;
    }
}

/* Hide old floating chat elements */
.lugenius-floating-chat {
    display: none !important;
}

.floating-chat-window {
    display: none !important;
}

.chat-toggle-btn {
    display: none !important;
}