/**
 * FindNity Chatbot Styles
 *
 * Styled to match the FindNity website design
 */

/* ===================================
   CHATBOT CONTAINER
   =================================== */

#findnity-chatbot {
    position: fixed;
    bottom: 0;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
    z-index: 10001 !important;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#findnity-chatbot.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

#findnity-chatbot.minimized .chatbot-window {
    height: 60px;
    overflow: hidden;
}

/* ===================================
   CHATBOT WINDOW
   =================================== */

.chatbot-window {
    background: #f5f5f7;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: height 0.3s ease;
}

/* ===================================
   CHATBOT HEADER
   =================================== */

.chatbot-header {
    background: rgba(245, 245, 247, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1a1a1a;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.chatbot-logo {
    width: 32px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    padding: 2px;
}

.chatbot-logo i {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
}

.chatbot-logo img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-header-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 14px !important;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatbot-header p {
    margin: 0;
    font-size: 11px !important;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    color: #666666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-indicator {
    font-size: 8px;
    color: #4ade80;
    /* NO animation - static green dot */
}

.chatbot-controls {
    display: flex;
    gap: 8px;
}

.chatbot-controls button {
    background: #f5f5f5;
    border: none;
    color: #666666;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-controls button:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

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

.chatbot-controls button i {
    font-size: 14px;
}

/* ===================================
   CONVERSATION AREA
   =================================== */

#chatbot-conversation {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f7;
    scroll-behavior: smooth;
    min-height: 0;
    z-index: 0;
}

#chatbot-conversation::-webkit-scrollbar {
    width: 6px;
}

#chatbot-conversation::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

#chatbot-conversation::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#chatbot-conversation::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

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

.chatbot-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: messageFadeIn 0.2s ease-out forwards;
}

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

.chatbot-message.show {
    opacity: 1;
}

.chatbot-window .message-content,
#chatbot-conversation .message-content {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
}

.chatbot-window .bot-message .message-content,
#chatbot-conversation .bot-message .message-content {
    align-self: flex-start;
    background: #e5e5ea !important;
    color: #1a1a1a !important;
    border: none;
    border-bottom-left-radius: 4px;
    cursor: text;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    user-select: text;
}

.chatbot-window .bot-message .message-content:hover,
#chatbot-conversation .bot-message .message-content:hover {
}

.chatbot-window .bot-message .message-content:hover *,
#chatbot-conversation .bot-message .message-content:hover * {
}


.chatbot-window .user-message .message-content,
#chatbot-conversation .user-message .message-content {
    background: #3b82f6 !important;
    color: #ffffff !important;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    border: none;
    /* Disable tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: text;
}

/* Selection color for user messages */
.chatbot-window .user-message .message-content::selection,
#chatbot-conversation .user-message .message-content::selection,
.chatbot-window .user-message .message-content *::selection,
#chatbot-conversation .user-message .message-content *::selection {
    background: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

.chatbot-window .user-message .message-content:hover,
#chatbot-conversation .user-message .message-content:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.chatbot-window .user-message .message-content:active,
#chatbot-conversation .user-message .message-content:active {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

/* Ensure all text inside user message is white */
.chatbot-window .user-message .message-content *,
#chatbot-conversation .user-message .message-content * {
    color: #ffffff !important;
}

/* Keep colors on hover/active/tap state */
.chatbot-window .user-message .message-content:hover *,
#chatbot-conversation .user-message .message-content:hover *,
.chatbot-window .user-message .message-content:active *,
#chatbot-conversation .user-message .message-content:active * {
    color: #ffffff !important;
}

.chatbot-window .bot-message .message-content:active *,
#chatbot-conversation .bot-message .message-content:active * {
    color: #1a1a1a !important;
}

.chatbot-window .message-timestamp,
#chatbot-conversation .message-timestamp {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
}

.chatbot-window .bot-message .message-timestamp,
#chatbot-conversation .bot-message .message-timestamp {
    align-self: flex-start;
}

.chatbot-window .user-message .message-timestamp,
#chatbot-conversation .user-message .message-timestamp {
    align-self: flex-end;
}

