/* LST AI Assistant chat widget */
#lst-chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    border: none;
    font-size: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease;
}

#lst-chat-launcher:hover {
    transform: scale(1.06);
}

.lst-chat-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 50%;
    background: #e0263f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #fff;
}

.lst-chat-badge.hide {
    display: none;
}

#lst-chat-window {
    position: fixed;
    right: 24px;
    bottom: 94px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    font-family: inherit;
}

#lst-chat-window.open {
    display: flex;
}

.lst-chat-header {
    background: #000;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lst-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lst-chat-avatar img {
    width: 24px;
    height: auto;
}

.lst-chat-header-info {
    flex: 1;
    min-width: 0;
}

.lst-chat-header-info h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .2px;
}

.lst-chat-header-info span {
    font-size: 11.5px;
    color: #b7f5c6;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lst-chat-header-info span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ecc71;
    display: inline-block;
}

.lst-chat-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

.lst-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lst-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lst-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 90%;
}

.lst-msg-row-bot {
    align-self: flex-start;
}

.lst-msg-row-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.lst-msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #000;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lst-msg-avatar img {
    width: 17px;
    height: auto;
}

.lst-msg {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 13.5px;
    line-height: 1.4;
    word-wrap: break-word;
}

.lst-msg-bot {
    background: #fff;
    border: 1px solid #e3e3e3;
    color: #222;
    border-bottom-left-radius: 4px;
}

.lst-msg-user {
    background: #000;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.lst-msg-bot a {
    color: #000;
    font-weight: 600;
    text-decoration: underline;
}

.lst-typing-dots {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lst-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    display: inline-block;
    animation: lst-typing-bounce 1.2s infinite ease-in-out;
}

.lst-typing-dots span:nth-child(2) {
    animation-delay: .2s;
}

.lst-typing-dots span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes lst-typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: .5;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.lst-chat-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 10px;
    background: #f7f7f7;
}

.lst-chat-topic-btn {
    background: #fff;
    border: 1px solid #000;
    border-radius: 999px;
    font-size: 11.5px;
    padding: 6px 12px;
    cursor: pointer;
    color: #000;
    transition: background .15s ease, color .15s ease;
}

.lst-chat-topic-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.lst-chat-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px;
    padding: 4px 4px 4px 14px;
    border: 1.5px solid #000;
    border-radius: 999px;
    background: #fff;
    transition: box-shadow .15s ease;
}

.lst-chat-input-row:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.lst-chat-input-row input {
    flex: 1;
    border: none;
    padding: 8px 0;
    font-size: 13px;
    outline: none;
    background: transparent;
}

.lst-chat-input-row input:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.lst-chat-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s ease;
}

.lst-chat-send:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.lst-chat-footer-note {
    font-size: 10px;
    color: #999;
    text-align: center;
    padding: 0 8px 10px;
    background: #fff;
}

@media (max-width: 480px) {
    #lst-chat-window {
        right: 16px;
        bottom: 84px;
        width: calc(100vw - 32px);
    }

    #lst-chat-launcher {
        right: 16px;
        bottom: 16px;
    }
}
