#alphaplus-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 20000;
    font-family: 'Inter', sans-serif;
}

#chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1B1F5E;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

#chat-toggle:hover {
    transform: scale(1.1);
}

#chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eee;
}

#chat-header {
    background: #1B1F5E;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

#chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9fb;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.message.assistant {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.user {
    background: #1B1F5E;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

#chat-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    background: white;
}

#chat-lead-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#chat-lead-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
}

#chat-lead-form button {
    background: #F5B731;
    color: #1B1F5E;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

#chat-input-area {
    display: none;
    gap: 10px;
}

#chat-input-area input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 10px;
    outline: none;
}

#chat-input-area button {
    background: #1B1F5E;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
}

#chat-greeting {
    position: absolute;
    right: 75px;
    bottom: 5px;
    background: white;
    padding: 12px 18px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    border: 1px solid #eee;
    z-index: 1001;
    pointer-events: none;
    transform-origin: right bottom;
    animation: bubbleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#chat-greeting::after {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 20px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid white;
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: scale(0.5) translateX(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@media (max-width: 767px) {
    #chat-greeting {
        right: 80px;
        bottom: 10px;
    }
    #alphaplus-chat-widget {
        bottom: 90px !important;
        right: 15px !important;
    }
    #chat-container {
        width: calc(100vw - 30px);
        height: 450px;
        bottom: 80px;
        right: 0;
    }
}