:root {
    --primary-gradient: linear-gradient(135deg, #6ad8db 0%, #764ba2 100%);
    --chat-bg: rgba(255, 255, 255, 0.98);
    --bot-msg-bg: #f1f3f6;
    --user-msg-bg: #66d2da;
}
.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--primary-gradient);
    box-shadow: 0 10px 25px rgba(118, 75, 162, 0.4);
    border: none;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.chat-toggle-btn:hover {
    transform: scale(1.1) rotate(-5deg);
}

.chat-toggle-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.chat-widget-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 340px;
    height: 600px;
    max-height: 80vh;
    background: var(--chat-bg);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;

    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.chat-widget-container.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    background: var(--primary-gradient);
    padding: 18px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.header-title span {
    font-size: 11px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
    scrollbar-width: thin;
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.msg-row {
    display: flex;
    margin-bottom: 15px;
    animation: slideUp 0.3s ease-out;
}

.msg-row.bot {
    justify-content: flex-start;
}

.msg-row.user {
    justify-content: flex-end;
}

.bubble {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.bot .bubble {
    background: var(--bot-msg-bg);
    color: #333;
    border-bottom-left-radius: 4px;
}

.user .bubble {
    background: var(--primary-gradient);
    color: #fff;
    border-bottom-right-radius: 4px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-footer {
    padding: 12px;
    background: #fff;
    border-top: 1px solid #eee;
}

.input-group-custom {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px 5px 5px 15px;
    border: 1px solid #eee;
}

.input-group-custom input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 14px;
}

.send-btn-icon {
    width: 35px;
    height: 35px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.send-btn-icon:hover {
    transform: scale(1.1);
}

.btn-choice {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    color: #555;
    font-size: 13px;
    transition: 0.2s;
}

.btn-choice:hover {
    border-color: #5250ad;
    background: #fdfdfd;
    transform: translateX(5px);
}

.lead-form-overlay {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-input-styled {
    background: #f8f9fa;
    border: 1px solid #eee;
    font-size: 13px;
    margin-bottom: 8px;
}

.typing-dots {
    display: none;
    margin-bottom: 10px;
    margin-left: 10px;
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #bbb;
    border-radius: 50%;
    margin-right: 3px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}