.chatbot-window .welcome-message .message-content,
#chatbot-conversation .welcome-message .message-content {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.chatbot-window .error-message .message-content,
#chatbot-conversation .error-message .message-content {
    background: #ffe5e5;
    color: #e74c3c;
    border: 1px solid #ffcccc;
}

/* ===================================
   TYPING INDICATOR
   =================================== */

.typing-indicator {
    align-self: flex-start;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typingBounce 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 typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Thinking Indicator (like ChatGPT) */
.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.thinking-indicator i {
    color: #3b82f6;
    font-size: 16px;
    animation: brainPulse 1.5s ease-in-out infinite;
}

.thinking-text {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.dots {
    display: inline-flex;
    gap: 2px;
}

.dots .dot {
    animation: dotBlink 1.4s infinite;
    color: #3b82f6;
    font-weight: bold;
}

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

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

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

@keyframes brainPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes dotBlink {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

/* ===================================
   QUICK REPLIES
   =================================== */

.chatbot-quick-replies {
    padding: 12px 20px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: none;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
    min-height: 70px;
    max-height: 70px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.quick-reply-btn,
.suggestion-btn {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 18px !important;
    border-radius: 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    letter-spacing: 0.3px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.quick-reply-btn:hover,
.suggestion-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4) !important;
    background: #60a5fa !important;
}

.quick-reply-btn:active,
.suggestion-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3) !important;
}

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

.chatbot-quick-suggestions {
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    animation: slideUp 0.3s ease;
}

.chatbot-quick-suggestions::-webkit-scrollbar {
    display: none;
}

.suggestions-title {
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.suggestion-chip {
    background: #f3f4f6;
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.suggestion-chip i {
    font-size: 12px;
}

.suggestion-chip:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.chatbot-quick-suggestions.hidden {
    display: none;
}

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

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

.chatbot-input {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    align-items: center;
}

#chatbot-message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
    background: #f9fafb;
    color: #1a1a1a;
}

#chatbot-message-input::placeholder {
    color: #9ca3af;
}

#chatbot-message-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
}

#send-message {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

#send-message:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    background: #60a5fa;
}

#send-message:active {
    transform: scale(0.95);
}

#send-message:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#send-message i {
    font-size: 16px;
}

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

.chatbot-suggestions {
    padding: 8px 20px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 100px;
    overflow-y: auto;
}

/* ===================================
   TOGGLE BUTTON
   =================================== */

#toggle-chatbot {
    position: fixed !important;
    bottom: 102px !important;
    right: 30px !important;
    width: 56px !important;
    height: 56px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease !important;
    z-index: 10000 !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: chatButtonPulse 2s ease-in-out infinite !important;
}

/* Beautiful pulsing animation for chat button - WHITE glow */
@keyframes chatButtonPulse {
    0% {
        box-shadow: 0 4px 24px rgba(59, 130, 246, 0.2),
                    0 0 0 0 rgba(255, 255, 255, 0.6);
    }
    50% {
        box-shadow: 0 4px 28px rgba(59, 130, 246, 0.3),
                    0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 4px 24px rgba(59, 130, 246, 0.2),
                    0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* When chat is open - hide toggle button via body class */
body.chatbot-is-open #toggle-chatbot {
    display: none !important;
}

/* Hide scroll-to-top button when chat is open AND not minimized */
/* When chat is minimized, button should be visible */
#findnity-chatbot.open:not(.minimized) ~ .scroll-to-top,
body:has(#findnity-chatbot.open:not(.minimized)) .scroll-to-top {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.8) translateY(20px) !important;
}

/* Chat button always above scroll-to-top */

#toggle-chatbot:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.05) translateY(0) !important;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

#toggle-chatbot:active {
    transform: scale(0.95) translateY(0) !important;
}

.chat-icon {
    color: #ffffff;
    font-size: 28px;
}

.chat-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    line-height: 1;
    padding: 0;
    box-sizing: border-box;
}

/* ===================================
   HEADER CHAT BUTTON (OPTIONAL)
   =================================== */

/* Additional button for header (optional) */
.header-chat-button {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    z-index: 99999;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.header-chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    background: #60a5fa;
}

