:root {

    --chatbot-gradient: linear-gradient(135deg, #FF1744 0%, #D50000 100%);
    --chatbot-primary: #D50000;
    --chatbot-bg: #ffffff;
    --chatbot-text: #1e293b;
    --chatbot-light: #f8fafc;
    --chatbot-shadow: 0 12px 40px rgba(213, 0, 0, 0.25);
    --chatbot-border-radius: 20px;
}

.de-chatbot-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .de-chatbot-widget {
        bottom: 96px;

        right: 1.5rem;
    }
}


.de-chatbot-btn {
    background: var(--chatbot-gradient);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(213, 0, 0, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.de-chatbot-btn:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 10px 25px rgba(213, 0, 0, 0.5);
}

.de-chatbot-btn:active {
    transform: scale(0.95);
}


.de-chatbot-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid white;
    opacity: 0;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.de-chatbot-btn svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.de-chatbot-widget.active .de-chatbot-btn svg {
    transform: rotate(90deg);

}


.de-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: var(--chatbot-bg);
    border-radius: var(--chatbot-border-radius);
    box-shadow: var(--chatbot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.de-chatbot-window.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}


.de-chatbot-header {
    background: var(--chatbot-gradient);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.de-chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.de-chatbot-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chatbot-primary);
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.de-chatbot-title {
    font-weight: 700;
    font-size: 17px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.de-chatbot-subtitle {
    font-size: 12px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 4px;
}

.de-chatbot-subtitle::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4ade80;

    border-radius: 50%;
}

.de-chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.de-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}


.de-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--chatbot-light);
    scroll-behavior: smooth;
}


.de-chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    animation: message-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes message-pop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.de-chat-msg.bot {
    background: white;
    color: var(--chatbot-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.de-chat-msg.user {
    background: var(--chatbot-gradient);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(213, 0, 0, 0.2);
}

.de-chat-msg table {
    width: 100%;
    font-size: 13px;
    margin-top: 10px;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.de-chat-msg th,
.de-chat-msg td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.de-chat-msg th {
    background: #f8fafc;
    font-weight: 600;
    color: #64748b;
}

.de-chat-msg tr:last-child td {
    border-bottom: none;
}


.de-chat-typing {
    font-style: italic;
    font-size: 12px;
    color: #94a3b8;
    margin-left: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}


.de-chatbot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
    align-items: flex-end;

}

.de-chatbot-input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 99px;
    border: 1px solid #e2e8f0;
    outline: none;
    font-size: 14px;
    background: white;
    transition: all 0.2s;
    color: #1e293b;

}

.de-chatbot-input:focus {
    background: white;
    border-color: var(--chatbot-primary);
    box-shadow: 0 0 0 3px rgba(213, 0, 0, 0.1);
}

.de-chatbot-send {
    background: var(--chatbot-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 3px 10px rgba(213, 0, 0, 0.2);
}

.de-chatbot-send:hover {
    transform: scale(1.05);
}

.de-chatbot-send:active {
    transform: scale(0.95);
}


.chatbot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chatbot-option-btn {
    background: white;
    color: var(--chatbot-primary);
    border: 1px solid #fecaca;

    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chatbot-option-btn:hover {
    background: #fef2f2;

    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-color: var(--chatbot-primary);
}


@media (max-width: 480px) {
    .de-chatbot-window {
        width: 90vw;
        right: 5vw;
        bottom: 104px;
        height: 70vh;
    }
}