.eeq-chatbot {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: auto;
    font-family: inherit;
}

.eeq-chatbot * {
    box-sizing: border-box;
}

.eeq-chatbot-window {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform 0.3s ease, opacity 0.3s ease, height 0.3s ease, margin 0.3s ease;
    height: 0;
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.eeq-chatbot-window.is-open {
    height: 600px;
    margin-bottom: 16px;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.eeq-chatbot-header {
    background: #2563eb;
    color: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.eeq-chatbot-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eeq-chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.eeq-chatbot-avatar svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.eeq-chatbot-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #34d399;
    border-radius: 999px;
    border: 2px solid #2563eb;
}

.eeq-chatbot-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.eeq-chatbot-status {
    margin: 2px 0 0;
    font-size: 12px;
    color: #dbeafe;
    display: flex;
    align-items: center;
    gap: 6px;
}

.eeq-chatbot-status-indicator {
    width: 6px;
    height: 6px;
    background: #34d399;
    border-radius: 999px;
    display: inline-block;
}

.eeq-chatbot-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #ffffff;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.eeq-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.eeq-chatbot-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.eeq-chatbot-body {
    flex: 1;
    background: #f8fafc;
    padding: 20px 16px 16px;
    overflow: hidden;
    display: flex;
}

.eeq-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-right: 4px;
}

.eeq-chatbot-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: 100%;
}

.eeq-chatbot-message.is-user {
    align-items: flex-end;
}

.eeq-chatbot-bubble {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 85%;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    word-break: break-word;
}

.eeq-chatbot-message.is-user .eeq-chatbot-bubble {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

.eeq-chatbot-message.is-bot .eeq-chatbot-bubble {
    border-bottom-left-radius: 6px;
}

.eeq-chatbot-time {
    font-size: 10px;
    color: #9ca3af;
}

.eeq-chatbot-loading {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
}

.eeq-chatbot-loading span {
    width: 8px;
    height: 8px;
    background: #60a5fa;
    border-radius: 999px;
    animation: eeq-bounce 1s infinite;
}

.eeq-chatbot-loading span:nth-child(2) {
    animation-delay: 0.15s;
}

.eeq-chatbot-loading span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes eeq-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-6px); opacity: 1; }
}

.eeq-chatbot-input {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
}

.eeq-chatbot-form {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.eeq-chatbot-field {
    width: 100%;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px 46px 12px 14px;
    font-size: 14px;
    color: #111827;
}

.eeq-chatbot-field:focus {
    outline: 2px solid rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.eeq-chatbot-send {
    position: absolute;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.eeq-chatbot-send:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.eeq-chatbot-send:hover:not(:disabled) {
    background: #1d4ed8;
}

.eeq-chatbot-send svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.eeq-chatbot[dir="rtl"] .eeq-chatbot-field {
    padding: 12px 14px 12px 46px;
    text-align: right;
}

.eeq-chatbot[dir="rtl"] .eeq-chatbot-send {
    right: auto;
    left: 10px;
}

.eeq-chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.eeq-chatbot-toggle:hover {
    transform: scale(1.08);
    background: #1d4ed8;
}

.eeq-chatbot-toggle.is-open {
    background: #f43f5e;
}

.eeq-chatbot-toggle.is-open:hover {
    background: #e11d48;
}

.eeq-chatbot-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eeq-chatbot-toggle-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.eeq-chatbot-toggle .eeq-chatbot-close-icon {
    display: none;
}

.eeq-chatbot-toggle.is-open .eeq-chatbot-open {
    display: none;
}

.eeq-chatbot-toggle.is-open .eeq-chatbot-close-icon {
    display: inline-flex;
}

@media (max-width: 640px) {
    .eeq-chatbot {
        right: 16px;
        left: 16px;
        align-items: flex-end;
    }

    .eeq-chatbot-window {
        max-width: none;
        width: 100%;
    }

    .eeq-chatbot-window.is-open {
        height: 70vh;
    }
}
