/* ============================================
   LEFTLANE.IO - AI CHATBOT STYLES
   ============================================ */

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

/* Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color, #0c71c3);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(12, 113, 195, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    background: var(--primary-dark, #0a5da0);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(12, 113, 195, 0.5);
}

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

/* Notification Badge */
.chatbot-toggle::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--secondary-color, #f3f700);
    border-radius: 50%;
    border: 2px solid var(--primary-color, #0c71c3);
    animation: pulse 2s infinite;
}

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

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: var(--background-color, #ffffff);
    border-radius: var(--radius-lg, 0.75rem);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chatbot-window-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Header */
.chatbot-header {
    background: var(--primary-color, #0c71c3);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-header-content h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.chatbot-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.75rem;
    opacity: 0.9;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm, 0.375rem);
    transition: background 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Messages Container */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--background-alt, #f9fafb);
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--border-color, #e5e7eb);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-light, #9ca3af);
}

/* Message */
.chatbot-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: messageSlideIn 0.3s ease;
}

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

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

.chatbot-message-user .chatbot-message-content {
    background: var(--primary-color, #0c71c3);
    color: white;
    border-radius: var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem) var(--radius-sm, 0.375rem) var(--radius-lg, 0.75rem);
}

.chatbot-message-assistant .chatbot-message-content {
    background: white;
    color: var(--text-primary, #1f2937);
    border-radius: var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem) var(--radius-sm, 0.375rem);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

/* Avatar */
.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color, #0c71c3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.chatbot-message-user .chatbot-avatar {
    display: none;
}

/* Message Content */
.chatbot-message-content {
    padding: 0.75rem 1rem;
    max-width: 75%;
    word-wrap: break-word;
}

.chatbot-message-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chatbot-message-streaming .chatbot-streaming-text::after {
    content: '▋';
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Input Container */
.chatbot-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.chatbot-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-lg, 0.75rem);
    font-family: inherit;
    font-size: 0.875rem;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    transition: border-color 0.2s ease;
    background: var(--background-alt, #f9fafb);
    color: var(--text-primary, #1f2937);
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--primary-color, #0c71c3);
    background: white;
}

.chatbot-input::placeholder {
    color: var(--text-light, #9ca3af);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md, 0.5rem);
    background: var(--primary-color, #0c71c3);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send:hover {
    background: var(--primary-dark, #0a5da0);
    transform: scale(1.05);
}

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

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 10px;
        right: 10px;
    }

    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 70px;
        right: 0;
        border-radius: var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem) 0 0;
    }

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

