/* ============================================ */
/* LEE AI CHATBOT STYLES - REUSABLE COMPONENT */
/* ============================================ */

.lee-ai-chatbot-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chatbot-card-lee {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;
    max-height: 560px;
    max-width: 650px;
    overflow: hidden;
    border: 2px solid rgba(0, 180, 216, 0.2);
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header-lee {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    padding: 18px 22px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.chatbot-header-lee::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.chatbot-avatar-lee {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0077b6;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.chatbot-header-content-lee {
    flex: 1;
    position: relative;
    z-index: 1;
}

.chatbot-header-lee h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-description-lee {
    margin: 0 0 8px 0;
    font-size: 13px;
    opacity: 0.9;
}

.chatbot-status-lee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.status-text-lee {
    opacity: 0.95;
}

.status-dot-lee {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.2);
    }
}

.chatbot-messages-lee {
    height: 380px;
    overflow-y: auto;
    padding: 18px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

.welcome-message-lee {
    background: white;
    padding: 14px;
    border-radius: 10px;
    border-left: 3px solid #00b4d8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-message-lee i {
    font-size: 17px;
    color: #00b4d8;
    margin-bottom: 8px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.welcome-message-lee p {
    margin: 6px 0;
    color: #333;
    line-height: 1.5;
    font-size: 13px;
}

.welcome-message-lee ul {
    margin: 8px 0;
    padding-left: 18px;
}

.welcome-message-lee li {
    margin: 4px 0;
    color: #555;
    font-size: 13px;
}

/* Typing Indicator - Always left aligned below messages */
.typing-indicator-lee {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 180px;
    align-self: flex-start;
    margin-top: auto;
}

.typing-dots-lee {
    display: flex;
    gap: 4px;
}

.typing-dots-lee span {
    width: 8px;
    height: 8px;
    background: #00b4d8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dots-lee span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots-lee span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-12px);
        opacity: 1;
    }
}

.typing-text-lee {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Chat Messages */
.chat-message-lee {
    display: flex;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-content-lee {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.user-message-lee {
    justify-content: flex-end;
}

.user-message-lee .message-content-lee {
    flex-direction: row-reverse;
}

.user-message-lee.chat-message-lee {
    animation-name: slideInRight;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-icon-lee {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bot-message-lee .message-icon-lee {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: white;
}

.user-message-lee .message-icon-lee {
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: white;
}

.message-text-lee {
    flex: 1;
}

.message-text-lee p {
    background: white;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 0 0 3px 0;
    color: #333;
    line-height: 1.5;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
}

.user-message-lee .message-text-lee p {
    background: linear-gradient(135deg, #ffffff, #ffffff);
    color: #333;
}

.message-time-lee {
    font-size: 10px;
    color: #999;
    padding-left: 4px;
}

/* Input Form */
.chatbot-input-form-lee {
    padding: 14px 16px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.chatbot-input-wrapper-lee {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input-wrapper-lee input {
    flex: 1;
    padding: 11px 16px;
    border: 2px solid #e9ecef;
    border-radius: 22px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.chatbot-input-wrapper-lee input:focus {
    border-color: #00b4d8;
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
    transform: translateY(-1px);
}

.chatbot-input-wrapper-lee button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.chatbot-input-wrapper-lee button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 119, 182, 0.4);
}

.chatbot-input-wrapper-lee button:active {
    transform: translateY(0) scale(0.95);
}

.chatbot-input-wrapper-lee button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: scale(1);
}

.chatbot-footer-text-lee {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin: 8px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.chatbot-footer-text-lee i {
    font-size: 9px;
}

/* Scrollbar styling */
.chatbot-messages-lee::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages-lee::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatbot-messages-lee::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00b4d8, #0077b6);
    border-radius: 10px;
}

.chatbot-messages-lee::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #0077b6, #005f8a);
}

/* AI Response Formatting Styles */
.message-body-lee {
    background: white;
    padding: 10px 14px;
    border-radius: 10px;
    color: #333;
    line-height: 1.6;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
}

.user-message-lee .message-body-lee {
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: white;
}

/* Formatting within AI responses */
.message-body-lee p {
    margin: 8px 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font-size: inherit;
    line-height: 1.6;
}

.message-body-lee p:first-child {
    margin-top: 0;
}

.message-body-lee p:last-child {
    margin-bottom: 0;
}

.message-body-lee strong {
    font-weight: 600;
    color: #0077b6;
}

.user-message-lee .message-body-lee strong {
    color: #ffffff;
    font-weight: 700;
}

.message-body-lee em {
    font-style: italic;
    color: #555;
}

.message-body-lee ul.ai-list {
    margin: 12px 0;
    padding-left: 20px;
    list-style: none;
}

.message-body-lee ul.ai-list li {
    position: relative;
    margin: 8px 0;
    padding-left: 8px;
    color: #444;
    line-height: 1.6;
}

.message-body-lee ul.ai-list li::before {
    content: "•";
    position: absolute;
    left: -12px;
    color: #00b4d8;
    font-weight: bold;
    font-size: 16px;
}

.message-body-lee br {
    display: block;
    content: "";
    margin: 4px 0;
}

.message-body-lee a.ai-link {
    color: #0077b6;
    text-decoration: underline;
    transition: all 0.2s;
}

.message-body-lee a.ai-link:hover {
    color: #00b4d8;
    text-decoration: none;
}

.user-message-lee .message-body-lee a.ai-link {
    color: #ffffff;
    text-decoration: underline;
}

/* Nested lists support */
.message-body-lee ul.ai-list ul.ai-list {
    margin: 6px 0 6px 15px;
}

.message-body-lee ul.ai-list ul.ai-list li::before {
    content: "◦";
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .lee-ai-chatbot-container {
        padding: 0 15px 60px 15px;
    }
    
    .chatbot-card-lee {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .chatbot-messages-lee {
        height: 350px;
    }
    
    .message-content-lee {
        max-width: 90%;
    }
    
    .message-body-lee {
        font-size: 12px;
    }
    
    .message-body-lee ul.ai-list {
        padding-left: 18px;
    }
}