.header-chat-button svg {
    width: 18px;
    height: 18px;
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */

@media (max-width: 968px) {
    /* Fix viewport on mobile/tablet */
    body.chatbot-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        left: 0;
        right: 0;
    }

    .chatbot-quick-suggestions {
        padding: 10px 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .suggestion-chip {
        flex-shrink: 0;
        font-size: 12px;
        padding: 6px 12px;
    }

    .suggestions-title {
        font-size: 10px;
    }

    #findnity-chatbot {
        width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        max-height: 100vh;
        max-height: -webkit-fill-available;
        right: 0;
        bottom: 0;
        top: 0;
        left: 0;
        max-width: 100vw;
        position: fixed;
        z-index: 99999;
    }

    #findnity-chatbot.open {
        height: 100vh !important;
        height: -webkit-fill-available !important;
        max-height: 100vh !important;
        max-height: -webkit-fill-available !important;
    }

    #findnity-chatbot.minimized {
        height: 60px !important;
        max-height: 60px !important;
        top: 0 !important;
        bottom: auto !important;
        overflow: hidden !important;
        margin-top: 70px !important;
    }

    .chatbot-window {
        border-radius: 0;
        height: 100%;
        max-height: 100vh;
        max-height: -webkit-fill-available;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .chatbot-header {
        border-radius: 0;
        flex-shrink: 0;
        min-height: 60px;
        max-height: 60px;
        padding: 12px 16px;
    }

    .chatbot-header-text {
        flex: 1;
        min-width: 0;
    }

    .chatbot-header h3 {
        font-size: 13px;
        line-height: 1.2;
    }

    .chatbot-header p {
        font-size: 10px;
        line-height: 1.2;
    }

    .chatbot-logo {
        width: 28px;
        height: 28px;
    }

    .chatbot-controls {
        gap: 6px;
    }

    .chatbot-controls button {
        width: 28px;
        height: 28px;
    }

    .chatbot-controls button i {
        font-size: 12px;
    }

    #chatbot-conversation {
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        min-height: 0;
        max-height: calc(100vh - 200px);
        max-height: calc(-webkit-fill-available - 200px);
    }

    .chatbot-input {
        flex-shrink: 0;
        flex-grow: 0;
        min-height: 60px;
        max-height: 80px;
        background: #ffffff;
        position: relative;
    }

    .chatbot-input input {
        font-size: 16px !important;
        /* Prevent zoom on iOS */
    }

    .chatbot-quick-replies {
        flex-shrink: 0;
        flex-grow: 0;
        min-height: 70px;
        max-height: 70px;
        overflow: hidden;
        padding: 12px 15px;
    }

    #toggle-chatbot {
        bottom: 85px !important;
        right: 20px !important;
        width: 50px !important;
        height: 50px !important;
        z-index: 10000 !important;
    }

    .message-content {
        max-width: 90%;
        font-size: 15px;
    }

    .chatbot-quick-replies {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}

