/* ProfitLooker Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Chat Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4);
}

.chatbot-toggle i {
    color: white;
    font-size: 24px;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Chat Window */
.chatbot-window {
    display: none;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.chatbot-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    font-weight: 600;
    font-size: 16px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

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

/* Messages Area */
.chatbot-messages {
    height: 320px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom-right-radius: 5px;
}

.chatbot-message.bot .message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.chatbot-message.bot .message-time {
    text-align: left;
}

/* Typing Indicator */
.typing-indicator .message-content {
    background: white;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

/* Input Area */
.chatbot-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.chatbot-input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input-wrapper input:focus {
    border-color: #007bff;
}

.chatbot-send {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

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

/* Suggestions */
.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #495057;
}

.suggestion-btn:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        max-width: 350px;
        max-height: 500px;
    }
    
    .chatbot-messages {
        height: calc(100% - 140px);
    }
}

/* Animation for opening */
.chatbot-window {
    animation: slideUp 0.3s ease-out;
}

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