/* LoadLider AI Assistant Widget Styles */

/* Floating Button */
#ll-assistant-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0056D2; /* TPC/Brand Blue */
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 86, 210, 0.3);
    z-index: 9998;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#ll-assistant-btn:hover {
    transform: translateY(-2px);
    background: #0044A8;
}

#ll-assistant-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Modal Overlay */
#ll-assistant-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
}

#ll-assistant-overlay.ll-active {
    display: flex;
    opacity: 1;
}

/* Chat Window Modal */
#ll-assistant-modal {
    background: #f8f9fa;
    border-radius: 20px;
    width: 75vw;
    height: 80vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s;
}

#ll-assistant-overlay.ll-active #ll-assistant-modal {
    transform: scale(1);
}

/* Modal Header */
#ll-modal-header {
    background: #0056D2;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

#ll-header-info {
    display: flex;
    flex-direction: column;
}

#ll-header-title {
    font-weight: 700;
    font-size: 18px;
}

#ll-header-status {
    font-size: 12px;
    opacity: 0.8;
}

#ll-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
}

#ll-close-btn:hover {
    opacity: 1;
}

/* Chat Area */
#ll-chat-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: 'Inter', sans-serif;
    background: #ffffff;
}

.ll-msg {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
}

.ll-msg-user {
    align-self: flex-end;
    background: #f1f3f5;
    color: #333;
    border-bottom-right-radius: 4px;
}

.ll-msg-ai {
    align-self: flex-start;
    background: #0056D2;
    color: white;
    border-bottom-left-radius: 4px;
}

.ll-msg-system {
    align-self: center;
    background: #fff3cd;
    color: #856404;
    font-size: 13px;
    border-radius: 8px;
    max-width: 90%;
    text-align: center;
}

.ll-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #e9ecef;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

.ll-typing span {
    width: 8px;
    height: 8px;
    background: #adb5bd;
    border-radius: 50%;
    animation: llBounce 1.4s infinite ease-in-out both;
}

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

@keyframes llBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Input Area */
#ll-input-area {
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
}

#ll-input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 24px;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

#ll-input:focus {
    border-color: #0056D2;
}

#ll-send-btn {
    background: #0056D2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#ll-send-btn:hover {
    background: #0044A8;
}

#ll-send-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-left: -2px; /* slight visual offset for paperplane */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #ll-assistant-modal {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    }
    
    #ll-assistant-overlay.ll-active #ll-assistant-modal {
        transform: translateY(0);
    }

    .ll-msg {
        max-width: 85%;
    }
}