/* Tablet: keep desktop button positions */
@media (min-width: 769px) and (max-width: 968px) {
    #toggle-chatbot {
        bottom: 102px !important;
        right: 30px !important;
        width: 56px !important;
        height: 56px !important;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes pulse-button {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

#toggle-chatbot.has-notification {
    animation: pulse-button 2s infinite;
}

/* ===================================
   DARK MODE SUPPORT (Optional)
   =================================== */

@media (prefers-color-scheme: dark) {
    /* Dark theme - Main backgrounds */
    #chatbot-conversation {
        background: #1c1c1e;
    }

    .chatbot-window {
        background: #2c2c2e;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
                    0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    /* Header dark theme */
    .chatbot-header {
        background: rgba(44, 44, 46, 0.98) !important;
        color: #f5f5f7 !important;
        border-bottom: 1px solid #48484a !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .chatbot-header h3 {
        color: #f5f5f7 !important;
    }

    .chatbot-header p {
        color: #a1a1a6 !important;
    }

    .chatbot-controls button {
        background: #3a3a3c !important;
        color: #a1a1a6 !important;
    }

    .chatbot-controls button:hover {
        background: #48484a !important;
        color: #f5f5f7 !important;
    }

    /* Bot messages - Dark bubble on dark background */
    .chatbot-window .chatbot-message.bot-message .message-content,
    .chatbot-window .bot-message .message-content,
    #chatbot-conversation .chatbot-message.bot-message .message-content,
    #chatbot-conversation .bot-message .message-content {
        background: #48484a !important;
        color: #f5f5f7 !important;
        border: 1px solid #58585a !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    }

    /* Force all text elements in bot messages to be light */
    .chatbot-window .chatbot-message.bot-message .message-content *,
    .chatbot-window .bot-message .message-content *,
    .chatbot-window .chatbot-message.bot-message .message-content,
    .chatbot-window .bot-message .message-content,
    #chatbot-conversation .chatbot-message.bot-message .message-content *,
    #chatbot-conversation .bot-message .message-content *,
    #chatbot-conversation .chatbot-message.bot-message .message-content,
    #chatbot-conversation .bot-message .message-content {
        color: #f5f5f7 !important;
    }

    .chatbot-window .chatbot-message.bot-message .message-content:hover,
    .chatbot-window .bot-message .message-content:hover,
    #chatbot-conversation .chatbot-message.bot-message .message-content:hover,
    #chatbot-conversation .bot-message .message-content:hover {
    }

    /* User messages - Blue solid */
    .chatbot-window .user-message .message-content,
    #chatbot-conversation .user-message .message-content {
        background: #3b82f6 !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    }

    /* Input area */
    .chatbot-input {
        background: #2c2c2e;
        border-top: 1px solid #48484a;
    }

    .chatbot-quick-replies,
    .chatbot-suggestions,
    .chatbot-quick-suggestions {
        background: #2c2c2e;
        border-top-color: #48484a;
    }

    .suggestions-title {
        color: #a1a1a6;
    }

    .suggestion-chip {
        background: #3a3a3c;
        color: #3b82f6;
        border: 1px solid #48484a;
    }

    .suggestion-chip:hover {
        background: #3b82f6;
        color: #ffffff;
        border-color: #3b82f6;
    }

    #chatbot-message-input {
        background: #3a3a3c;
        color: #f5f5f7;
        border: 1px solid #48484a;
    }

    #chatbot-message-input::placeholder {
        color: #8e8e93;
    }

    #chatbot-message-input:focus {
        border-color: #3b82f6;
        background: #48484a;
    }

    .chatbot-window .message-timestamp,
    #chatbot-conversation .message-timestamp {
        color: #8e8e93;
    }

    /* Welcome message */
    .chatbot-window .welcome-message .message-content,
    #chatbot-conversation .welcome-message .message-content {
        background: #3b82f6 !important;
        color: #ffffff !important;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    }

    /* Error message */
    .chatbot-window .error-message .message-content,
    #chatbot-conversation .error-message .message-content {
        background: #5a1f1f !important;
        color: #ff6b6b !important;
        border-color: #7a3f3f !important;
    }

    /* Send button */
    .chatbot-input button {
        background: #3b82f6;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    }

    .chatbot-input button:hover {
        background: #60a5fa;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    /* Typing indicator */
    .typing-dots span {
        background: #8e8e93;
    }

    /* Scrollbar dark theme */
    #chatbot-conversation::-webkit-scrollbar-track {
        background: #2c2c2e;
    }

    #chatbot-conversation::-webkit-scrollbar-thumb {
        background: #48484a;
    }

    #chatbot-conversation::-webkit-scrollbar-thumb:hover {
        background: #58585a;
    }
}

body.chatbot-minimized .page-content {
    padding-top: 60px !important;
}

body.chatbot-minimized .mobile-menu-overlay {
    top: 60px !important;
}

@media (max-width: 768px) {
    #findnity-chatbot.minimized {
        margin-top: 60px !important;
    }
}

/* Dark mode + Mobile fix */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    body.chatbot-open {
        background: #2c2c2e !important;
    }

    #findnity-chatbot {
        background: #2c2c2e;
    }

    .chatbot-input {
        background: #2c2c2e !important;
    }

    .chatbot-input::after {
        content: '';
        position: absolute;
        bottom: -200px;
        left: 0;
        right: 0;
        height: 200px;
        background: #2c2c2e;
    }
}

/* Light mode + Mobile fix */
@media (max-width: 768px) and (prefers-color-scheme: light) {
    .chatbot-input::after {
        content: '';
        position: absolute;
        bottom: -200px;
        left: 0;
        right: 0;
        height: 200px;
        background: #ffffff;
    }
}
